Branch data Line data Source code
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 : :
26 : : // =============================================================================
27 : : // XMLBasicExportFilter
28 : : // =============================================================================
29 : :
30 : 4 : XMLBasicExportFilter::XMLBasicExportFilter( const Reference< xml::sax::XDocumentHandler >& rxHandler )
31 : 4 : :m_xHandler( rxHandler )
32 : : {
33 : 4 : }
34 : :
35 : : // -----------------------------------------------------------------------------
36 : :
37 : 4 : XMLBasicExportFilter::~XMLBasicExportFilter()
38 : : {
39 [ - + ]: 8 : }
40 : :
41 : : // -----------------------------------------------------------------------------
42 : : // XDocumentHandler
43 : : // -----------------------------------------------------------------------------
44 : :
45 : 4 : void XMLBasicExportFilter::startDocument()
46 : : throw (xml::sax::SAXException, RuntimeException)
47 : : {
48 : : // do nothing, filter this
49 : 4 : }
50 : :
51 : : // -----------------------------------------------------------------------------
52 : :
53 : 4 : void XMLBasicExportFilter::endDocument()
54 : : throw (xml::sax::SAXException, RuntimeException)
55 : : {
56 : : // do nothing, filter this
57 : 4 : }
58 : :
59 : : // -----------------------------------------------------------------------------
60 : :
61 : 4 : void XMLBasicExportFilter::startElement( const ::rtl::OUString& aName,
62 : : const Reference< xml::sax::XAttributeList >& xAttribs )
63 : : throw (xml::sax::SAXException, RuntimeException)
64 : : {
65 [ + - ]: 4 : if ( m_xHandler.is() )
66 : 4 : m_xHandler->startElement( aName, xAttribs );
67 : 4 : }
68 : :
69 : : // -----------------------------------------------------------------------------
70 : :
71 : 4 : void XMLBasicExportFilter::endElement( const ::rtl::OUString& aName )
72 : : throw (xml::sax::SAXException, RuntimeException)
73 : : {
74 [ + - ]: 4 : if ( m_xHandler.is() )
75 : 4 : m_xHandler->endElement( aName );
76 : 4 : }
77 : :
78 : : // -----------------------------------------------------------------------------
79 : :
80 : 0 : void XMLBasicExportFilter::characters( const ::rtl::OUString& aChars )
81 : : throw (xml::sax::SAXException, RuntimeException)
82 : : {
83 [ # # ]: 0 : if ( m_xHandler.is() )
84 : 0 : m_xHandler->characters( aChars );
85 : 0 : }
86 : :
87 : : // -----------------------------------------------------------------------------
88 : :
89 : 8 : void XMLBasicExportFilter::ignorableWhitespace( const ::rtl::OUString& aWhitespaces )
90 : : throw (xml::sax::SAXException, RuntimeException)
91 : : {
92 [ + - ]: 8 : if ( m_xHandler.is() )
93 : 8 : m_xHandler->ignorableWhitespace( aWhitespaces );
94 : 8 : }
95 : :
96 : : // -----------------------------------------------------------------------------
97 : :
98 : 0 : void XMLBasicExportFilter::processingInstruction( const ::rtl::OUString& aTarget,
99 : : const ::rtl::OUString& aData )
100 : : throw (xml::sax::SAXException, RuntimeException)
101 : : {
102 [ # # ]: 0 : if ( m_xHandler.is() )
103 : 0 : m_xHandler->processingInstruction( aTarget, aData );
104 : 0 : }
105 : :
106 : : // -----------------------------------------------------------------------------
107 : :
108 : 0 : void XMLBasicExportFilter::setDocumentLocator( const Reference< xml::sax::XLocator >& xLocator )
109 : : throw (xml::sax::SAXException, RuntimeException)
110 : : {
111 [ # # ]: 0 : if ( m_xHandler.is() )
112 : 0 : m_xHandler->setDocumentLocator( xLocator );
113 : 0 : }
114 : :
115 : : // -----------------------------------------------------------------------------
116 : :
117 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|