xref: /aoo42x/main/oox/source/core/contexthandler.cxx (revision ca5ec200)
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/contexthandler.hxx"
25 
26 #include "oox/core/fragmenthandler.hxx"
27 
28 namespace oox {
29 namespace core {
30 
31 // ============================================================================
32 
33 using namespace ::com::sun::star::uno;
34 using namespace ::com::sun::star::xml::sax;
35 
36 using ::rtl::OUString;
37 
38 // ============================================================================
39 
ContextHandler(ContextHandler & rParent)40 ContextHandler::ContextHandler( ContextHandler& rParent ) :
41     ContextHandler_BASE(),
42     mxBaseData( rParent.mxBaseData )
43 {
44 }
45 
ContextHandler(const FragmentBaseDataRef & rxBaseData)46 ContextHandler::ContextHandler( const FragmentBaseDataRef& rxBaseData ) :
47     mxBaseData( rxBaseData )
48 {
49 }
50 
~ContextHandler()51 ContextHandler::~ContextHandler()
52 {
53 }
54 
getFilter() const55 XmlFilterBase& ContextHandler::getFilter() const
56 {
57     return mxBaseData->mrFilter;
58 }
59 
getRelations() const60 const Relations& ContextHandler::getRelations() const
61 {
62     return *mxBaseData->mxRelations;
63 }
64 
getFragmentPath() const65 const OUString& ContextHandler::getFragmentPath() const
66 {
67     return mxBaseData->maFragmentPath;
68 }
69 
getFragmentPathFromRelation(const Relation & rRelation) const70 OUString ContextHandler::getFragmentPathFromRelation( const Relation& rRelation ) const
71 {
72     return mxBaseData->mxRelations->getFragmentPathFromRelation( rRelation );
73 }
74 
getFragmentPathFromRelId(const OUString & rRelId) const75 OUString ContextHandler::getFragmentPathFromRelId( const OUString& rRelId ) const
76 {
77     return mxBaseData->mxRelations->getFragmentPathFromRelId( rRelId );
78 }
79 
getFragmentPathFromFirstType(const OUString & rType) const80 OUString ContextHandler::getFragmentPathFromFirstType( const OUString& rType ) const
81 {
82     return mxBaseData->mxRelations->getFragmentPathFromFirstType( rType );
83 }
84 
implSetLocator(const Reference<XLocator> & rxLocator)85 void ContextHandler::implSetLocator( const Reference< XLocator >& rxLocator )
86 {
87     mxBaseData->mxLocator = rxLocator;
88 }
89 
90 // com.sun.star.xml.sax.XFastContextHandler interface -------------------------
91 
startFastElement(sal_Int32,const Reference<XFastAttributeList> &)92 void ContextHandler::startFastElement( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException )
93 {
94 }
95 
startUnknownElement(const OUString &,const OUString &,const Reference<XFastAttributeList> &)96 void ContextHandler::startUnknownElement( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException )
97 {
98 }
99 
endFastElement(sal_Int32)100 void ContextHandler::endFastElement( sal_Int32 ) throw( SAXException, RuntimeException )
101 {
102 }
103 
endUnknownElement(const OUString &,const OUString &)104 void ContextHandler::endUnknownElement( const OUString&, const OUString& ) throw( SAXException, RuntimeException )
105 {
106 }
107 
createFastChildContext(sal_Int32,const Reference<XFastAttributeList> &)108 Reference< XFastContextHandler > ContextHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException )
109 {
110     return 0;
111 }
112 
createUnknownChildContext(const OUString &,const OUString &,const Reference<XFastAttributeList> &)113 Reference< XFastContextHandler > ContextHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException )
114 {
115     return 0;
116 }
117 
characters(const OUString &)118 void ContextHandler::characters( const OUString& ) throw( SAXException, RuntimeException )
119 {
120 }
121 
ignorableWhitespace(const OUString &)122 void ContextHandler::ignorableWhitespace( const OUString& ) throw( SAXException, RuntimeException )
123 {
124 }
125 
processingInstruction(const OUString &,const OUString &)126 void ContextHandler::processingInstruction( const OUString&, const OUString& ) throw( SAXException, RuntimeException )
127 {
128 }
129 
130 // record context interface ---------------------------------------------------
131 
createRecordContext(sal_Int32,SequenceInputStream &)132 ContextHandlerRef ContextHandler::createRecordContext( sal_Int32, SequenceInputStream& )
133 {
134     return 0;
135 }
136 
startRecord(sal_Int32,SequenceInputStream &)137 void ContextHandler::startRecord( sal_Int32, SequenceInputStream& )
138 {
139 }
140 
endRecord(sal_Int32)141 void ContextHandler::endRecord( sal_Int32 )
142 {
143 }
144 
145 // ============================================================================
146 
147 } // namespace core
148 } // namespace oox
149