SmartArt: text alignment
[LibreOffice.git] / oox / source / shape / LockedCanvasContext.cxx
blobadd56c4b09b14fa4ba31e99618014cbcb4afac11
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 "LockedCanvasContext.hxx"
11 #include <oox/drawingml/shapecontext.hxx>
12 #include <oox/drawingml/shapegroupcontext.hxx>
13 #include <oox/token/namespaces.hxx>
14 #include <oox/token/tokens.hxx>
16 using namespace com::sun::star;
18 namespace oox
20 namespace shape
23 LockedCanvasContext::LockedCanvasContext(ContextHandler2Helper& rParent)
24 : ContextHandler2(rParent)
28 LockedCanvasContext::~LockedCanvasContext() = default;
30 ::oox::core::ContextHandlerRef LockedCanvasContext::onCreateContext(sal_Int32 nElementToken, const ::oox::AttributeList& /*rAttribs*/)
32 switch (getBaseToken(nElementToken))
34 case XML_lockedCanvas:
35 break;
36 case XML_nvGrpSpPr:
37 break;
38 case XML_grpSpPr:
39 break;
40 case XML_sp:
42 oox::drawingml::ShapePtr pMasterShape;
43 mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.CustomShape"));
44 mpShape->setLockedCanvas(true);
45 return new oox::drawingml::ShapeContext(*this, pMasterShape, mpShape);
47 case XML_grpSp:
49 oox::drawingml::ShapePtr pMasterShape;
50 mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.GroupShape"));
51 mpShape->setLockedCanvas(true);
52 return new oox::drawingml::ShapeGroupContext(*this, pMasterShape, mpShape);
54 default:
55 SAL_WARN("oox", "LockedCanvasContext::createFastChildContext: unhandled element:" << getBaseToken(nElementToken));
56 break;
58 return nullptr;
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */