1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #include "oox/core/fragmenthandler2.hxx"
29 
30 namespace oox {
31 namespace core {
32 
33 // ============================================================================
34 
35 using namespace ::com::sun::star::uno;
36 using namespace ::com::sun::star::xml::sax;
37 
38 using ::rtl::OUString;
39 
40 // ============================================================================
41 
42 FragmentHandler2::FragmentHandler2( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEnableTrimSpace ) :
43     FragmentHandler( rFilter, rFragmentPath ),
44     ContextHandler2Helper( bEnableTrimSpace )
45 {
46 }
47 
48 FragmentHandler2::~FragmentHandler2()
49 {
50 }
51 
52 // com.sun.star.xml.sax.XFastDocumentHandler interface --------------------
53 
54 void SAL_CALL FragmentHandler2::startDocument() throw( SAXException, RuntimeException )
55 {
56     initializeImport();
57 }
58 
59 void SAL_CALL FragmentHandler2::endDocument() throw( SAXException, RuntimeException )
60 {
61     finalizeImport();
62 }
63 
64 // com.sun.star.xml.sax.XFastContextHandler interface -------------------------
65 
66 Reference< XFastContextHandler > SAL_CALL FragmentHandler2::createFastChildContext(
67         sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs ) throw( SAXException, RuntimeException )
68 {
69     return implCreateChildContext( nElement, rxAttribs );
70 }
71 
72 void SAL_CALL FragmentHandler2::startFastElement(
73         sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs ) throw( SAXException, RuntimeException )
74 {
75     implStartElement( nElement, rxAttribs );
76 }
77 
78 void SAL_CALL FragmentHandler2::characters( const OUString& rChars ) throw( SAXException, RuntimeException )
79 {
80     implCharacters( rChars );
81 }
82 
83 void SAL_CALL FragmentHandler2::endFastElement( sal_Int32 nElement ) throw( SAXException, RuntimeException )
84 {
85     implEndElement( nElement );
86 }
87 
88 // oox.core.ContextHandler interface ------------------------------------------
89 
90 ContextHandlerRef FragmentHandler2::createRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
91 {
92     return implCreateRecordContext( nRecId, rStrm );
93 }
94 
95 void FragmentHandler2::startRecord( sal_Int32 nRecId, SequenceInputStream& rStrm )
96 {
97     implStartRecord( nRecId, rStrm );
98 }
99 
100 void FragmentHandler2::endRecord( sal_Int32 nRecId )
101 {
102     implEndRecord( nRecId );
103 }
104 
105 // oox.core.ContextHandler2Helper interface -----------------------------------
106 
107 ContextHandlerRef FragmentHandler2::onCreateContext( sal_Int32, const AttributeList& )
108 {
109     return 0;
110 }
111 
112 void FragmentHandler2::onStartElement( const AttributeList& )
113 {
114 }
115 
116 void FragmentHandler2::onCharacters( const OUString& )
117 {
118 }
119 
120 void FragmentHandler2::onEndElement()
121 {
122 }
123 
124 ContextHandlerRef FragmentHandler2::onCreateRecordContext( sal_Int32, SequenceInputStream& )
125 {
126     return 0;
127 }
128 
129 void FragmentHandler2::onStartRecord( SequenceInputStream& )
130 {
131 }
132 
133 void FragmentHandler2::onEndRecord()
134 {
135 }
136 
137 // oox.core.FragmentHandler2 interface ----------------------------------------
138 
139 void FragmentHandler2::initializeImport()
140 {
141 }
142 
143 void FragmentHandler2::finalizeImport()
144 {
145 }
146 
147 // ============================================================================
148 
149 } // namespace core
150 } // namespace oox
151