Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright IBM Corporation 2009, 2010.
7 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
8 : : *
9 : : * OpenOffice.org - a multi-platform office productivity suite
10 : : *
11 : : * This file is part of OpenOffice.org.
12 : : *
13 : : * OpenOffice.org is free software: you can redistribute it and/or modify
14 : : * it under the terms of the GNU Lesser General Public License version 3
15 : : * only, as published by the Free Software Foundation.
16 : : *
17 : : * OpenOffice.org is distributed in the hope that it will be useful,
18 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 : : * GNU Lesser General Public License version 3 for more details
21 : : * (a copy is included in the LICENSE file that accompanied this code).
22 : : *
23 : : * You should have received a copy of the GNU Lesser General Public License
24 : : * version 3 along with OpenOffice.org. If not, see
25 : : * <http://www.openoffice.org/license.html>
26 : : * for a copy of the LGPLv3 License.
27 : : *
28 : : ************************************************************************/
29 : :
30 : : #ifndef _vbafiledialogselecteditems_hxx_
31 : : #define _vbafiledialogselecteditems_hxx_
32 : :
33 : : #include <ooo/vba/XFileDialogSelectedItems.hpp>
34 : : #include <vbahelper/vbacollectionimpl.hxx>
35 : : #include <cppuhelper/implbase1.hxx>
36 : : #include <com/sun/star/container/XIndexAccess.hpp>
37 : :
38 : : typedef CollTestImplHelper< ov::XFileDialogSelectedItems > FileDialogSelectedItems_BASE;
39 : :
40 : :
41 [ # # ]: 0 : class VbaFileDialogSelectedItems : public FileDialogSelectedItems_BASE
42 : : {
43 : : public:
44 : : VbaFileDialogSelectedItems( const css::uno::Reference< ov::XHelperInterface >& xParent,
45 : : const css::uno::Reference< css::uno::XComponentContext >& xContext,
46 : : const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
47 : :
48 : : virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
49 : : virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
50 : : virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
51 : :
52 : : protected:
53 : : virtual rtl::OUString getServiceImplName();
54 : : virtual css::uno::Sequence<rtl::OUString> getServiceNames();
55 : : private:
56 : : };
57 : :
58 : :
59 [ # # ][ # # ]: 0 : class VbaFileDialogSelectedObj : public cppu::WeakImplHelper2<css::container::XIndexAccess, css::container::XEnumeration>
60 : : {
61 : : public:
62 : : VbaFileDialogSelectedObj();
63 : : sal_Bool SetSelectedFile(css::uno::Sequence<rtl::OUString> &sFList);
64 : : //XIndexAccess
65 : : virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
66 : :
67 : : virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 nIndex )
68 : : throw(::com::sun::star::lang::IndexOutOfBoundsException,
69 : : ::com::sun::star::lang::WrappedTargetException,
70 : : ::com::sun::star::uno::RuntimeException);
71 : :
72 : : // XElementAccess
73 : : virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
74 : : throw(::com::sun::star::uno::RuntimeException);
75 : :
76 : : virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
77 : :
78 : : //XEnumeration
79 : : virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException);
80 : : virtual css::uno::Any SAL_CALL nextElement( ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException);
81 : :
82 : : protected:
83 : : private:
84 : : css::uno::Sequence<rtl::OUString> m_sFileList;
85 : : sal_Int32 m_nIndex;
86 : : };
87 : :
88 : : #endif
89 : :
90 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|