LibreOffice Module xmloff (master)  1
XMLBasicExportFilter.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <XMLBasicExportFilter.hxx>
21 
22 using namespace ::com::sun::star;
23 using namespace ::com::sun::star::uno;
24 
25 // XMLBasicExportFilter
26 
28  :m_xHandler( rxHandler )
29 {
30 }
31 
33 {
34 }
35 
36 // XDocumentHandler
37 
39 {
40  // do nothing, filter this
41 }
42 
44 {
45  // do nothing, filter this
46 }
47 
48 void XMLBasicExportFilter::startElement( const OUString& aName,
49  const Reference< xml::sax::XAttributeList >& xAttribs )
50 {
51  if ( m_xHandler.is() )
52  m_xHandler->startElement( aName, xAttribs );
53 }
54 
55 void XMLBasicExportFilter::endElement( const OUString& aName )
56 {
57  if ( m_xHandler.is() )
58  m_xHandler->endElement( aName );
59 }
60 
61 void XMLBasicExportFilter::characters( const OUString& aChars )
62 {
63  if ( m_xHandler.is() )
64  m_xHandler->characters( aChars );
65 }
66 
67 void XMLBasicExportFilter::ignorableWhitespace( const OUString& aWhitespaces )
68 {
69  if ( m_xHandler.is() )
70  m_xHandler->ignorableWhitespace( aWhitespaces );
71 }
72 
73 void XMLBasicExportFilter::processingInstruction( const OUString& aTarget,
74  const OUString& aData )
75 {
76  if ( m_xHandler.is() )
77  m_xHandler->processingInstruction( aTarget, aData );
78 }
79 
80 void XMLBasicExportFilter::setDocumentLocator( const Reference< xml::sax::XLocator >& xLocator )
81 {
82  if ( m_xHandler.is() )
83  m_xHandler->setDocumentLocator( xLocator );
84 }
85 
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL endElement(const OUString &aName) override
virtual void SAL_CALL endDocument() override
virtual void SAL_CALL processingInstruction(const OUString &aTarget, const OUString &aData) override
uno::Reference< task::XInteractionHandler2 > m_xHandler
virtual void SAL_CALL characters(const OUString &aChars) override
css::uno::Reference< css::xml::sax::XDocumentHandler > m_xHandler
virtual void SAL_CALL setDocumentLocator(const css::uno::Reference< css::xml::sax::XLocator > &xLocator) override
virtual ~XMLBasicExportFilter() override
virtual void SAL_CALL ignorableWhitespace(const OUString &aWhitespaces) override
XMLBasicExportFilter(const css::uno::Reference< css::xml::sax::XDocumentHandler > &rxHandler)
virtual void SAL_CALL startDocument() override
virtual void SAL_CALL startElement(const OUString &aName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs) override