merge the formfield patch from ooo-build
[ooovba.git] / writerfilter / source / filter / WriterFilter.hxx
blob6168467027e9ba7cffa505bbe7c642a3f8dfde8e
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: WriterFilter.hxx,v $
10 * $Revision: 1.5 $
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 _WRITERFILTER_HXX
32 #define _WRITERFILTER_HXX
34 #include <com/sun/star/document/XFilter.hpp>
35 #include <com/sun/star/document/XImporter.hpp>
36 #include <com/sun/star/document/XExporter.hpp>
37 #include <com/sun/star/lang/XInitialization.hpp>
38 #include <com/sun/star/lang/XServiceInfo.hpp>
39 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
40 #include <cppuhelper/implbase5.hxx>
41 #include <WriterFilterDllApi.hxx>
43 class WRITERFILTER_DLLPUBLIC WriterFilter : public cppu::WeakImplHelper5
45 com::sun::star::document::XFilter,
46 com::sun::star::document::XImporter,
47 com::sun::star::document::XExporter,
48 com::sun::star::lang::XInitialization,
49 com::sun::star::lang::XServiceInfo
53 protected:
54 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
55 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xSrcDoc, m_xDstDoc;
56 ::rtl::OUString m_sFilterName;
57 ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xHandler;
60 public:
61 WriterFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext);
62 virtual ~WriterFilter();
64 // XFilter
65 virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
66 throw (::com::sun::star::uno::RuntimeException);
67 virtual void SAL_CALL cancel( )
68 throw (::com::sun::star::uno::RuntimeException);
70 // XImporter
71 virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
72 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
74 // XExporter
75 virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
76 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
78 // XInitialization
79 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
80 throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
82 // XServiceInfo
83 virtual ::rtl::OUString SAL_CALL getImplementationName( )
84 throw (::com::sun::star::uno::RuntimeException);
85 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
86 throw (::com::sun::star::uno::RuntimeException);
87 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
88 throw (::com::sun::star::uno::RuntimeException);
93 ::rtl::OUString WriterFilter_getImplementationName()
94 throw ( ::com::sun::star::uno::RuntimeException );
96 sal_Bool SAL_CALL WriterFilter_supportsService( const ::rtl::OUString& ServiceName )
97 throw ( ::com::sun::star::uno::RuntimeException );
99 ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL WriterFilter_getSupportedServiceNames( )
100 throw ( ::com::sun::star::uno::RuntimeException );
102 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL WriterFilter_createInstance(
103 const ::com::sun::star::uno::Reference<
104 ::com::sun::star::uno::XComponentContext > &xContext)
105 throw( ::com::sun::star::uno::Exception );
106 #endif