diff options
-rw-r--r-- | oox/source/shape/LockedCanvasContext.cxx | 40 | ||||
-rw-r--r-- | oox/source/shape/LockedCanvasContext.hxx | 12 |
2 files changed, 30 insertions, 22 deletions
diff --git a/oox/source/shape/LockedCanvasContext.cxx b/oox/source/shape/LockedCanvasContext.cxx index 2c9c92e2542d..f176e57a8389 100644 --- a/oox/source/shape/LockedCanvasContext.cxx +++ b/oox/source/shape/LockedCanvasContext.cxx @@ -12,10 +12,13 @@ using namespace com::sun::star; -namespace oox { namespace shape { +namespace oox +{ +namespace shape +{ -LockedCanvasContext::LockedCanvasContext( ContextHandler2Helper& rParent ) -: ContextHandler2( rParent ) +LockedCanvasContext::LockedCanvasContext(ContextHandler2Helper& rParent) + : ContextHandler2(rParent) { } @@ -28,9 +31,9 @@ oox::drawingml::ShapePtr LockedCanvasContext::getShape() return mpShape; } -::oox::core::ContextHandlerRef LockedCanvasContext::onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& /*rAttribs*/ ) +::oox::core::ContextHandlerRef LockedCanvasContext::onCreateContext(sal_Int32 aElementToken, const ::oox::AttributeList& /*rAttribs*/) { - switch( getBaseToken( aElementToken ) ) + switch (getBaseToken(aElementToken)) { case XML_lockedCanvas: break; @@ -39,19 +42,19 @@ oox::drawingml::ShapePtr LockedCanvasContext::getShape() case XML_grpSpPr: break; case XML_sp: - { - oox::drawingml::ShapePtr pMasterShape; - mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.CustomShape")); - mpShape->setLockedCanvas(true); - return new oox::drawingml::ShapeContext( *this, pMasterShape, mpShape ); - } + { + oox::drawingml::ShapePtr pMasterShape; + mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.CustomShape")); + mpShape->setLockedCanvas(true); + return new oox::drawingml::ShapeContext(*this, pMasterShape, mpShape); + } case XML_grpSp: - { - oox::drawingml::ShapePtr pMasterShape; - mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.GroupShape")); - mpShape->setLockedCanvas(true); - return new oox::drawingml::ShapeGroupContext( *this, pMasterShape, mpShape ); - } + { + oox::drawingml::ShapePtr pMasterShape; + mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.GroupShape")); + mpShape->setLockedCanvas(true); + return new oox::drawingml::ShapeGroupContext(*this, pMasterShape, mpShape); + } default: SAL_WARN("oox", "LockedCanvasContext::createFastChildContext: unhandled element:" << getBaseToken(aElementToken)); break; @@ -59,6 +62,7 @@ oox::drawingml::ShapePtr LockedCanvasContext::getShape() return 0; } -} } +} +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/shape/LockedCanvasContext.hxx b/oox/source/shape/LockedCanvasContext.hxx index 01b994b8b760..c57aa79ecc05 100644 --- a/oox/source/shape/LockedCanvasContext.hxx +++ b/oox/source/shape/LockedCanvasContext.hxx @@ -13,16 +13,19 @@ #include "oox/core/contexthandler2.hxx" #include "oox/drawingml/shape.hxx" -namespace oox { namespace shape { +namespace oox +{ +namespace shape +{ /// Locked canvas is kind of a container for drawingml shapes: it can even contain group shapes. class LockedCanvasContext : public oox::core::ContextHandler2 { public: - LockedCanvasContext( oox::core::ContextHandler2Helper& rParent ); + LockedCanvasContext(oox::core::ContextHandler2Helper& rParent); virtual ~LockedCanvasContext(); - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; + virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 Element, const ::oox::AttributeList& rAttribs) SAL_OVERRIDE; oox::drawingml::ShapePtr getShape(); @@ -32,7 +35,8 @@ protected: }; -} } +} +} #endif |