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