1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _SALAQUAFOLDERPICKER_HXX_ 29 #define _SALAQUAFOLDERPICKER_HXX_ 30 31 //_______________________________________________________________________________________________________________________ 32 // includes of other projects 33 //_______________________________________________________________________________________________________________________ 34 35 #ifndef _CPPUHELPER_COMPBASE4_HXX_ 36 #include <cppuhelper/implbase4.hxx> 37 #endif 38 #include <com/sun/star/util/XCancellable.hpp> 39 #include <com/sun/star/lang/XEventListener.hpp> 40 #include <com/sun/star/lang/XServiceInfo.hpp> 41 42 #ifndef _COM_SUN_STAR_UI_XFOLDERPICKER_HPP_ 43 #include <com/sun/star/ui/dialogs/XFolderPicker.hpp> 44 #endif 45 46 #ifndef _SALAQUAPICKER_HXX_ 47 #include "SalAquaPicker.hxx" 48 #endif 49 50 #include <memory> 51 52 #ifndef _RTL_USTRING_H_ 53 #include <rtl/ustring.hxx> 54 #endif 55 56 #include <list> 57 58 //---------------------------------------------------------- 59 // class declaration 60 //---------------------------------------------------------- 61 62 class SalAquaFolderPicker : 63 public SalAquaPicker, 64 public cppu::WeakImplHelper4< 65 ::com::sun::star::ui::dialogs::XFolderPicker, 66 ::com::sun::star::lang::XServiceInfo, 67 ::com::sun::star::lang::XEventListener, 68 ::com::sun::star::util::XCancellable > 69 { 70 public: 71 72 // constructor 73 SalAquaFolderPicker( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceMgr ); 74 75 //------------------------------------------------------------------------------------ 76 // XExecutableDialog functions 77 //------------------------------------------------------------------------------------ 78 79 virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) 80 throw( ::com::sun::star::uno::RuntimeException ); 81 82 virtual sal_Int16 SAL_CALL execute( ) 83 throw( ::com::sun::star::uno::RuntimeException ); 84 85 //------------------------------------------------------------------------------------ 86 // XFolderPicker functions 87 //------------------------------------------------------------------------------------ 88 89 virtual void SAL_CALL setDisplayDirectory( const rtl::OUString& rDirectory ) 90 throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException ); 91 92 virtual rtl::OUString SAL_CALL getDisplayDirectory( ) 93 throw( com::sun::star::uno::RuntimeException ); 94 95 virtual rtl::OUString SAL_CALL getDirectory( ) 96 throw( com::sun::star::uno::RuntimeException ); 97 98 virtual void SAL_CALL setDescription( const rtl::OUString& rDescription ) 99 throw( com::sun::star::uno::RuntimeException ); 100 101 //------------------------------------------------ 102 // XServiceInfo 103 //------------------------------------------------ 104 105 virtual ::rtl::OUString SAL_CALL getImplementationName( ) 106 throw(::com::sun::star::uno::RuntimeException); 107 108 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 109 throw(::com::sun::star::uno::RuntimeException); 110 111 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) 112 throw(::com::sun::star::uno::RuntimeException); 113 114 //------------------------------------------------ 115 // XCancellable 116 //------------------------------------------------ 117 118 virtual void SAL_CALL cancel( ) 119 throw( ::com::sun::star::uno::RuntimeException ); 120 121 //------------------------------------------------ 122 // XEventListener 123 //------------------------------------------------ 124 125 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) 126 throw(::com::sun::star::uno::RuntimeException); 127 128 private: 129 // prevent copy and assignment 130 SalAquaFolderPicker( const SalAquaFolderPicker& ); 131 SalAquaFolderPicker& operator=( const SalAquaFolderPicker& ); 132 133 // to instantiate own services 134 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; 135 136 }; 137 138 #endif // _SALAQUAFOLDERPICKER_HXX_ 139