From c7e184598540af5b609e77518abbd0f51b9e38ec Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 14 Jun 2013 16:53:52 +0300 Subject: 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 Tested-by: Fridrich Strba --- include/oox/drawingml/graphicshapecontext.hxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'include/oox/drawingml/graphicshapecontext.hxx') diff --git a/include/oox/drawingml/graphicshapecontext.hxx b/include/oox/drawingml/graphicshapecontext.hxx index 8d85fd0557dd..c2aa54e0d839 100644 --- a/include/oox/drawingml/graphicshapecontext.hxx +++ b/include/oox/drawingml/graphicshapecontext.hxx @@ -33,8 +33,7 @@ class OOX_DLLPUBLIC GraphicShapeContext : public ShapeContext public: GraphicShapeContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ); - 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; }; // ==================================================================== @@ -44,7 +43,7 @@ class OOX_DLLPUBLIC GraphicalObjectFrameContext : public ShapeContext public: GraphicalObjectFrameContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr, bool bEmbedShapesInChart ); - 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; private: bool mbEmbedShapesInChart; @@ -57,7 +56,7 @@ class OleObjectGraphicDataContext : public ShapeContext public: OleObjectGraphicDataContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pShapePtr ); ~OleObjectGraphicDataContext(); - 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; private: ::oox::vml::OleObjectInfo& mrOleObjectInfo; @@ -73,7 +72,7 @@ class DiagramGraphicDataContext public: DiagramGraphicDataContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pShapePtr ); virtual ~DiagramGraphicDataContext(); - 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; private: OUString msDm; @@ -91,11 +90,10 @@ public: ::oox::core::ContextHandler2Helper& rParent, const ShapePtr& rxShape, bool bEmbedShapes ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL - createFastChildContext( + virtual ::oox::core::ContextHandlerRef + onCreateContext( sal_Int32 nElement, - const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs ) - throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + const ::oox::AttributeList& rAttribs) SAL_OVERRIDE; private: ChartShapeInfo& mrChartShapeInfo; -- cgit