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
;
20 LockedCanvasContext::LockedCanvasContext(ContextHandler2Helper
& rParent
)
21 : ContextHandler2(rParent
)
25 LockedCanvasContext::~LockedCanvasContext()
29 ::oox::core::ContextHandlerRef
LockedCanvasContext::onCreateContext(sal_Int32 aElementToken
, const ::oox::AttributeList
& /*rAttribs*/)
31 switch (getBaseToken(aElementToken
))
33 case XML_lockedCanvas
:
41 oox::drawingml::ShapePtr pMasterShape
;
42 mpShape
.reset(new oox::drawingml::Shape("com.sun.star.drawing.CustomShape"));
43 mpShape
->setLockedCanvas(true);
44 return new oox::drawingml::ShapeContext(*this, pMasterShape
, mpShape
);
48 oox::drawingml::ShapePtr pMasterShape
;
49 mpShape
.reset(new oox::drawingml::Shape("com.sun.star.drawing.GroupShape"));
50 mpShape
->setLockedCanvas(true);
51 return new oox::drawingml::ShapeGroupContext(*this, pMasterShape
, mpShape
);
54 SAL_WARN("oox", "LockedCanvasContext::createFastChildContext: unhandled element:" << getBaseToken(aElementToken
));
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */