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 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 51 virtual void SAL_CALL endDocument(void) 52 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 53 virtual void SAL_CALL startElement(const ::rtl::OUString& aName, 54 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttribs) 55 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 56 virtual void SAL_CALL endElement(const ::rtl::OUString& aName) 57 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 58 virtual void SAL_CALL characters(const ::rtl::OUString& aChars) 59 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 60 virtual void SAL_CALL ignorableWhitespace(const ::rtl::OUString& aWhitespaces) 61 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 62 virtual void SAL_CALL processingInstruction(const ::rtl::OUString& aTarget, 63 const ::rtl::OUString& aData) 64 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 65 virtual void SAL_CALL setDocumentLocator(const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > & xLocator) 66 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 67 68 // ::com::sun::star::xml::sax::XExtendedDocumentHandler 69 virtual void SAL_CALL startCDATA(void) throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 70 virtual void SAL_CALL endCDATA(void) throw( ::com::sun::star::uno::RuntimeException ); 71 virtual void SAL_CALL comment(const ::rtl::OUString& sComment) 72 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 73 virtual void SAL_CALL allowLineBreak(void) 74 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 75 virtual void SAL_CALL unknown(const ::rtl::OUString& sString) 76 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException ); 77 78 // XInitialization 79 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); 80 81 // XServiceInfo 82 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); 83 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); 84 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); 85 86 }; 87 88 #endif // _XMLOFF_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX 89