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 /include/oox | |
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 'include/oox')
-rw-r--r-- | include/oox/core/contexthandler2.hxx | 8 | ||||
-rw-r--r-- | include/oox/core/fragmenthandler2.hxx | 8 | ||||
-rw-r--r-- | include/oox/drawingml/connectorshapecontext.hxx | 2 | ||||
-rw-r--r-- | include/oox/drawingml/graphicshapecontext.hxx | 16 | ||||
-rw-r--r-- | include/oox/drawingml/shapecontext.hxx | 3 | ||||
-rw-r--r-- | include/oox/drawingml/shapegroupcontext.hxx | 2 | ||||
-rw-r--r-- | include/oox/drawingml/table/tablecontext.hxx | 2 | ||||
-rw-r--r-- | include/oox/drawingml/table/tablestylelistfragmenthandler.hxx | 2 | ||||
-rw-r--r-- | include/oox/ppt/pptgraphicshapecontext.hxx | 2 | ||||
-rw-r--r-- | include/oox/ppt/pptshapecontext.hxx | 2 | ||||
-rw-r--r-- | include/oox/ppt/pptshapegroupcontext.hxx | 6 |
11 files changed, 25 insertions, 28 deletions
diff --git a/include/oox/core/contexthandler2.hxx b/include/oox/core/contexthandler2.hxx index f1a0c7db38b2..03e4f1bf1785 100644 --- a/include/oox/core/contexthandler2.hxx +++ b/include/oox/core/contexthandler2.hxx @@ -228,21 +228,21 @@ public: 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 ); + ::com::sun::star::uno::RuntimeException ) SAL_FINAL; virtual void SAL_CALL startFastElement( 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 ); + ::com::sun::star::uno::RuntimeException ) SAL_FINAL; virtual void SAL_CALL characters( const OUString& rChars ) throw( ::com::sun::star::xml::sax::SAXException, - ::com::sun::star::uno::RuntimeException ); + ::com::sun::star::uno::RuntimeException ) SAL_FINAL; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) throw( ::com::sun::star::xml::sax::SAXException, - ::com::sun::star::uno::RuntimeException ); + ::com::sun::star::uno::RuntimeException ) SAL_FINAL; // oox.core.ContextHandler interface -------------------------------------- diff --git a/include/oox/core/fragmenthandler2.hxx b/include/oox/core/fragmenthandler2.hxx index 21ad03619fd1..5f2e8b6d5f8a 100644 --- a/include/oox/core/fragmenthandler2.hxx +++ b/include/oox/core/fragmenthandler2.hxx @@ -62,21 +62,21 @@ public: 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 ); + ::com::sun::star::uno::RuntimeException ) SAL_FINAL; virtual void SAL_CALL startFastElement( 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 ); + ::com::sun::star::uno::RuntimeException ) SAL_FINAL; virtual void SAL_CALL characters( const OUString& rChars ) throw( ::com::sun::star::xml::sax::SAXException, - ::com::sun::star::uno::RuntimeException ); + ::com::sun::star::uno::RuntimeException ) SAL_FINAL; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) throw( ::com::sun::star::xml::sax::SAXException, - ::com::sun::star::uno::RuntimeException ); + ::com::sun::star::uno::RuntimeException ) SAL_FINAL; // com.sun.star.xml.sax.XFastDocumentHandler interface -------------------- diff --git a/include/oox/drawingml/connectorshapecontext.hxx b/include/oox/drawingml/connectorshapecontext.hxx index e320147a0458..5429fc8826b0 100644 --- a/include/oox/drawingml/connectorshapecontext.hxx +++ b/include/oox/drawingml/connectorshapecontext.hxx @@ -31,7 +31,7 @@ class OOX_DLLPUBLIC ConnectorShapeContext : public ShapeContext public: ConnectorShapeContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pGroupShapePtr ); virtual ~ConnectorShapeContext(); - 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; }; } } 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; diff --git a/include/oox/drawingml/shapecontext.hxx b/include/oox/drawingml/shapecontext.hxx index 5632656c6591..469670991319 100644 --- a/include/oox/drawingml/shapecontext.hxx +++ b/include/oox/drawingml/shapecontext.hxx @@ -35,8 +35,7 @@ public: ShapeContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ); virtual ~ShapeContext(); - virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) 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 ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE; ShapePtr getShape(); diff --git a/include/oox/drawingml/shapegroupcontext.hxx b/include/oox/drawingml/shapegroupcontext.hxx index 71df8ccec2e9..9a199589802a 100644 --- a/include/oox/drawingml/shapegroupcontext.hxx +++ b/include/oox/drawingml/shapegroupcontext.hxx @@ -31,7 +31,7 @@ class OOX_DLLPUBLIC ShapeGroupContext : public ::oox::core::ContextHandler2 public: ShapeGroupContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pGroupShapePtr ); virtual ~ShapeGroupContext(); - 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; protected: diff --git a/include/oox/drawingml/table/tablecontext.hxx b/include/oox/drawingml/table/tablecontext.hxx index f1d915407300..311bf90d19f7 100644 --- a/include/oox/drawingml/table/tablecontext.hxx +++ b/include/oox/drawingml/table/tablecontext.hxx @@ -33,7 +33,7 @@ public: TableContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pShapePtr ); ~TableContext(); - 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: diff --git a/include/oox/drawingml/table/tablestylelistfragmenthandler.hxx b/include/oox/drawingml/table/tablestylelistfragmenthandler.hxx index d6ef77f8614c..c145d21ae772 100644 --- a/include/oox/drawingml/table/tablestylelistfragmenthandler.hxx +++ b/include/oox/drawingml/table/tablestylelistfragmenthandler.hxx @@ -38,7 +38,7 @@ public: TableStyleList& rTableStyleList ); virtual ~TableStyleListFragmentHandler(); - 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 AttributeList& rAttribs ) SAL_OVERRIDE; private: diff --git a/include/oox/ppt/pptgraphicshapecontext.hxx b/include/oox/ppt/pptgraphicshapecontext.hxx index ebed5902c27b..99492d6d0e32 100644 --- a/include/oox/ppt/pptgraphicshapecontext.hxx +++ b/include/oox/ppt/pptgraphicshapecontext.hxx @@ -30,7 +30,7 @@ class PPTGraphicShapeContext : public ::oox::drawingml::GraphicShapeContext public: PPTGraphicShapeContext( ::oox::core::ContextHandler2Helper& rParent, const SlidePersistPtr pSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::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; }; } } diff --git a/include/oox/ppt/pptshapecontext.hxx b/include/oox/ppt/pptshapecontext.hxx index 078bc7f8226f..f746b659d7f0 100644 --- a/include/oox/ppt/pptshapecontext.hxx +++ b/include/oox/ppt/pptshapecontext.hxx @@ -30,7 +30,7 @@ class PPTShapeContext : public ::oox::drawingml::ShapeContext public: PPTShapeContext( ::oox::core::ContextHandler2Helper& rParent, const SlidePersistPtr pSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::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; }; } } diff --git a/include/oox/ppt/pptshapegroupcontext.hxx b/include/oox/ppt/pptshapegroupcontext.hxx index aebc347f47dc..efa2c5b246e7 100644 --- a/include/oox/ppt/pptshapegroupcontext.hxx +++ b/include/oox/ppt/pptshapegroupcontext.hxx @@ -40,10 +40,10 @@ public: oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pGroupShapePtr ); - 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; - virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL onEndElement() SAL_OVERRIDE; protected: |