Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / oox / source / core / fragmenthandler.cxx
blobc3b8c9243832030d1d9993a66045a0a448190151
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/fragmenthandler.hxx>
22 #include <oox/core/xmlfilterbase.hxx>
24 namespace oox {
25 namespace core {
27 using namespace ::com::sun::star::io;
28 using namespace ::com::sun::star::uno;
29 using namespace ::com::sun::star::xml::sax;
31 FragmentBaseData::FragmentBaseData( XmlFilterBase& rFilter, const OUString& rFragmentPath, RelationsRef const & xRelations ) :
32 mrFilter( rFilter ),
33 maFragmentPath( rFragmentPath ),
34 mxRelations( xRelations )
38 FragmentHandler::FragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath ) :
39 FragmentHandler_BASE( std::make_shared<FragmentBaseData>( rFilter, rFragmentPath, rFilter.importRelations( rFragmentPath ) ) )
43 FragmentHandler::FragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, RelationsRef xRelations ) :
44 FragmentHandler_BASE( std::make_shared<FragmentBaseData>( rFilter, rFragmentPath, xRelations ) )
48 FragmentHandler::~FragmentHandler()
52 // com.sun.star.xml.sax.XFastDocumentHandler interface ------------------------
54 void FragmentHandler::startDocument()
58 void FragmentHandler::endDocument()
62 void FragmentHandler::processingInstruction( const OUString& /*rTarget*/, const OUString& /*rData*/ )
66 void FragmentHandler::setDocumentLocator( const Reference< XLocator >& rxLocator )
68 implSetLocator( rxLocator );
71 // com.sun.star.xml.sax.XFastContextHandler interface -------------------------
73 void FragmentHandler::startFastElement( sal_Int32, const Reference< XFastAttributeList >& )
77 void FragmentHandler::startUnknownElement( const OUString&, const OUString&, const Reference< XFastAttributeList >& )
81 void FragmentHandler::endFastElement( sal_Int32 )
85 void FragmentHandler::endUnknownElement( const OUString&, const OUString& )
89 Reference< XFastContextHandler > FragmentHandler::createFastChildContext( sal_Int32, const Reference< XFastAttributeList >& )
91 return nullptr;
94 Reference< XFastContextHandler > FragmentHandler::createUnknownChildContext( const OUString&, const OUString&, const Reference< XFastAttributeList >& )
96 return nullptr;
99 void FragmentHandler::characters( const OUString& )
103 // XML stream handling --------------------------------------------------------
105 Reference< XInputStream > FragmentHandler::openFragmentStream() const
107 return getFilter().openInputStream( getFragmentPath() );
110 // binary records -------------------------------------------------------------
112 const RecordInfo* FragmentHandler::getRecordInfos() const
114 // default: no support for binary records
115 return nullptr;
118 } // namespace core
119 } // namespace oox
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */