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#include <utility>
16
17using namespace ::oox::core;
18using namespace ::com::sun::star::xml::sax;
19using namespace ::com::sun::star::uno;
20
21namespace oox::ppt {
22
24 const OUString& rFragmentPath,
25 oox::ppt::SlidePersistPtr pSlidePersistPtr,
26 const oox::ppt::ShapeLocation eShapeLocation,
27 oox::drawingml::ShapePtr pGroupShapePtr,
29 : FragmentHandler2( rFilter, rFragmentPath ),
30 mpSlidePersistPtr (std::move(pSlidePersistPtr )),
31 meShapeLocation( eShapeLocation ),
32 mpGroupShapePtr(std::move( pGroupShapePtr )),
33 mpShapePtr(std::move( pShapePtr ))
34{
35}
36
38{
39 // Empty DrawingML fallback, need to warn the user at the end.
40 if (mpShapePtr && mpShapePtr->getChildren().empty())
41 getFilter().setMissingExtDrawing();
42}
43
46 const AttributeList& )
47{
48 switch( aElement )
49 {
50 case DSP_TOKEN( drawing ):
51 break;
52 case DSP_TOKEN( spTree ):
53 return new PPTShapeGroupContext(
55 mpShapePtr );
56 default:
57 break;
58 }
59
60 return this;
61}
62
63}
64
65/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Provides access to attribute values of an element.
const oox::ppt::ShapeLocation meShapeLocation
const oox::ppt::SlidePersistPtr mpSlidePersistPtr
ExtDrawingFragmentHandler(oox::core::XmlFilterBase &rFilter, const OUString &rFragmentPath, oox::ppt::SlidePersistPtr pSlidePersistPtr, const oox::ppt::ShapeLocation eShapeLocation, oox::drawingml::ShapePtr pGroupShapePtr, oox::drawingml::ShapePtr pShapePtr)
virtual ::oox::core::ContextHandlerRef onCreateContext(::sal_Int32 Element, const AttributeList &rAttribs) override
virtual ~ExtDrawingFragmentHandler() noexcept override
::rtl::Reference< ContextHandler > ContextHandlerRef
std::shared_ptr< Shape > ShapePtr
std::shared_ptr< SlidePersist > SlidePersistPtr