1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SALAQUAFOLDERPICKER_HXX_
25 #define _SALAQUAFOLDERPICKER_HXX_
26 
27 //_______________________________________________________________________________________________________________________
28 //  includes of other projects
29 //_______________________________________________________________________________________________________________________
30 
31 #ifndef _CPPUHELPER_COMPBASE4_HXX_
32 #include <cppuhelper/implbase4.hxx>
33 #endif
34 #include <com/sun/star/util/XCancellable.hpp>
35 #include <com/sun/star/lang/XEventListener.hpp>
36 #include <com/sun/star/lang/XServiceInfo.hpp>
37 
38 #ifndef _COM_SUN_STAR_UI_XFOLDERPICKER_HPP_
39 #include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
40 #endif
41 
42 #ifndef _SALAQUAPICKER_HXX_
43 #include "SalAquaPicker.hxx"
44 #endif
45 
46 #include <memory>
47 
48 #ifndef _RTL_USTRING_H_
49 #include <rtl/ustring.hxx>
50 #endif
51 
52 #include <list>
53 
54 //----------------------------------------------------------
55 // class declaration
56 //----------------------------------------------------------
57 
58 class SalAquaFolderPicker :
59         public SalAquaPicker,
60     public cppu::WeakImplHelper4<
61     ::com::sun::star::ui::dialogs::XFolderPicker,
62     ::com::sun::star::lang::XServiceInfo,
63     ::com::sun::star::lang::XEventListener,
64         ::com::sun::star::util::XCancellable >
65 {
66 public:
67 
68     // constructor
69     SalAquaFolderPicker( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceMgr );
70 
71     //------------------------------------------------------------------------------------
72     // XExecutableDialog functions
73     //------------------------------------------------------------------------------------
74 
75     virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
76         throw( ::com::sun::star::uno::RuntimeException );
77 
78     virtual sal_Int16 SAL_CALL execute(  )
79         throw( ::com::sun::star::uno::RuntimeException );
80 
81     //------------------------------------------------------------------------------------
82     // XFolderPicker functions
83     //------------------------------------------------------------------------------------
84 
85     virtual void SAL_CALL setDisplayDirectory( const rtl::OUString& rDirectory )
86         throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException );
87 
88     virtual rtl::OUString SAL_CALL getDisplayDirectory(  )
89         throw( com::sun::star::uno::RuntimeException );
90 
91     virtual rtl::OUString SAL_CALL getDirectory( )
92         throw( com::sun::star::uno::RuntimeException );
93 
94     virtual void SAL_CALL setDescription( const rtl::OUString& rDescription )
95         throw( com::sun::star::uno::RuntimeException );
96 
97     //------------------------------------------------
98     // XServiceInfo
99     //------------------------------------------------
100 
101     virtual ::rtl::OUString SAL_CALL getImplementationName(  )
102         throw(::com::sun::star::uno::RuntimeException);
103 
104     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
105         throw(::com::sun::star::uno::RuntimeException);
106 
107     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  )
108         throw(::com::sun::star::uno::RuntimeException);
109 
110     //------------------------------------------------
111     // XCancellable
112     //------------------------------------------------
113 
114     virtual void SAL_CALL cancel( )
115         throw( ::com::sun::star::uno::RuntimeException );
116 
117     //------------------------------------------------
118     // XEventListener
119     //------------------------------------------------
120 
121     virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent )
122         throw(::com::sun::star::uno::RuntimeException);
123 
124 private:
125     // prevent copy and assignment
126     SalAquaFolderPicker( const SalAquaFolderPicker& );
127     SalAquaFolderPicker& operator=( const SalAquaFolderPicker& );
128 
129     // to instantiate own services
130     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr;
131 
132 };
133 
134 #endif // _SALAQUAFOLDERPICKER_HXX_
135