diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-06-20 20:30:11 +0300 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-06-28 09:02:28 +0000 |
commit | bc8f89931ab4cc0537e7710b6bc375c844ba6e68 (patch) | |
tree | dc5b4a90f6c44e26e97385549c5436e84706e219 /oox/source/shape | |
parent | c7e184598540af5b609e77518abbd0f51b9e38ec (diff) |
Also LockedCanvasContext needs to be a ContextHandler2 now then
Change-Id: Idcc55370efbcd85f9f7142803e4cb61f3742e7fc
Reviewed-on: https://gerrit.libreoffice.org/4579
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'oox/source/shape')
-rw-r--r-- | oox/source/shape/LockedCanvasContext.cxx | 16 | ||||
-rw-r--r-- | oox/source/shape/LockedCanvasContext.hxx | 8 | ||||
-rw-r--r-- | oox/source/shape/ShapeContextHandler.cxx | 2 |
3 files changed, 11 insertions, 15 deletions
diff --git a/oox/source/shape/LockedCanvasContext.cxx b/oox/source/shape/LockedCanvasContext.cxx index 0f1e9b4c8af8..2c9c92e2542d 100644 --- a/oox/source/shape/LockedCanvasContext.cxx +++ b/oox/source/shape/LockedCanvasContext.cxx @@ -14,8 +14,8 @@ using namespace com::sun::star; namespace oox { namespace shape { -LockedCanvasContext::LockedCanvasContext( ContextHandler& rParent ) -: ContextHandler( rParent ) +LockedCanvasContext::LockedCanvasContext( ContextHandler2Helper& rParent ) +: ContextHandler2( rParent ) { } @@ -28,10 +28,8 @@ oox::drawingml::ShapePtr LockedCanvasContext::getShape() return mpShape; } -uno::Reference< xml::sax::XFastContextHandler > LockedCanvasContext::createFastChildContext( sal_Int32 aElementToken, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttribs*/ ) throw (xml::sax::SAXException, uno::RuntimeException) +::oox::core::ContextHandlerRef LockedCanvasContext::onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& /*rAttribs*/ ) { - uno::Reference< xml::sax::XFastContextHandler > xRet; - switch( getBaseToken( aElementToken ) ) { case XML_lockedCanvas: @@ -45,22 +43,20 @@ uno::Reference< xml::sax::XFastContextHandler > LockedCanvasContext::createFastC oox::drawingml::ShapePtr pMasterShape; mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.CustomShape")); mpShape->setLockedCanvas(true); - xRet = new oox::drawingml::ShapeContext( *this, pMasterShape, mpShape ); + return new oox::drawingml::ShapeContext( *this, pMasterShape, mpShape ); } - break; case XML_grpSp: { oox::drawingml::ShapePtr pMasterShape; mpShape.reset(new oox::drawingml::Shape("com.sun.star.drawing.GroupShape")); mpShape->setLockedCanvas(true); - xRet = new oox::drawingml::ShapeGroupContext( *this, pMasterShape, mpShape ); + return new oox::drawingml::ShapeGroupContext( *this, pMasterShape, mpShape ); } - break; default: SAL_WARN("oox", "LockedCanvasContext::createFastChildContext: unhandled element:" << getBaseToken(aElementToken)); break; } - return xRet; + return 0; } } } diff --git a/oox/source/shape/LockedCanvasContext.hxx b/oox/source/shape/LockedCanvasContext.hxx index c93d49d54aad..e3ea631af274 100644 --- a/oox/source/shape/LockedCanvasContext.hxx +++ b/oox/source/shape/LockedCanvasContext.hxx @@ -10,19 +10,19 @@ #ifndef OOX_SHAPE_LOCKEDCANVASCONTEXT #define OOX_SHAPE_LOCKEDCANVASCONTEXT -#include "oox/core/contexthandler.hxx" +#include "oox/core/contexthandler2.hxx" #include "oox/drawingml/shape.hxx" 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::ContextHandler +class LockedCanvasContext : public oox::core::ContextHandler2 { public: - LockedCanvasContext( oox::core::ContextHandler& rParent ); + LockedCanvasContext( oox::core::ContextHandler2Helper& rParent ); virtual ~LockedCanvasContext(); - virtual com::sun::star::uno::Reference< com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 Element, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException); + virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; oox::drawingml::ShapePtr getShape(); diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 1208af51f76f..179c10acd4e3 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -74,7 +74,7 @@ uno::Reference<xml::sax::XFastContextHandler> ShapeContextHandler::getLockedCanv { if (!mxLockedCanvasContext.is()) { - FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); + FragmentHandler2Ref rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); ShapePtr pMasterShape; switch (nElement & 0xffff) |