xref: /trunk/main/sd/inc/sdfilter.hxx (revision 67e470da)
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 _SD_SDFILTER_HXX
25 #define _SD_SDFILTER_HXX
26 
27 #include <tools/gen.hxx>
28 #include <rtl/ustring.hxx>
29 #include <com/sun/star/frame/XModel.hpp>
30 #include <com/sun/star/task/XStatusIndicator.hpp>
31 #include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
32 
33 // ------------
34 // - SdFilter -
35 // ------------
36 
37 class SfxMedium;
38 namespace sd {
39 class DrawDocShell;
40 }
41 class SdDrawDocument;
42 class SfxProgress;
43 namespace osl { class Module; }
44 
45 class SdFilter
46 {
47 public:
48     SdFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell, sal_Bool bShowProgress );
49     virtual ~SdFilter();
50 
IsProgress() const51 	sal_Bool					IsProgress() const { return mbShowProgress; }
IsDraw() const52 	sal_Bool					IsDraw() const { return mbIsDraw; }
IsImpress() const53 	sal_Bool					IsImpress() const { return !mbIsDraw; }
54     virtual sal_Bool            Export() = 0;
55 
56 protected:
57 	::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >				mxModel;
58 	::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator >	mxStatusIndicator;
59 
60 	SfxMedium&					mrMedium;
61 	::sd::DrawDocShell&			mrDocShell;
62 	SdDrawDocument&				mrDocument;
63 	sal_Bool					mbIsDraw : 1;
64 	sal_Bool					mbShowProgress : 1;
65 
66 	::osl::Module*				OpenLibrary( const ::rtl::OUString& rLibraryName ) const;
67 	void						CreateStatusIndicator();
68 
69 private:
70 
71 	::rtl::OUString				ImplGetFullLibraryName( const ::rtl::OUString& rLibraryName ) const;
72 
73 };
74 
75 #endif // _SD_SDFILTER_HXX
76