Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / oox / source / core / contexthandler.cxx
blob082200aa054aedae334dfc0302f63326132536cf
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>
23 #include <utility>
25 namespace oox::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(rParent),
32 mxBaseData( rParent.mxBaseData )
36 ContextHandler::ContextHandler( FragmentBaseDataRef xBaseData ) :
37 mxBaseData(std::move( xBaseData ))
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( std::u16string_view rType ) const
72 return mxBaseData->mxRelations->getFragmentPathFromFirstType( rType );
75 OUString ContextHandler::getFragmentPathFromFirstTypeFromOfficeDoc( std::u16string_view rType )
76 const
78 return mxBaseData->mxRelations->getFragmentPathFromFirstTypeFromOfficeDoc( rType );
81 void ContextHandler::implSetLocator( const Reference< XLocator >& rxLocator )
83 mxBaseData->mxLocator = rxLocator;
86 // com.sun.star.xml.sax.XFastContextHandler interface -------------------------
88 void ContextHandler::startFastElement( sal_Int32, const Reference< XFastAttributeList >& )
92 void ContextHandler::startUnknownElement( const OUString&, const OUString&, const Reference< XFastAttributeList >& )
96 void ContextHandler::endFastElement( sal_Int32 )
100 void ContextHandler::endUnknownElement( const OUString&, const OUString& )
104 Reference< XFastContextHandler > ContextHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& )
106 return nullptr;
109 Reference< XFastContextHandler > ContextHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& )
111 return nullptr;
114 void ContextHandler::characters( const OUString& )
118 // record context interface ---------------------------------------------------
120 ContextHandlerRef ContextHandler::createRecordContext( sal_Int32, SequenceInputStream& )
122 return nullptr;
125 void ContextHandler::startRecord( sal_Int32, SequenceInputStream& )
129 void ContextHandler::endRecord( sal_Int32 )
133 } // namespace oox::core
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */