diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-06-14 16:53:52 +0300 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-06-28 09:02:12 +0000 |
commit | c7e184598540af5b609e77518abbd0f51b9e38ec (patch) | |
tree | f7fa74a8bca6572897ea37cd9f8a3daba8c991fd /oox/source/shape | |
parent | 32ce3c6b0a945078868fb2ae35c9260e4e4c3649 (diff) |
Further MCE work
As it is wrong (says Thorsten) to override the methods from
XFastContextHandler in ContextHandler2 in its derived classes, mark them with
SAL_FINAL to catch that (when compiling with a compiler thaty supports
"final").
Do corresponding changes then; change createFastChildContext() methods to
onCreateContext() ones instead.
Now the unit tests work, and a sample PPTX that uses embedded OLE thingies
loads without crash, but unfortunately it looks like crap...
Change-Id: Ie30022f37418ba9caf8ce59fe4003b808fa900f3
Reviewed-on: https://gerrit.libreoffice.org/4578
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/ShapeDrawingFragmentHandler.cxx | 12 | ||||
-rw-r--r-- | oox/source/shape/ShapeDrawingFragmentHandler.hxx | 4 |
2 files changed, 5 insertions, 11 deletions
diff --git a/oox/source/shape/ShapeDrawingFragmentHandler.cxx b/oox/source/shape/ShapeDrawingFragmentHandler.cxx index 53d693ec65cf..a0a968142c34 100644 --- a/oox/source/shape/ShapeDrawingFragmentHandler.cxx +++ b/oox/source/shape/ShapeDrawingFragmentHandler.cxx @@ -27,23 +27,17 @@ void SAL_CALL ShapeDrawingFragmentHandler::endDocument() throw (xml::sax::SAXExc { } -uno::Reference<xml::sax::XFastContextHandler> SAL_CALL ShapeDrawingFragmentHandler::createFastChildContext(sal_Int32 Element, const uno::Reference<xml::sax::XFastAttributeList>& /*Attribs*/ ) throw (xml::sax::SAXException, uno::RuntimeException) +::oox::core::ContextHandlerRef ShapeDrawingFragmentHandler::onCreateContext(sal_Int32 Element, const AttributeList& /*Attribs*/ ) { - uno::Reference< XFastContextHandler > xRet; - switch( Element ) { case DSP_TOKEN( spTree ): - xRet.set( new oox::drawingml::ShapeGroupContext(*this, oox::drawingml::ShapePtr((oox::drawingml::Shape*)0), mpGroupShapePtr)); - break; + return new oox::drawingml::ShapeGroupContext(*this, oox::drawingml::ShapePtr((oox::drawingml::Shape*)0), mpGroupShapePtr); default: break; } - if( !xRet.is() ) - xRet = getFastContextHandler(); - - return xRet; + return this; } } } diff --git a/oox/source/shape/ShapeDrawingFragmentHandler.hxx b/oox/source/shape/ShapeDrawingFragmentHandler.hxx index 64887b0f53eb..09612dd1bea7 100644 --- a/oox/source/shape/ShapeDrawingFragmentHandler.hxx +++ b/oox/source/shape/ShapeDrawingFragmentHandler.hxx @@ -21,8 +21,8 @@ class ShapeDrawingFragmentHandler : public oox::core::FragmentHandler2 public: ShapeDrawingFragmentHandler( oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr pGroupShapePtr ) throw(); virtual ~ShapeDrawingFragmentHandler() throw(); - virtual void SAL_CALL endDocument() throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException); - 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 void SAL_CALL endDocument() throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException) SAL_OVERRIDE; + virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 Element, const AttributeList& rAttribs ) SAL_OVERRIDE; private: oox::drawingml::ShapePtr mpGroupShapePtr; |