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 #include "oox/core/fragmenthandler2.hxx"
25 
26 namespace oox {
27 namespace core {
28 
29 // ============================================================================
30 
31 using namespace ::com::sun::star::uno;
32 using namespace ::com::sun::star::xml::sax;
33 
34 using ::rtl::OUString;
35 
36 // ============================================================================
37 
FragmentHandler2(XmlFilterBase & rFilter,const OUString & rFragmentPath,bool bEnableTrimSpace)38 FragmentHandler2::FragmentHandler2( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEnableTrimSpace ) :
39     FragmentHandler( rFilter, rFragmentPath ),
40     ContextHandler2Helper( bEnableTrimSpace )
41 {
42 }
43 
~FragmentHandler2()44 FragmentHandler2::~FragmentHandler2()
45 {
46 }
47 
48 // com.sun.star.xml.sax.XFastDocumentHandler interface --------------------
49 
startDocument()50 void SAL_CALL FragmentHandler2::startDocument() throw( SAXException, RuntimeException )
51 {
52     initializeImport();
53 }
54 
endDocument()55 void SAL_CALL FragmentHandler2::endDocument() throw( SAXException, RuntimeException )
56 {
57     finalizeImport();
58 }
59 
60 // com.sun.star.xml.sax.XFastContextHandler interface -------------------------
61 
createFastChildContext(sal_Int32 nElement,const Reference<XFastAttributeList> & rxAttribs)62 Reference< XFastContextHandler > SAL_CALL FragmentHandler2::createFastChildContext(
63         sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs ) throw( SAXException, RuntimeException )
64 {
65     return implCreateChildContext( nElement, rxAttribs );
66 }
67 
startFastElement(sal_Int32 nElement,const Reference<XFastAttributeList> & rxAttribs)68 void SAL_CALL FragmentHandler2::startFastElement(
69         sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs ) throw( SAXException, RuntimeException )
70 {
71     implStartElement( nElement, rxAttribs );
72 }
73 
characters(const OUString & rChars)74 void SAL_CALL FragmentHandler2::characters( const OUString& rChars ) throw( SAXException, RuntimeException )
75 {
76     implCharacters( rChars );
77 }
78 
endFastElement(sal_Int32 nElement)79 void SAL_CALL FragmentHandler2::endFastElement( sal_Int32 nElement ) throw( SAXException, RuntimeException )
80 {
81     implEndElement( nElement );
82 }
83 
84 // oox.core.ContextHandler interface ------------------------------------------
85 
createRecordContext(sal_Int32 nRecId,SequenceInputStream & rStrm)86 ContextHandlerRef FragmentHandler2::createRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
87 {
88     return implCreateRecordContext( nRecId, rStrm );
89 }
90 
startRecord(sal_Int32 nRecId,SequenceInputStream & rStrm)91 void FragmentHandler2::startRecord( sal_Int32 nRecId, SequenceInputStream& rStrm )
92 {
93     implStartRecord( nRecId, rStrm );
94 }
95 
endRecord(sal_Int32 nRecId)96 void FragmentHandler2::endRecord( sal_Int32 nRecId )
97 {
98     implEndRecord( nRecId );
99 }
100 
101 // oox.core.ContextHandler2Helper interface -----------------------------------
102 
onCreateContext(sal_Int32,const AttributeList &)103 ContextHandlerRef FragmentHandler2::onCreateContext( sal_Int32, const AttributeList& )
104 {
105     return 0;
106 }
107 
onStartElement(const AttributeList &)108 void FragmentHandler2::onStartElement( const AttributeList& )
109 {
110 }
111 
onCharacters(const OUString &)112 void FragmentHandler2::onCharacters( const OUString& )
113 {
114 }
115 
onEndElement()116 void FragmentHandler2::onEndElement()
117 {
118 }
119 
onCreateRecordContext(sal_Int32,SequenceInputStream &)120 ContextHandlerRef FragmentHandler2::onCreateRecordContext( sal_Int32, SequenceInputStream& )
121 {
122     return 0;
123 }
124 
onStartRecord(SequenceInputStream &)125 void FragmentHandler2::onStartRecord( SequenceInputStream& )
126 {
127 }
128 
onEndRecord()129 void FragmentHandler2::onEndRecord()
130 {
131 }
132 
133 // oox.core.FragmentHandler2 interface ----------------------------------------
134 
initializeImport()135 void FragmentHandler2::initializeImport()
136 {
137 }
138 
finalizeImport()139 void FragmentHandler2::finalizeImport()
140 {
141 }
142 
143 // ============================================================================
144 
145 } // namespace core
146 } // namespace oox
147