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