1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FolderPicker.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _FOLDERPICKER_HXX_
32 #define _FOLDERPICKER_HXX_
34 //---------------------------------------------------------
35 // includes of other projects
36 //---------------------------------------------------------
38 #include <cppuhelper/implbase3.hxx>
39 #include <osl/mutex.hxx>
40 #include <com/sun/star/lang/XServiceInfo.hpp>
42 #ifndef _COM_SUN_STAR_UI_XFOLDERPICKER_HPP_
43 #include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
45 #include <com/sun/star/util/XCancellable.hpp>
49 #ifndef _FPIMPLBASE_HXX_
50 #include "WinFOPImpl.hxx"
53 //----------------------------------------------------------
55 //----------------------------------------------------------
58 public cppu::WeakImplHelper3
<
59 com::sun::star::ui::dialogs::XFolderPicker
,
60 com::sun::star::lang::XServiceInfo
,
61 com::sun::star::util::XCancellable
>
66 CFolderPicker( const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>& xServiceMgr
);
68 //------------------------------------------------------------------------------------
70 //------------------------------------------------------------------------------------
72 virtual void SAL_CALL
setTitle( const rtl::OUString
& aTitle
)
73 throw( com::sun::star::uno::RuntimeException
);
75 virtual sal_Int16 SAL_CALL
execute( )
76 throw( com::sun::star::uno::RuntimeException
);
78 //------------------------------------------------------------------------------------
79 // XFolderPicker functions
80 //------------------------------------------------------------------------------------
82 virtual void SAL_CALL
setDisplayDirectory( const rtl::OUString
& aDirectory
)
83 throw( com::sun::star::lang::IllegalArgumentException
, com::sun::star::uno::RuntimeException
);
85 virtual rtl::OUString SAL_CALL
getDisplayDirectory( )
86 throw( com::sun::star::uno::RuntimeException
);
88 virtual rtl::OUString SAL_CALL
getDirectory( )
89 throw( com::sun::star::uno::RuntimeException
);
91 virtual void SAL_CALL
setDescription( const rtl::OUString
& aDescription
)
92 throw( com::sun::star::uno::RuntimeException
);
94 //------------------------------------------------
96 //------------------------------------------------
98 virtual ::rtl::OUString SAL_CALL
getImplementationName( )
99 throw(::com::sun::star::uno::RuntimeException
);
101 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
102 throw(::com::sun::star::uno::RuntimeException
);
104 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames( )
105 throw(::com::sun::star::uno::RuntimeException
);
107 //------------------------------------------------
109 //------------------------------------------------
111 virtual void SAL_CALL
cancel( )
112 throw(::com::sun::star::uno::RuntimeException
);
114 //------------------------------------------------
115 // overwrite base class method, which is called
116 // by base class dispose function
117 //------------------------------------------------
119 virtual void SAL_CALL
disposing();
122 com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
> m_xServiceMgr
;
123 std::auto_ptr
< CWinFolderPickerImpl
> m_pFolderPickerImpl
;
126 // prevent copy and assignment
128 CFolderPicker( const CFolderPicker
& );
129 CFolderPicker
& operator=( const CFolderPicker
& );