xref: /trunk/main/xmloff/inc/xmloff/XMLEmbeddedObjectExportFilter.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 _XMLOFF_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX
25 #define _XMLOFF_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX
26 
27 #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
28 #include <com/sun/star/lang/XInitialization.hpp>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include <cppuhelper/implbase3.hxx>
31 
32 class XMLEmbeddedObjectExportFilter : public ::cppu::WeakImplHelper3<
33              ::com::sun::star::xml::sax::XExtendedDocumentHandler,
34              ::com::sun::star::lang::XServiceInfo,
35              ::com::sun::star::lang::XInitialization>
36 {
37     ::com::sun::star::uno::Reference<
38         ::com::sun::star::xml::sax::XDocumentHandler > xHandler;
39     ::com::sun::star::uno::Reference<
40         ::com::sun::star::xml::sax::XExtendedDocumentHandler > xExtHandler;
41 
42 public:
43     XMLEmbeddedObjectExportFilter() throw();
44     XMLEmbeddedObjectExportFilter( const ::com::sun::star::uno::Reference<
45         ::com::sun::star::xml::sax::XDocumentHandler > & rHandler ) throw();
46     virtual ~XMLEmbeddedObjectExportFilter () throw();
47 
48     // ::com::sun::star::xml::sax::XDocumentHandler
49     virtual void SAL_CALL startDocument(void);
50     virtual void SAL_CALL endDocument(void);
51     virtual void SAL_CALL startElement(const ::rtl::OUString& aName,
52                               const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttribs);
53     virtual void SAL_CALL endElement(const ::rtl::OUString& aName);
54     virtual void SAL_CALL characters(const ::rtl::OUString& aChars);
55     virtual void SAL_CALL ignorableWhitespace(const ::rtl::OUString& aWhitespaces);
56     virtual void SAL_CALL processingInstruction(const ::rtl::OUString& aTarget,
57                                        const ::rtl::OUString& aData);
58     virtual void SAL_CALL setDocumentLocator(const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > & xLocator);
59 
60     // ::com::sun::star::xml::sax::XExtendedDocumentHandler
61     virtual void SAL_CALL startCDATA(void);
62     virtual void SAL_CALL endCDATA(void);
63     virtual void SAL_CALL comment(const ::rtl::OUString& sComment);
64     virtual void SAL_CALL allowLineBreak(void);
65     virtual void SAL_CALL unknown(const ::rtl::OUString& sString);
66 
67     // XInitialization
68     virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments );
69 
70     // XServiceInfo
71     virtual ::rtl::OUString SAL_CALL getImplementationName(  );
72     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName );
73     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  );
74 
75 };
76 
77 #endif  //  _XMLOFF_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX
78