include/oox/core/fragmenthandler2.hxx | 2 ++ oox/source/shape/LockedCanvasContext.cxx | 16 ++++++---------- oox/source/shape/LockedCanvasContext.hxx | 8 ++++---- oox/source/shape/ShapeContextHandler.cxx | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-)
New commits: commit bc8f89931ab4cc0537e7710b6bc375c844ba6e68 Author: Tor Lillqvist <t...@iki.fi> Date: Thu Jun 20 20:30:11 2013 +0300 Also LockedCanvasContext needs to be a ContextHandler2 now then Change-Id: Idcc55370efbcd85f9f7142803e4cb61f3742e7fc Reviewed-on: https://gerrit.libreoffice.org/4579 Reviewed-by: Fridrich Strba <fridr...@documentfoundation.org> Tested-by: Fridrich Strba <fridr...@documentfoundation.org> diff --git a/include/oox/core/fragmenthandler2.hxx b/include/oox/core/fragmenthandler2.hxx index 5f2e8b6..6f0822d 100644 --- a/include/oox/core/fragmenthandler2.hxx +++ b/include/oox/core/fragmenthandler2.hxx @@ -111,6 +111,8 @@ public: virtual void finalizeImport(); }; +typedef ::rtl::Reference< FragmentHandler2 > FragmentHandler2Ref; + // ============================================================================ } // namespace core diff --git a/oox/source/shape/LockedCanvasContext.cxx b/oox/source/shape/LockedCanvasContext.cxx index 0f1e9b4..2c9c92e 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 c93d49d..e3ea631 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 1208af5..179c10a 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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits