fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / oox / source / shape / LockedCanvasContext.cxx
blob0f1e9b4c8af8cd65ae3cc987e00e590014ff3b43
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/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()
28 return mpShape;
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:
38 break;
39 case XML_nvGrpSpPr:
40 break;
41 case XML_grpSpPr:
42 break;
43 case XML_sp:
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 );
50 break;
51 case XML_grpSp:
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 );
58 break;
59 default:
60 SAL_WARN("oox", "LockedCanvasContext::createFastChildContext: unhandled element:" << getBaseToken(aElementToken));
61 break;
63 return xRet;
66 } }
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */