Branch libreoffice-5-0-4
[LibreOffice.git] / oox / source / core / contexthandler.cxx
blob80986314d6a69dc6facd67a652bfc3a348a6c40e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "oox/core/contexthandler.hxx"
22 #include "oox/core/fragmenthandler.hxx"
24 namespace oox {
25 namespace core {
27 using namespace ::com::sun::star::uno;
28 using namespace ::com::sun::star::xml::sax;
30 ContextHandler::ContextHandler( const ContextHandler& rParent ) :
31 ContextHandler_BASE(),
32 mxBaseData( rParent.mxBaseData )
36 ContextHandler::ContextHandler( const FragmentBaseDataRef& rxBaseData ) :
37 mxBaseData( rxBaseData )
41 ContextHandler::~ContextHandler()
45 XmlFilterBase& ContextHandler::getFilter() const
47 return mxBaseData->mrFilter;
50 const Relations& ContextHandler::getRelations() const
52 return *mxBaseData->mxRelations;
55 const OUString& ContextHandler::getFragmentPath() const
57 return mxBaseData->maFragmentPath;
60 OUString ContextHandler::getFragmentPathFromRelation( const Relation& rRelation ) const
62 return mxBaseData->mxRelations->getFragmentPathFromRelation( rRelation );
65 OUString ContextHandler::getFragmentPathFromRelId( const OUString& rRelId ) const
67 return mxBaseData->mxRelations->getFragmentPathFromRelId( rRelId );
70 OUString ContextHandler::getFragmentPathFromFirstType( const OUString& rType ) const
72 return mxBaseData->mxRelations->getFragmentPathFromFirstType( rType );
75 OUString ContextHandler::getFragmentPathFromFirstTypeFromOfficeDoc( const OUString& rType ) const
77 return mxBaseData->mxRelations->getFragmentPathFromFirstTypeFromOfficeDoc( rType );
80 void ContextHandler::implSetLocator( const Reference< XLocator >& rxLocator )
82 mxBaseData->mxLocator = rxLocator;
85 // com.sun.star.xml.sax.XFastContextHandler interface -------------------------
87 void ContextHandler::startFastElement( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception )
91 void ContextHandler::startUnknownElement( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception )
95 void ContextHandler::endFastElement( sal_Int32 ) throw( SAXException, RuntimeException, std::exception )
99 void ContextHandler::endUnknownElement( const OUString&, const OUString& ) throw( SAXException, RuntimeException, std::exception )
103 Reference< XFastContextHandler > ContextHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception )
105 return 0;
108 Reference< XFastContextHandler > ContextHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& ) throw( SAXException, RuntimeException, std::exception )
110 return 0;
113 void ContextHandler::characters( const OUString& ) throw( SAXException, RuntimeException, std::exception )
117 void ContextHandler::ignorableWhitespace( const OUString& ) throw( SAXException, RuntimeException )
121 void ContextHandler::processingInstruction( const OUString&, const OUString& ) throw( SAXException, RuntimeException )
125 // record context interface ---------------------------------------------------
127 ContextHandlerRef ContextHandler::createRecordContext( sal_Int32, SequenceInputStream& )
129 return 0;
132 void ContextHandler::startRecord( sal_Int32, SequenceInputStream& )
136 void ContextHandler::endRecord( sal_Int32 )
140 } // namespace core
141 } // namespace oox
143 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */