diff options
32 files changed, 95 insertions, 97 deletions
diff --git a/include/oox/drawingml/connectorshapecontext.hxx b/include/oox/drawingml/connectorshapecontext.hxx index 48a03ae317af..e320147a0458 100644 --- a/include/oox/drawingml/connectorshapecontext.hxx +++ b/include/oox/drawingml/connectorshapecontext.hxx @@ -29,7 +29,7 @@ namespace oox { namespace drawingml { class OOX_DLLPUBLIC ConnectorShapeContext : public ShapeContext { public: - ConnectorShapeContext( ::oox::core::ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pGroupShapePtr ); + 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); }; diff --git a/include/oox/drawingml/graphicshapecontext.hxx b/include/oox/drawingml/graphicshapecontext.hxx index c5984d503363..8d85fd0557dd 100644 --- a/include/oox/drawingml/graphicshapecontext.hxx +++ b/include/oox/drawingml/graphicshapecontext.hxx @@ -31,7 +31,7 @@ namespace oox { namespace drawingml { class OOX_DLLPUBLIC GraphicShapeContext : public ShapeContext { public: - GraphicShapeContext( ::oox::core::ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ); + 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); @@ -42,7 +42,7 @@ public: class OOX_DLLPUBLIC GraphicalObjectFrameContext : public ShapeContext { public: - GraphicalObjectFrameContext( ::oox::core::ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr, bool bEmbedShapesInChart ); + 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); @@ -55,7 +55,7 @@ private: class OleObjectGraphicDataContext : public ShapeContext { public: - OleObjectGraphicDataContext( ::oox::core::ContextHandler& rParent, ShapePtr pShapePtr ); + 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); @@ -71,7 +71,7 @@ class DiagramGraphicDataContext : public ShapeContext { public: - DiagramGraphicDataContext( ::oox::core::ContextHandler& rParent, ShapePtr pShapePtr ); + 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); @@ -88,7 +88,7 @@ class ChartGraphicDataContext : public ShapeContext { public: explicit ChartGraphicDataContext( - ::oox::core::ContextHandler& rParent, + ::oox::core::ContextHandler2Helper& rParent, const ShapePtr& rxShape, bool bEmbedShapes ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL diff --git a/include/oox/drawingml/shapecontext.hxx b/include/oox/drawingml/shapecontext.hxx index 277ee91017ec..5632656c6591 100644 --- a/include/oox/drawingml/shapecontext.hxx +++ b/include/oox/drawingml/shapecontext.hxx @@ -22,17 +22,17 @@ #include <com/sun/star/drawing/XShapes.hpp> -#include "oox/core/contexthandler.hxx" +#include "oox/core/contexthandler2.hxx" #include "oox/drawingml/shape.hxx" #include "oox/drawingml/shapepropertiescontext.hxx" #include "oox/dllapi.h" namespace oox { namespace drawingml { -class OOX_DLLPUBLIC ShapeContext : public ::oox::core::ContextHandler +class OOX_DLLPUBLIC ShapeContext : public ::oox::core::ContextHandler2 { public: - ShapeContext( ::oox::core::ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ); + 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); diff --git a/include/oox/drawingml/shapegroupcontext.hxx b/include/oox/drawingml/shapegroupcontext.hxx index 65b86ac99567..71df8ccec2e9 100644 --- a/include/oox/drawingml/shapegroupcontext.hxx +++ b/include/oox/drawingml/shapegroupcontext.hxx @@ -26,10 +26,10 @@ namespace oox { namespace drawingml { -class OOX_DLLPUBLIC ShapeGroupContext : public ::oox::core::ContextHandler +class OOX_DLLPUBLIC ShapeGroupContext : public ::oox::core::ContextHandler2 { public: - ShapeGroupContext( ::oox::core::ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pGroupShapePtr ); + 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); diff --git a/include/oox/drawingml/table/tablecontext.hxx b/include/oox/drawingml/table/tablecontext.hxx index 175f7f84cb43..f1d915407300 100644 --- a/include/oox/drawingml/table/tablecontext.hxx +++ b/include/oox/drawingml/table/tablecontext.hxx @@ -30,7 +30,7 @@ class TableProperties; class TableContext : public ShapeContext { public: - TableContext( ::oox::core::ContextHandler& rParent, ShapePtr pShapePtr ); + 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); diff --git a/include/oox/ppt/pptgraphicshapecontext.hxx b/include/oox/ppt/pptgraphicshapecontext.hxx index 180098a67166..ebed5902c27b 100644 --- a/include/oox/ppt/pptgraphicshapecontext.hxx +++ b/include/oox/ppt/pptgraphicshapecontext.hxx @@ -29,7 +29,7 @@ class PPTGraphicShapeContext : public ::oox::drawingml::GraphicShapeContext SlidePersistPtr mpSlidePersistPtr; public: - PPTGraphicShapeContext( ::oox::core::ContextHandler& rParent, const SlidePersistPtr pSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pShapePtr ); + 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); }; diff --git a/include/oox/ppt/pptshapecontext.hxx b/include/oox/ppt/pptshapecontext.hxx index 59e46b3d54b5..078bc7f8226f 100644 --- a/include/oox/ppt/pptshapecontext.hxx +++ b/include/oox/ppt/pptshapecontext.hxx @@ -29,7 +29,7 @@ class PPTShapeContext : public ::oox::drawingml::ShapeContext SlidePersistPtr mpSlidePersistPtr; public: - PPTShapeContext( ::oox::core::ContextHandler& rParent, const SlidePersistPtr pSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pShapePtr ); + 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); }; diff --git a/include/oox/ppt/pptshapegroupcontext.hxx b/include/oox/ppt/pptshapegroupcontext.hxx index c7e60c76e823..aebc347f47dc 100644 --- a/include/oox/ppt/pptshapegroupcontext.hxx +++ b/include/oox/ppt/pptshapegroupcontext.hxx @@ -34,7 +34,7 @@ class PPTShapeGroupContext : public ::oox::drawingml::ShapeGroupContext public: PPTShapeGroupContext( - ::oox::core::ContextHandler& rParent, + ::oox::core::ContextHandler2Helper& rParent, const oox::ppt::SlidePersistPtr pSlidePersistPtr, const oox::ppt::ShapeLocation eShapeLocation, oox::drawingml::ShapePtr pMasterShapePtr, diff --git a/oox/source/drawingml/connectorshapecontext.cxx b/oox/source/drawingml/connectorshapecontext.cxx index f3a6810d2031..461bd51ff5f4 100644 --- a/oox/source/drawingml/connectorshapecontext.cxx +++ b/oox/source/drawingml/connectorshapecontext.cxx @@ -38,7 +38,7 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace drawingml { -ConnectorShapeContext::ConnectorShapeContext( ContextHandler& rParent, +ConnectorShapeContext::ConnectorShapeContext( ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pGroupShapePtr ) : ShapeContext( rParent, pMasterShapePtr, pGroupShapePtr ) { diff --git a/oox/source/drawingml/diagram/constraintlistcontext.cxx b/oox/source/drawingml/diagram/constraintlistcontext.cxx index 8bc0e945920b..beb06909eec3 100644 --- a/oox/source/drawingml/diagram/constraintlistcontext.cxx +++ b/oox/source/drawingml/diagram/constraintlistcontext.cxx @@ -27,10 +27,10 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace drawingml { // CT_ConstraintLists -ConstraintListContext::ConstraintListContext( ContextHandler& rParent, - const Reference< XFastAttributeList >&, +ConstraintListContext::ConstraintListContext( ContextHandler2Helper& rParent, + const AttributeList&, const LayoutAtomPtr &pNode ) - : ContextHandler( rParent ) + : ContextHandler2( rParent ) , mpNode( pNode ) { OSL_ENSURE( pNode, "Node must NOT be NULL" ); diff --git a/oox/source/drawingml/diagram/constraintlistcontext.hxx b/oox/source/drawingml/diagram/constraintlistcontext.hxx index 38f7abc1e5ec..cca5dd0052f0 100644 --- a/oox/source/drawingml/diagram/constraintlistcontext.hxx +++ b/oox/source/drawingml/diagram/constraintlistcontext.hxx @@ -20,16 +20,16 @@ #ifndef OOX_DRAWINGML_CONSTRAINTLISTCONTEXT_HXX #define OOX_DRAWINGML_CONSTRAINTLISTCONTEXT_HXX -#include "oox/core/contexthandler.hxx" +#include "oox/core/contexthandler2.hxx" #include "diagramlayoutatoms.hxx" #include "diagram.hxx" namespace oox { namespace drawingml { -class ConstraintListContext : public ::oox::core::ContextHandler +class ConstraintListContext : public ::oox::core::ContextHandler2 { public: - ConstraintListContext( ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, const LayoutAtomPtr &pNode ); + ConstraintListContext( ContextHandler2Helper& rParent, const AttributeList& rAttributes, const LayoutAtomPtr &pNode ); virtual ~ConstraintListContext(); virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx index fa9f15523a31..c0efc3c91292 100644 --- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx +++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx @@ -29,21 +29,21 @@ namespace oox { namespace drawingml { // CT_DiagramDefinition -DiagramDefinitionContext::DiagramDefinitionContext( ContextHandler& rParent, - const Reference< XFastAttributeList >& xAttributes, +DiagramDefinitionContext::DiagramDefinitionContext( ContextHandler2Helper& rParent, + const AttributeList& rAttributes, const DiagramLayoutPtr &pLayout ) - : ContextHandler( rParent ) + : ContextHandler2( rParent ) , mpLayout( pLayout ) { OSL_TRACE( "OOX: DiagramDefinitionContext::DiagramDefinitionContext()" ); - mpLayout->setDefStyle( xAttributes->getOptionalValue( XML_defStyle ) ); - OUString sValue = xAttributes->getOptionalValue( XML_minVer ); + mpLayout->setDefStyle( rAttributes.getString( XML_defStyle ).get() ); + OUString sValue = rAttributes.getString( XML_minVer ).get(); if( sValue.isEmpty() ) { sValue = "http://schemas.openxmlformats.org/drawingml/2006/diagram"; } mpLayout->setMinVer( sValue ); - mpLayout->setUniqueId( xAttributes->getOptionalValue( XML_uniqueId ) ); + mpLayout->setUniqueId( rAttributes.getString( XML_uniqueId ).get() ); } @@ -81,7 +81,7 @@ DiagramDefinitionContext::createFastChildContext( ::sal_Int32 aElement, pNode->setChildOrder( xAttribs->getOptionalValueToken( XML_chOrder, XML_b ) ); pNode->setMoveWith( xAttribs->getOptionalValue( XML_moveWith ) ); pNode->setStyleLabel( xAttribs->getOptionalValue( XML_styleLbl ) ); - xRet.set( new LayoutNodeContext( *this, xAttribs, pNode ) ); + xRet.set( new LayoutNodeContext( *this, AttributeList( xAttribs ), pNode ) ); break; } case DGM_TOKEN( clrData ): diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx index 24db9b1c428a..aca89f8e6332 100644 --- a/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx +++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx @@ -20,15 +20,15 @@ #ifndef OOX_DRAWINGML_DIAGRAMDEFINITIONCONTEXT_HXX #define OOX_DRAWINGML_DIAGRAMDEFINITIONCONTEXT_HXX -#include "oox/core/contexthandler.hxx" +#include "oox/core/contexthandler2.hxx" #include "diagram.hxx" namespace oox { namespace drawingml { -class DiagramDefinitionContext : public ::oox::core::ContextHandler +class DiagramDefinitionContext : public ::oox::core::ContextHandler2 { public: - DiagramDefinitionContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, const DiagramLayoutPtr &pLayout ); + DiagramDefinitionContext( ::oox::core::ContextHandler2Helper& rParent, const ::oox::AttributeList& rAttributes, const DiagramLayoutPtr &pLayout ); virtual ~DiagramDefinitionContext(); virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx index 658b46eff197..e7687c31948e 100644 --- a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx +++ b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx @@ -79,7 +79,7 @@ DiagramLayoutFragmentHandler::DiagramLayoutFragmentHandler( XmlFilterBase& rFilt const OUString& rFragmentPath, const DiagramLayoutPtr pDataPtr ) throw( ) - : FragmentHandler( rFilter, rFragmentPath ) + : FragmentHandler2( rFilter, rFragmentPath ) , mpDataPtr( pDataPtr ) { } @@ -106,7 +106,7 @@ DiagramLayoutFragmentHandler::createFastChildContext( ::sal_Int32 aElement, switch( aElement ) { case DGM_TOKEN( layoutDef ): - xRet.set( new DiagramDefinitionContext( *this, xAttribs, mpDataPtr ) ); + xRet.set( new DiagramDefinitionContext( *this, AttributeList( xAttribs ), mpDataPtr ) ); break; default: break; diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.hxx b/oox/source/drawingml/diagram/diagramfragmenthandler.hxx index 5497be835933..13385427a050 100644 --- a/oox/source/drawingml/diagram/diagramfragmenthandler.hxx +++ b/oox/source/drawingml/diagram/diagramfragmenthandler.hxx @@ -43,7 +43,7 @@ private: -class DiagramLayoutFragmentHandler : public ::oox::core::FragmentHandler +class DiagramLayoutFragmentHandler : public ::oox::core::FragmentHandler2 { public: DiagramLayoutFragmentHandler( oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, const DiagramLayoutPtr pDataPtr ) throw(); diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx index 5c0103836f0b..5be7ec622b8e 100644 --- a/oox/source/drawingml/diagram/layoutnodecontext.cxx +++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx @@ -36,27 +36,26 @@ class IfContext : public LayoutNodeContext { public: - IfContext( ContextHandler& rParent, - const Reference< XFastAttributeList >& xAttribs, + IfContext( ContextHandler2Helper& rParent, + const AttributeList& rAttribs, const ConditionAtomPtr& pAtom ) - : LayoutNodeContext( rParent, xAttribs, pAtom ) + : LayoutNodeContext( rParent, rAttribs, pAtom ) {} }; class AlgorithmContext - : public ContextHandler + : public ContextHandler2 { public: - AlgorithmContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, const AlgAtomPtr & pNode ) - : ContextHandler( rParent ) + AlgorithmContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, const AlgAtomPtr & pNode ) + : ContextHandler2( rParent ) , mnRevision( 0 ) , mpNode( pNode ) { - AttributeList aAttribs( xAttribs ); - mnRevision = aAttribs.getInteger( XML_rev, 0 ); - pNode->setType(xAttribs->getOptionalValueToken(XML_type, 0)); + mnRevision = rAttribs.getInteger( XML_rev, 0 ); + pNode->setType(rAttribs.getToken(XML_type, 0)); } virtual Reference< XFastContextHandler > SAL_CALL @@ -94,14 +93,14 @@ private: class ChooseContext - : public ContextHandler + : public ContextHandler2 { public: - ChooseContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, const LayoutAtomPtr & pNode ) - : ContextHandler( rParent ) + ChooseContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, const LayoutAtomPtr & pNode ) + : ContextHandler2( rParent ) , mpNode( pNode ) { - msName = xAttribs->getOptionalValue( XML_name ); + msName = rAttribs.getString( XML_name ).get(); } virtual Reference< XFastContextHandler > SAL_CALL @@ -118,7 +117,7 @@ public: // CT_When mpConditionNode.reset( new ConditionAtom(xAttribs) ); mpNode->addChild( mpConditionNode ); - xRet.set( new IfContext( *this, xAttribs, mpConditionNode ) ); + xRet.set( new IfContext( *this, AttributeList( xAttribs ), mpConditionNode ) ); break; } case DGM_TOKEN( else ): @@ -126,7 +125,7 @@ public: if( mpConditionNode ) { mpConditionNode->readElseBranch(); - xRet.set( new IfContext( *this, xAttribs, mpConditionNode ) ); + xRet.set( new IfContext( *this, AttributeList( xAttribs ), mpConditionNode ) ); mpConditionNode.reset(); } else @@ -156,22 +155,22 @@ class ForEachContext : public LayoutNodeContext { public: - ForEachContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, const ForEachAtomPtr& pAtom ) - : LayoutNodeContext( rParent, xAttribs, pAtom ) + ForEachContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, const ForEachAtomPtr& pAtom ) + : LayoutNodeContext( rParent, rAttribs, pAtom ) { - xAttribs->getOptionalValue( XML_ref ); - pAtom->iterator().loadFromXAttr( xAttribs ); + rAttribs.getString( XML_ref ); + pAtom->iterator().loadFromXAttr( rAttribs.getFastAttributeList() ); } }; // CT_LayoutVariablePropertySet class LayoutVariablePropertySetContext - : public ContextHandler + : public ContextHandler2 { public: - LayoutVariablePropertySetContext( ContextHandler& rParent, LayoutNode::VarMap & aVar ) - : ContextHandler( rParent ) + LayoutVariablePropertySetContext( ContextHandler2Helper& rParent, LayoutNode::VarMap & aVar ) + : ContextHandler2( rParent ) , mVariables( aVar ) { } @@ -201,14 +200,14 @@ private: // CT_LayoutNode -LayoutNodeContext::LayoutNodeContext( ContextHandler& rParent, - const Reference< XFastAttributeList >& xAttribs, +LayoutNodeContext::LayoutNodeContext( ContextHandler2Helper& rParent, + const AttributeList& rAttribs, const LayoutAtomPtr& pAtom ) - : ContextHandler( rParent ) + : ContextHandler2( rParent ) , mpNode( pAtom ) { OSL_ENSURE( pAtom, "Node must NOT be NULL" ); - mpNode->setName( xAttribs->getOptionalValue( XML_name ) ); + mpNode->setName( rAttribs.getString( XML_name ).get() ); } @@ -281,7 +280,7 @@ LayoutNodeContext::createFastChildContext( ::sal_Int32 aElement, pNode->setChildOrder( xAttribs->getOptionalValueToken( XML_chOrder, XML_b ) ); pNode->setMoveWith( xAttribs->getOptionalValue( XML_moveWith ) ); pNode->setStyleLabel( xAttribs->getOptionalValue( XML_styleLbl ) ); - xRet.set( new LayoutNodeContext( *this, xAttribs, pNode ) ); + xRet.set( new LayoutNodeContext( *this, AttributeList( xAttribs ), pNode ) ); break; } case DGM_TOKEN( shape ): @@ -319,7 +318,7 @@ LayoutNodeContext::createFastChildContext( ::sal_Int32 aElement, // CT_Algorithm AlgAtomPtr pAtom( new AlgAtom ); mpNode->addChild( pAtom ); - xRet.set( new AlgorithmContext( *this, xAttribs, pAtom ) ); + xRet.set( new AlgorithmContext( *this, AttributeList( xAttribs ), pAtom ) ); break; } case DGM_TOKEN( choose ): @@ -327,7 +326,7 @@ LayoutNodeContext::createFastChildContext( ::sal_Int32 aElement, // CT_Choose LayoutAtomPtr pAtom( new ChooseAtom ); mpNode->addChild( pAtom ); - xRet.set( new ChooseContext( *this, xAttribs, pAtom ) ); + xRet.set( new ChooseContext( *this, AttributeList( xAttribs ), pAtom ) ); break; } case DGM_TOKEN( forEach ): @@ -335,12 +334,12 @@ LayoutNodeContext::createFastChildContext( ::sal_Int32 aElement, // CT_ForEach ForEachAtomPtr pAtom( new ForEachAtom(xAttribs) ); mpNode->addChild( pAtom ); - xRet.set( new ForEachContext( *this, xAttribs, pAtom ) ); + xRet.set( new ForEachContext( *this, AttributeList( xAttribs ), pAtom ) ); break; } case DGM_TOKEN( constrLst ): // CT_Constraints - xRet.set( new ConstraintListContext( *this, xAttribs, mpNode ) ); + xRet.set( new ConstraintListContext( *this, AttributeList( xAttribs ), mpNode ) ); break; case DGM_TOKEN( presOf ): { diff --git a/oox/source/drawingml/diagram/layoutnodecontext.hxx b/oox/source/drawingml/diagram/layoutnodecontext.hxx index 130740e85315..6aede0edb94f 100644 --- a/oox/source/drawingml/diagram/layoutnodecontext.hxx +++ b/oox/source/drawingml/diagram/layoutnodecontext.hxx @@ -20,16 +20,16 @@ #ifndef OOX_DRAWINGML_LAYOUTNODECONTEXT_HXX #define OOX_DRAWINGML_LAYOUTNODECONTEXT_HXX -#include "oox/core/contexthandler.hxx" +#include "oox/core/contexthandler2.hxx" #include "diagramlayoutatoms.hxx" #include "diagram.hxx" namespace oox { namespace drawingml { -class LayoutNodeContext : public ::oox::core::ContextHandler +class LayoutNodeContext : public ::oox::core::ContextHandler2 { public: - LayoutNodeContext( ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, const LayoutAtomPtr &pNode ); + LayoutNodeContext( ::oox::core::ContextHandler2Helper& rParent, const ::oox::AttributeList& rAttributes, const LayoutAtomPtr &pNode ); virtual ~LayoutNodeContext(); virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index 2b46302296c8..a2106b0a7baa 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -52,7 +52,7 @@ namespace drawingml { // ============================================================================ // CT_Picture -GraphicShapeContext::GraphicShapeContext( ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ) +GraphicShapeContext::GraphicShapeContext( ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ) : ShapeContext( rParent, pMasterShapePtr, pShapePtr ) { } @@ -108,7 +108,7 @@ Reference< XFastContextHandler > GraphicShapeContext::createFastChildContext( sa // ============================================================================ // CT_GraphicalObjectFrameContext -GraphicalObjectFrameContext::GraphicalObjectFrameContext( ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr, bool bEmbedShapesInChart ) : +GraphicalObjectFrameContext::GraphicalObjectFrameContext( ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr, bool bEmbedShapesInChart ) : ShapeContext( rParent, pMasterShapePtr, pShapePtr ), mbEmbedShapesInChart( bEmbedShapesInChart ) { @@ -157,7 +157,7 @@ Reference< XFastContextHandler > GraphicalObjectFrameContext::createFastChildCon // ============================================================================ -OleObjectGraphicDataContext::OleObjectGraphicDataContext( ContextHandler& rParent, ShapePtr xShape ) : +OleObjectGraphicDataContext::OleObjectGraphicDataContext( ContextHandler2Helper& rParent, ShapePtr xShape ) : ShapeContext( rParent, ShapePtr(), xShape ), mrOleObjectInfo( xShape->setOleObjectType() ) { @@ -222,7 +222,7 @@ Reference< XFastContextHandler > OleObjectGraphicDataContext::createFastChildCon // ============================================================================ -DiagramGraphicDataContext::DiagramGraphicDataContext( ContextHandler& rParent, ShapePtr pShapePtr ) +DiagramGraphicDataContext::DiagramGraphicDataContext( ContextHandler2Helper& rParent, ShapePtr pShapePtr ) : ShapeContext( rParent, ShapePtr(), pShapePtr ) { pShapePtr->setDiagramType(); @@ -272,7 +272,7 @@ Reference< XFastContextHandler > DiagramGraphicDataContext::createFastChildConte // ============================================================================ -ChartGraphicDataContext::ChartGraphicDataContext( ContextHandler& rParent, const ShapePtr& rxShape, bool bEmbedShapes ) : +ChartGraphicDataContext::ChartGraphicDataContext( ContextHandler2Helper& rParent, const ShapePtr& rxShape, bool bEmbedShapes ) : ShapeContext( rParent, ShapePtr(), rxShape ), mrChartShapeInfo( rxShape->setChartType( bEmbedShapes ) ) { diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index 95aa6857f673..8e9c75f0cb14 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -44,8 +44,8 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace drawingml { // CT_Shape -ShapeContext::ShapeContext( ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ) -: ContextHandler( rParent ) +ShapeContext::ShapeContext( ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ) +: ContextHandler2( rParent ) , mpMasterShapePtr( pMasterShapePtr ) , mpShapePtr( pShapePtr ) { diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx index 831d72b6c5e7..87f468bc2f1d 100644 --- a/oox/source/drawingml/shapegroupcontext.cxx +++ b/oox/source/drawingml/shapegroupcontext.cxx @@ -40,8 +40,8 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace drawingml { -ShapeGroupContext::ShapeGroupContext( ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pGroupShapePtr ) -: ContextHandler( rParent ) +ShapeGroupContext::ShapeGroupContext( ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pGroupShapePtr ) +: ContextHandler2( rParent ) , mpGroupShapePtr( pGroupShapePtr ) , mpMasterShapePtr( pMasterShapePtr ) { diff --git a/oox/source/drawingml/table/tablecontext.cxx b/oox/source/drawingml/table/tablecontext.cxx index 15f9776de2d8..87900526ac1a 100644 --- a/oox/source/drawingml/table/tablecontext.cxx +++ b/oox/source/drawingml/table/tablecontext.cxx @@ -30,7 +30,7 @@ using namespace ::com::sun::star; namespace oox { namespace drawingml { namespace table { -TableContext::TableContext( ContextHandler& rParent, ShapePtr pShapePtr ) +TableContext::TableContext( ContextHandler2Helper& rParent, ShapePtr pShapePtr ) : ShapeContext( rParent, ShapePtr(), pShapePtr ) , mrTableProperties( *pShapePtr->getTableProperties().get() ) { diff --git a/oox/source/ppt/extdrawingfragmenthandler.cxx b/oox/source/ppt/extdrawingfragmenthandler.cxx index 7fecb8906530..2058a5877c37 100644 --- a/oox/source/ppt/extdrawingfragmenthandler.cxx +++ b/oox/source/ppt/extdrawingfragmenthandler.cxx @@ -23,7 +23,7 @@ ExtDrawingFragmentHandler::ExtDrawingFragmentHandler( XmlFilterBase& rFilter, oox::drawingml::ShapePtr pGroupShapePtr, oox::drawingml::ShapePtr pShapePtr) throw( ) - : FragmentHandler( rFilter, rFragmentPath ), + : FragmentHandler2( rFilter, rFragmentPath ), mpSlidePersistPtr (pSlidePersistPtr ), meShapeLocation( eShapeLocation ), mpMasterShapePtr( pMasterShapePtr ), diff --git a/oox/source/ppt/extdrawingfragmenthandler.hxx b/oox/source/ppt/extdrawingfragmenthandler.hxx index 4b099a1781ae..24fa1ed231b5 100644 --- a/oox/source/ppt/extdrawingfragmenthandler.hxx +++ b/oox/source/ppt/extdrawingfragmenthandler.hxx @@ -10,7 +10,6 @@ #ifndef OOX_PPT_EXTDRAWINGFRAGMENTHANDLER #define OOX_PPT_EXTDRAWINGFRAGMENTHANDLER -#include "oox/core/fragmenthandler.hxx" #include "oox/core/fragmenthandler2.hxx" #include "oox/drawingml/shapegroupcontext.hxx" #include "oox/ppt/slidepersist.hxx" @@ -20,7 +19,7 @@ namespace oox { namespace ppt { -class ExtDrawingFragmentHandler : public ::oox::core::FragmentHandler +class ExtDrawingFragmentHandler : public ::oox::core::FragmentHandler2 { public: ExtDrawingFragmentHandler( oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx b/oox/source/ppt/pptgraphicshapecontext.cxx index e21b9a19a8b0..63ced6609439 100644 --- a/oox/source/ppt/pptgraphicshapecontext.cxx +++ b/oox/source/ppt/pptgraphicshapecontext.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace ppt { // CT_Shape -PPTGraphicShapeContext::PPTGraphicShapeContext( ContextHandler& rParent, const SlidePersistPtr pSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pShapePtr ) +PPTGraphicShapeContext::PPTGraphicShapeContext( ContextHandler2Helper& rParent, const SlidePersistPtr pSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pShapePtr ) : oox::drawingml::GraphicShapeContext( rParent, pMasterShapePtr, pShapePtr ) , mpSlidePersistPtr( pSlidePersistPtr ) { diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx index ac8af0b9bc10..170ee420c427 100644 --- a/oox/source/ppt/pptshapecontext.cxx +++ b/oox/source/ppt/pptshapecontext.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace ppt { // CT_Shape -PPTShapeContext::PPTShapeContext( ContextHandler& rParent, const SlidePersistPtr pSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pShapePtr ) +PPTShapeContext::PPTShapeContext( ContextHandler2Helper& rParent, const SlidePersistPtr pSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pShapePtr ) : oox::drawingml::ShapeContext( rParent, pMasterShapePtr, pShapePtr ) , mpSlidePersistPtr( pSlidePersistPtr ) { diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx index ad5267e247a9..450fb7dbf0bb 100644 --- a/oox/source/ppt/pptshapegroupcontext.cxx +++ b/oox/source/ppt/pptshapegroupcontext.cxx @@ -46,7 +46,7 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace ppt { PPTShapeGroupContext::PPTShapeGroupContext( - ContextHandler& rParent, + ContextHandler2Helper& rParent, const oox::ppt::SlidePersistPtr pSlidePersistPtr, const ShapeLocation eShapeLocation, oox::drawingml::ShapePtr pMasterShapePtr, diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 5c1f990a5ab9..1208af51f76f 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -95,7 +95,7 @@ ShapeContextHandler::getGraphicShapeContext(::sal_Int32 Element ) { if (! mxGraphicShapeContext.is()) { - FragmentHandlerRef rFragmentHandler + ContextHandler2Helper *rFragmentHandler (new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); ShapePtr pMasterShape; @@ -139,7 +139,7 @@ ShapeContextHandler::getDiagramShapeContext() { if (!mxDiagramShapeContext.is()) { - FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); + ContextHandler2Helper *rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); mpShape.reset(new Shape()); mxDiagramShapeContext.set(new DiagramGraphicDataContext(*rFragmentHandler, mpShape)); } diff --git a/oox/source/shape/ShapeContextHandler.hxx b/oox/source/shape/ShapeContextHandler.hxx index c70460644729..2d500efbe2cc 100644 --- a/oox/source/shape/ShapeContextHandler.hxx +++ b/oox/source/shape/ShapeContextHandler.hxx @@ -26,20 +26,20 @@ #include "oox/drawingml/graphicshapecontext.hxx" #include "oox/drawingml/shape.hxx" #include "oox/drawingml/theme.hxx" -#include "oox/core/fragmenthandler.hxx" +#include "oox/core/fragmenthandler2.hxx" #include "oox/core/xmlfilterbase.hxx" #include "ShapeFilterBase.hxx" namespace oox { namespace shape { -class ShapeFragmentHandler : public core::FragmentHandler +class ShapeFragmentHandler : public core::FragmentHandler2 { public: typedef boost::shared_ptr<ShapeFragmentHandler> Pointer_t; explicit ShapeFragmentHandler(core::XmlFilterBase& rFilter, const OUString& rFragmentPath ) - : FragmentHandler(rFilter, rFragmentPath) + : FragmentHandler2(rFilter, rFragmentPath) { } }; diff --git a/oox/source/shape/ShapeDrawingFragmentHandler.cxx b/oox/source/shape/ShapeDrawingFragmentHandler.cxx index 581bba039287..53d693ec65cf 100644 --- a/oox/source/shape/ShapeDrawingFragmentHandler.cxx +++ b/oox/source/shape/ShapeDrawingFragmentHandler.cxx @@ -14,7 +14,7 @@ using namespace com::sun::star; namespace oox { namespace shape { ShapeDrawingFragmentHandler::ShapeDrawingFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr pGroupShapePtr ) throw() - : FragmentHandler(rFilter, rFragmentPath), + : FragmentHandler2(rFilter, rFragmentPath), mpGroupShapePtr(pGroupShapePtr) { } diff --git a/oox/source/shape/ShapeDrawingFragmentHandler.hxx b/oox/source/shape/ShapeDrawingFragmentHandler.hxx index 5555b1be95cd..64887b0f53eb 100644 --- a/oox/source/shape/ShapeDrawingFragmentHandler.hxx +++ b/oox/source/shape/ShapeDrawingFragmentHandler.hxx @@ -10,13 +10,13 @@ #ifndef OOX_SHAPE_DRAWINGFRAGMENTHANDLER #define OOX_SHAPE_DRAWINGFRAGMENTHANDLER -#include "oox/core/fragmenthandler.hxx" +#include "oox/core/fragmenthandler2.hxx" #include "oox/drawingml/shapegroupcontext.hxx" namespace oox { namespace shape { /// Generic (i.e. not specific to PPTX) handler for the prerendered diagram parsing. -class ShapeDrawingFragmentHandler : public oox::core::FragmentHandler +class ShapeDrawingFragmentHandler : public oox::core::FragmentHandler2 { public: ShapeDrawingFragmentHandler( oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr pGroupShapePtr ) throw(); diff --git a/sc/source/filter/inc/drawingfragment.hxx b/sc/source/filter/inc/drawingfragment.hxx index 29902b763b58..27459e0f68cb 100644 --- a/sc/source/filter/inc/drawingfragment.hxx +++ b/sc/source/filter/inc/drawingfragment.hxx @@ -83,14 +83,14 @@ class GroupShapeContext : public ::oox::drawingml::ShapeGroupContext, public Wor { public: explicit GroupShapeContext( - ::oox::core::ContextHandler& rParent, + ::oox::core::ContextHandler2Helper& rParent, const WorksheetHelper& rHelper, const ::oox::drawingml::ShapePtr& rxParentShape, const ::oox::drawingml::ShapePtr& rxShape ); static ::oox::core::ContextHandlerRef createShapeContext( - ::oox::core::ContextHandler& rParent, + ::oox::core::ContextHandler2Helper& rParent, const WorksheetHelper& rHelper, sal_Int32 nElement, const AttributeList& rAttribs, diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx index c8338a961189..b4c1fa7229cc 100644 --- a/sc/source/filter/oox/drawingfragment.cxx +++ b/sc/source/filter/oox/drawingfragment.cxx @@ -122,14 +122,14 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& // ============================================================================ -GroupShapeContext::GroupShapeContext( ContextHandler& rParent, +GroupShapeContext::GroupShapeContext( ContextHandler2Helper& rParent, const WorksheetHelper& rHelper, const ShapePtr& rxParentShape, const ShapePtr& rxShape ) : ShapeGroupContext( rParent, rxParentShape, rxShape ), WorksheetHelper( rHelper ) { } -/*static*/ ContextHandlerRef GroupShapeContext::createShapeContext( ContextHandler& rParent, +/*static*/ ContextHandlerRef GroupShapeContext::createShapeContext( ContextHandler2Helper& rParent, const WorksheetHelper& rHelper, sal_Int32 nElement, const AttributeList& rAttribs, const ShapePtr& rxParentShape, ShapePtr* pxShape ) { |