update dev300-m58
[ooovba.git] / filter / source / pdf / pdffilter.hxx
blob8dc96241bef2e37c33e050a800c02bd5dc23bade
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pdffilter.hxx,v $
10 * $Revision: 1.7 $
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 PDFFILTER_HXX
32 #define PDFFILTER_HXX
34 #include <com/sun/star/document/XFilter.hpp>
35 #include <com/sun/star/document/XExporter.hpp>
36 #include <com/sun/star/lang/XInitialization.hpp>
37 #include <com/sun/star/lang/XServiceInfo.hpp>
38 #include <com/sun/star/beans/XPropertySet.hpp>
39 #include <com/sun/star/lang/XComponent.hpp>
40 #include <cppuhelper/implbase1.hxx>
41 #include <cppuhelper/implbase2.hxx>
42 #include <cppuhelper/implbase3.hxx>
43 #include <cppuhelper/implbase4.hxx>
44 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
45 #include <com/sun/star/beans/XPropertyAccess.hpp>
46 #include <comphelper/property.hxx>
47 #include <com/sun/star/task/XStatusIndicator.hpp>
49 #include <osl/diagnose.h>
50 #include <rtl/process.h>
51 #include <tools/debug.hxx>
52 #include <comphelper/processfactory.hxx>
53 #include <unotools/tempfile.hxx>
54 #include <unotools/localfilehelper.hxx>
55 #include <unotools/ucbstreamhelper.hxx>
56 #include <unotools/streamwrap.hxx>
58 using namespace ::rtl;
59 using namespace ::com::sun::star;
60 using namespace ::com::sun::star::uno;
61 using namespace ::com::sun::star::lang;
62 using namespace ::com::sun::star::beans;
63 using namespace ::com::sun::star::document;
64 using namespace ::com::sun::star::io;
66 // -------------
67 // - PDFFilter -
68 // -------------
70 class PDFFilter : public cppu::WeakImplHelper4 < XFilter,
71 XExporter,
72 XInitialization,
73 XServiceInfo >
75 private:
77 Reference< XMultiServiceFactory > mxMSF;
78 Reference< XComponent > mxSrcDoc;
80 sal_Bool implExport( const Sequence< PropertyValue >& rDescriptor );
82 protected:
84 // XFilter
85 virtual sal_Bool SAL_CALL filter( const Sequence< PropertyValue >& rDescriptor ) throw(RuntimeException);
86 virtual void SAL_CALL cancel( ) throw (RuntimeException);
88 // XExporter
89 virtual void SAL_CALL setSourceDocument( const Reference< XComponent >& xDoc ) throw(IllegalArgumentException, RuntimeException);
91 // XInitialization
92 virtual void SAL_CALL initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException);
94 // XServiceInfo
95 virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
96 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(RuntimeException);
97 virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
99 public:
101 PDFFilter( const Reference< XMultiServiceFactory >& rxMSF );
102 virtual ~PDFFilter();
105 // -----------------------------------------------------------------------------
107 OUString PDFFilter_getImplementationName ()
108 throw ( RuntimeException );
110 // -----------------------------------------------------------------------------
112 sal_Bool SAL_CALL PDFFilter_supportsService( const OUString& ServiceName )
113 throw ( RuntimeException );
115 // -----------------------------------------------------------------------------
117 Sequence< OUString > SAL_CALL PDFFilter_getSupportedServiceNames( )
118 throw ( RuntimeException );
120 // -----------------------------------------------------------------------------
122 Reference< XInterface >
123 SAL_CALL PDFFilter_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
124 throw ( Exception );
126 #endif // PDFFILTER_HXX