bump product version to 6.3.0.0.beta1
[LibreOffice.git] / oox / source / ppt / extdrawingfragmenthandler.cxx
blobcf8d8e50ed3c50af3c5cbd58af05a5bc94221add
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/.
8 */
10 #include "extdrawingfragmenthandler.hxx"
12 #include <oox/token/namespaces.hxx>
13 #include <oox/token/tokens.hxx>
14 #include <oox/core/xmlfilterbase.hxx>
16 using namespace ::oox::core;
17 using namespace ::com::sun::star::xml::sax;
18 using namespace ::com::sun::star::uno;
20 namespace oox { namespace ppt {
22 ExtDrawingFragmentHandler::ExtDrawingFragmentHandler( XmlFilterBase& rFilter,
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 )
36 ExtDrawingFragmentHandler::~ExtDrawingFragmentHandler( ) throw ()
38 // Empty DrawingML fallback, need to warn the user at the end.
39 if (mpShapePtr && mpShapePtr->getChildren().empty())
40 getFilter().setMissingExtDrawing();
43 ContextHandlerRef
44 ExtDrawingFragmentHandler::onCreateContext( ::sal_Int32 aElement,
45 const AttributeList& )
47 switch( aElement )
49 case DSP_TOKEN( drawing ):
50 break;
51 case DSP_TOKEN( spTree ):
52 return new PPTShapeGroupContext(
53 *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr,
54 mpShapePtr );
55 default:
56 break;
59 return this;
62 } }
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */