LibreOffice Module oox (master)  1
extdrawingfragmenthandler.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  */
9 
11 
13 #include <oox/token/namespaces.hxx>
15 
16 using namespace ::oox::core;
17 using namespace ::com::sun::star::xml::sax;
18 using namespace ::com::sun::star::uno;
19 
20 namespace oox::ppt {
21 
23  const OUString& rFragmentPath,
24  const oox::ppt::SlidePersistPtr& rSlidePersistPtr,
25  const oox::ppt::ShapeLocation eShapeLocation,
26  oox::drawingml::ShapePtr const & pGroupShapePtr,
27  oox::drawingml::ShapePtr const & pShapePtr)
28  : FragmentHandler2( rFilter, rFragmentPath ),
29  mpSlidePersistPtr (rSlidePersistPtr ),
30  meShapeLocation( eShapeLocation ),
31  mpGroupShapePtr( pGroupShapePtr ),
32  mpShapePtr( pShapePtr )
33 {
34 }
35 
37 {
38  // Empty DrawingML fallback, need to warn the user at the end.
39  if (mpShapePtr && mpShapePtr->getChildren().empty())
40  getFilter().setMissingExtDrawing();
41 }
42 
45  const AttributeList& )
46 {
47  switch( aElement )
48  {
49  case DSP_TOKEN( drawing ):
50  break;
51  case DSP_TOKEN( spTree ):
52  return new PPTShapeGroupContext(
54  mpShapePtr );
55  default:
56  break;
57  }
58 
59  return this;
60 }
61 
62 }
63 
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~ExtDrawingFragmentHandler() noexcept override
exports com.sun.star. drawing
ExtDrawingFragmentHandler(oox::core::XmlFilterBase &rFilter, const OUString &rFragmentPath, const oox::ppt::SlidePersistPtr &rSlidePersistPtr, const oox::ppt::ShapeLocation eShapeLocation, oox::drawingml::ShapePtr const &pGroupShapePtr, oox::drawingml::ShapePtr const &pShapePtr)
const oox::ppt::SlidePersistPtr mpSlidePersistPtr
Provides access to attribute values of an element.
virtual ::oox::core::ContextHandlerRef onCreateContext(::sal_Int32 Element, const AttributeList &rAttribs) override
::rtl::Reference< ContextHandler > ContextHandlerRef
std::shared_ptr< SlidePersist > SlidePersistPtr
std::shared_ptr< Shape > ShapePtr
const oox::ppt::ShapeLocation meShapeLocation