1*ca5ec200SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*ca5ec200SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*ca5ec200SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*ca5ec200SAndrew Rist * distributed with this work for additional information
6*ca5ec200SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*ca5ec200SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*ca5ec200SAndrew Rist * "License"); you may not use this file except in compliance
9*ca5ec200SAndrew Rist * with the License. You may obtain a copy of the License at
10*ca5ec200SAndrew Rist *
11*ca5ec200SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*ca5ec200SAndrew Rist *
13*ca5ec200SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*ca5ec200SAndrew Rist * software distributed under the License is distributed on an
15*ca5ec200SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ca5ec200SAndrew Rist * KIND, either express or implied. See the License for the
17*ca5ec200SAndrew Rist * specific language governing permissions and limitations
18*ca5ec200SAndrew Rist * under the License.
19*ca5ec200SAndrew Rist *
20*ca5ec200SAndrew Rist *************************************************************/
21*ca5ec200SAndrew Rist
22*ca5ec200SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir #include "oox/core/fragmenthandler2.hxx"
25cdf0e10cSrcweir
26cdf0e10cSrcweir namespace oox {
27cdf0e10cSrcweir namespace core {
28cdf0e10cSrcweir
29cdf0e10cSrcweir // ============================================================================
30cdf0e10cSrcweir
31cdf0e10cSrcweir using namespace ::com::sun::star::uno;
32cdf0e10cSrcweir using namespace ::com::sun::star::xml::sax;
33cdf0e10cSrcweir
34cdf0e10cSrcweir using ::rtl::OUString;
35cdf0e10cSrcweir
36cdf0e10cSrcweir // ============================================================================
37cdf0e10cSrcweir
FragmentHandler2(XmlFilterBase & rFilter,const OUString & rFragmentPath,bool bEnableTrimSpace)38cdf0e10cSrcweir FragmentHandler2::FragmentHandler2( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEnableTrimSpace ) :
39cdf0e10cSrcweir FragmentHandler( rFilter, rFragmentPath ),
40cdf0e10cSrcweir ContextHandler2Helper( bEnableTrimSpace )
41cdf0e10cSrcweir {
42cdf0e10cSrcweir }
43cdf0e10cSrcweir
~FragmentHandler2()44cdf0e10cSrcweir FragmentHandler2::~FragmentHandler2()
45cdf0e10cSrcweir {
46cdf0e10cSrcweir }
47cdf0e10cSrcweir
48cdf0e10cSrcweir // com.sun.star.xml.sax.XFastDocumentHandler interface --------------------
49cdf0e10cSrcweir
startDocument()50cdf0e10cSrcweir void SAL_CALL FragmentHandler2::startDocument() throw( SAXException, RuntimeException )
51cdf0e10cSrcweir {
52cdf0e10cSrcweir initializeImport();
53cdf0e10cSrcweir }
54cdf0e10cSrcweir
endDocument()55cdf0e10cSrcweir void SAL_CALL FragmentHandler2::endDocument() throw( SAXException, RuntimeException )
56cdf0e10cSrcweir {
57cdf0e10cSrcweir finalizeImport();
58cdf0e10cSrcweir }
59cdf0e10cSrcweir
60cdf0e10cSrcweir // com.sun.star.xml.sax.XFastContextHandler interface -------------------------
61cdf0e10cSrcweir
createFastChildContext(sal_Int32 nElement,const Reference<XFastAttributeList> & rxAttribs)62cdf0e10cSrcweir Reference< XFastContextHandler > SAL_CALL FragmentHandler2::createFastChildContext(
63cdf0e10cSrcweir sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs ) throw( SAXException, RuntimeException )
64cdf0e10cSrcweir {
65cdf0e10cSrcweir return implCreateChildContext( nElement, rxAttribs );
66cdf0e10cSrcweir }
67cdf0e10cSrcweir
startFastElement(sal_Int32 nElement,const Reference<XFastAttributeList> & rxAttribs)68cdf0e10cSrcweir void SAL_CALL FragmentHandler2::startFastElement(
69cdf0e10cSrcweir sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs ) throw( SAXException, RuntimeException )
70cdf0e10cSrcweir {
71cdf0e10cSrcweir implStartElement( nElement, rxAttribs );
72cdf0e10cSrcweir }
73cdf0e10cSrcweir
characters(const OUString & rChars)74cdf0e10cSrcweir void SAL_CALL FragmentHandler2::characters( const OUString& rChars ) throw( SAXException, RuntimeException )
75cdf0e10cSrcweir {
76cdf0e10cSrcweir implCharacters( rChars );
77cdf0e10cSrcweir }
78cdf0e10cSrcweir
endFastElement(sal_Int32 nElement)79cdf0e10cSrcweir void SAL_CALL FragmentHandler2::endFastElement( sal_Int32 nElement ) throw( SAXException, RuntimeException )
80cdf0e10cSrcweir {
81cdf0e10cSrcweir implEndElement( nElement );
82cdf0e10cSrcweir }
83cdf0e10cSrcweir
84cdf0e10cSrcweir // oox.core.ContextHandler interface ------------------------------------------
85cdf0e10cSrcweir
createRecordContext(sal_Int32 nRecId,SequenceInputStream & rStrm)86cdf0e10cSrcweir ContextHandlerRef FragmentHandler2::createRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
87cdf0e10cSrcweir {
88cdf0e10cSrcweir return implCreateRecordContext( nRecId, rStrm );
89cdf0e10cSrcweir }
90cdf0e10cSrcweir
startRecord(sal_Int32 nRecId,SequenceInputStream & rStrm)91cdf0e10cSrcweir void FragmentHandler2::startRecord( sal_Int32 nRecId, SequenceInputStream& rStrm )
92cdf0e10cSrcweir {
93cdf0e10cSrcweir implStartRecord( nRecId, rStrm );
94cdf0e10cSrcweir }
95cdf0e10cSrcweir
endRecord(sal_Int32 nRecId)96cdf0e10cSrcweir void FragmentHandler2::endRecord( sal_Int32 nRecId )
97cdf0e10cSrcweir {
98cdf0e10cSrcweir implEndRecord( nRecId );
99cdf0e10cSrcweir }
100cdf0e10cSrcweir
101cdf0e10cSrcweir // oox.core.ContextHandler2Helper interface -----------------------------------
102cdf0e10cSrcweir
onCreateContext(sal_Int32,const AttributeList &)103cdf0e10cSrcweir ContextHandlerRef FragmentHandler2::onCreateContext( sal_Int32, const AttributeList& )
104cdf0e10cSrcweir {
105cdf0e10cSrcweir return 0;
106cdf0e10cSrcweir }
107cdf0e10cSrcweir
onStartElement(const AttributeList &)108cdf0e10cSrcweir void FragmentHandler2::onStartElement( const AttributeList& )
109cdf0e10cSrcweir {
110cdf0e10cSrcweir }
111cdf0e10cSrcweir
onCharacters(const OUString &)112cdf0e10cSrcweir void FragmentHandler2::onCharacters( const OUString& )
113cdf0e10cSrcweir {
114cdf0e10cSrcweir }
115cdf0e10cSrcweir
onEndElement()116cdf0e10cSrcweir void FragmentHandler2::onEndElement()
117cdf0e10cSrcweir {
118cdf0e10cSrcweir }
119cdf0e10cSrcweir
onCreateRecordContext(sal_Int32,SequenceInputStream &)120cdf0e10cSrcweir ContextHandlerRef FragmentHandler2::onCreateRecordContext( sal_Int32, SequenceInputStream& )
121cdf0e10cSrcweir {
122cdf0e10cSrcweir return 0;
123cdf0e10cSrcweir }
124cdf0e10cSrcweir
onStartRecord(SequenceInputStream &)125cdf0e10cSrcweir void FragmentHandler2::onStartRecord( SequenceInputStream& )
126cdf0e10cSrcweir {
127cdf0e10cSrcweir }
128cdf0e10cSrcweir
onEndRecord()129cdf0e10cSrcweir void FragmentHandler2::onEndRecord()
130cdf0e10cSrcweir {
131cdf0e10cSrcweir }
132cdf0e10cSrcweir
133cdf0e10cSrcweir // oox.core.FragmentHandler2 interface ----------------------------------------
134cdf0e10cSrcweir
initializeImport()135cdf0e10cSrcweir void FragmentHandler2::initializeImport()
136cdf0e10cSrcweir {
137cdf0e10cSrcweir }
138cdf0e10cSrcweir
finalizeImport()139cdf0e10cSrcweir void FragmentHandler2::finalizeImport()
140cdf0e10cSrcweir {
141cdf0e10cSrcweir }
142cdf0e10cSrcweir
143cdf0e10cSrcweir // ============================================================================
144cdf0e10cSrcweir
145cdf0e10cSrcweir } // namespace core
146cdf0e10cSrcweir } // namespace oox
147