1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #include "LockedCanvasContext.hxx"
11 #include <oox/drawingml/shapegroupcontext.hxx>
13 using namespace com::sun::star
;
15 namespace oox
{ namespace shape
{
17 LockedCanvasContext::LockedCanvasContext( ContextHandler
& rParent
)
18 : ContextHandler( rParent
)
22 LockedCanvasContext::~LockedCanvasContext()
26 oox::drawingml::ShapePtr
LockedCanvasContext::getShape()
31 uno::Reference
< xml::sax::XFastContextHandler
> LockedCanvasContext::createFastChildContext( sal_Int32 aElementToken
, const uno::Reference
< xml::sax::XFastAttributeList
>& /*xAttribs*/ ) throw (xml::sax::SAXException
, uno::RuntimeException
)
33 uno::Reference
< xml::sax::XFastContextHandler
> xRet
;
35 switch( getBaseToken( aElementToken
) )
37 case XML_lockedCanvas
:
45 oox::drawingml::ShapePtr pMasterShape
;
46 mpShape
.reset(new oox::drawingml::Shape("com.sun.star.drawing.CustomShape"));
47 mpShape
->setLockedCanvas(true);
48 xRet
= new oox::drawingml::ShapeContext( *this, pMasterShape
, mpShape
);
53 oox::drawingml::ShapePtr pMasterShape
;
54 mpShape
.reset(new oox::drawingml::Shape("com.sun.star.drawing.GroupShape"));
55 mpShape
->setLockedCanvas(true);
56 xRet
= new oox::drawingml::ShapeGroupContext( *this, pMasterShape
, mpShape
);
60 SAL_WARN("oox", "LockedCanvasContext::createFastChildContext: unhandled element:" << getBaseToken(aElementToken
));
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */