summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-06-14 16:53:52 +0300
committerFridrich Strba <fridrich@documentfoundation.org>2013-06-28 09:02:12 +0000
commitc7e184598540af5b609e77518abbd0f51b9e38ec (patch)
treef7fa74a8bca6572897ea37cd9f8a3daba8c991fd /oox
parent32ce3c6b0a945078868fb2ae35c9260e4e4c3649 (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')
-rw-r--r--oox/source/drawingml/connectorshapecontext.cxx11
-rw-r--r--oox/source/drawingml/diagram/constraintlistcontext.cxx43
-rw-r--r--oox/source/drawingml/diagram/constraintlistcontext.hxx3
-rw-r--r--oox/source/drawingml/diagram/diagramdefinitioncontext.cxx41
-rw-r--r--oox/source/drawingml/diagram/diagramdefinitioncontext.hxx3
-rw-r--r--oox/source/drawingml/diagram/diagramfragmenthandler.cxx17
-rw-r--r--oox/source/drawingml/diagram/diagramfragmenthandler.hxx2
-rw-r--r--oox/source/drawingml/diagram/layoutnodecontext.cxx117
-rw-r--r--oox/source/drawingml/diagram/layoutnodecontext.hxx3
-rw-r--r--oox/source/drawingml/graphicshapecontext.cxx90
-rw-r--r--oox/source/drawingml/shapecontext.cxx43
-rw-r--r--oox/source/drawingml/shapegroupcontext.cxx46
-rw-r--r--oox/source/drawingml/table/tablecontext.cxx38
-rw-r--r--oox/source/drawingml/table/tablestylelistfragmenthandler.cxx15
-rw-r--r--oox/source/ppt/extdrawingfragmenthandler.cxx19
-rw-r--r--oox/source/ppt/extdrawingfragmenthandler.hxx4
-rw-r--r--oox/source/ppt/pptgraphicshapecontext.cxx30
-rw-r--r--oox/source/ppt/pptshapecontext.cxx33
-rw-r--r--oox/source/ppt/pptshapegroupcontext.cxx53
-rw-r--r--oox/source/shape/ShapeDrawingFragmentHandler.cxx12
-rw-r--r--oox/source/shape/ShapeDrawingFragmentHandler.hxx4
21 files changed, 218 insertions, 409 deletions
diff --git a/oox/source/drawingml/connectorshapecontext.cxx b/oox/source/drawingml/connectorshapecontext.cxx
index 461bd51ff5f4..4fa115aa99fa 100644
--- a/oox/source/drawingml/connectorshapecontext.cxx
+++ b/oox/source/drawingml/connectorshapecontext.cxx
@@ -48,23 +48,18 @@ ConnectorShapeContext::~ConnectorShapeContext()
{
}
-Reference< XFastContextHandler > ConnectorShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef ConnectorShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
-
switch( getBaseToken( aElementToken ) )
{
case XML_nvCxnSpPr :
break;
default:
- xRet = ShapeContext::createFastChildContext( aElementToken, xAttribs );
+ return ShapeContext::onCreateContext( aElementToken, rAttribs );
}
- if( !xRet.is() )
- xRet.set( this );
-
- return xRet;
+ return this;
}
} }
diff --git a/oox/source/drawingml/diagram/constraintlistcontext.cxx b/oox/source/drawingml/diagram/constraintlistcontext.cxx
index beb06909eec3..b93ac3d09582 100644
--- a/oox/source/drawingml/diagram/constraintlistcontext.cxx
+++ b/oox/source/drawingml/diagram/constraintlistcontext.cxx
@@ -41,20 +41,10 @@ ConstraintListContext::~ConstraintListContext()
{
}
-void SAL_CALL ConstraintListContext::endFastElement( ::sal_Int32 )
- throw (SAXException, RuntimeException)
+ContextHandlerRef
+ConstraintListContext::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs )
{
-}
-
-Reference< XFastContextHandler > SAL_CALL
-ConstraintListContext::createFastChildContext( ::sal_Int32 aElement,
- const Reference< XFastAttributeList >& xAttribs )
- throw (SAXException, RuntimeException)
-{
- Reference< XFastContextHandler > xRet;
-
- OUString aEmptyStr;
-
switch( aElement )
{
case DGM_TOKEN( constr ):
@@ -62,27 +52,24 @@ ConstraintListContext::createFastChildContext( ::sal_Int32 aElement,
ConstraintAtomPtr pNode( new ConstraintAtom() );
mpNode->addChild( pNode );
- AttributeList aAttribs( xAttribs );
- pNode->setFor( aAttribs.getToken( XML_for, XML_none ) );
- pNode->setForName( aAttribs.getString( XML_forName, aEmptyStr ) );
- pNode->setPointType( aAttribs.getToken( XML_ptType, XML_none ) );
- pNode->setType( aAttribs.getToken( XML_type, XML_none ) );
- pNode->setRefFor( aAttribs.getToken( XML_refFor, XML_none ) );
- pNode->setRefForName( aAttribs.getString( XML_refForName, aEmptyStr ) );
- pNode->setRefType( aAttribs.getToken( XML_refType, XML_none ) );
- pNode->setRefPointType( aAttribs.getToken( XML_refPtType, XML_none ) );
- pNode->setFactor( aAttribs.getDouble( XML_fact, 1.0 ) );
- pNode->setValue( aAttribs.getDouble( XML_val, 0.0 ) );
- pNode->setOperator( aAttribs.getToken( XML_op, XML_none ) );
+ pNode->setFor( rAttribs.getToken( XML_for, XML_none ) );
+ pNode->setForName( rAttribs.getString( XML_forName, "" ) );
+ pNode->setPointType( rAttribs.getToken( XML_ptType, XML_none ) );
+ pNode->setType( rAttribs.getToken( XML_type, XML_none ) );
+ pNode->setRefFor( rAttribs.getToken( XML_refFor, XML_none ) );
+ pNode->setRefForName( rAttribs.getString( XML_refForName, "" ) );
+ pNode->setRefType( rAttribs.getToken( XML_refType, XML_none ) );
+ pNode->setRefPointType( rAttribs.getToken( XML_refPtType, XML_none ) );
+ pNode->setFactor( rAttribs.getDouble( XML_fact, 1.0 ) );
+ pNode->setValue( rAttribs.getDouble( XML_val, 0.0 ) );
+ pNode->setOperator( rAttribs.getToken( XML_op, XML_none ) );
break;
}
default:
break;
}
- if( !xRet.is() )
- xRet.set(this);
- return xRet;
+ return this;
}
diff --git a/oox/source/drawingml/diagram/constraintlistcontext.hxx b/oox/source/drawingml/diagram/constraintlistcontext.hxx
index cca5dd0052f0..78b1bd27f34c 100644
--- a/oox/source/drawingml/diagram/constraintlistcontext.hxx
+++ b/oox/source/drawingml/diagram/constraintlistcontext.hxx
@@ -32,8 +32,7 @@ public:
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);
- 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:
LayoutAtomPtr mpNode;
};
diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
index c0efc3c91292..d5d5411bb0a0 100644
--- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
+++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
@@ -52,59 +52,44 @@ DiagramDefinitionContext::~DiagramDefinitionContext()
mpLayout->getNode()->dump(0);
}
-void SAL_CALL DiagramDefinitionContext::endFastElement( ::sal_Int32 )
- throw (SAXException, RuntimeException)
+ContextHandlerRef
+DiagramDefinitionContext::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs )
{
-
-}
-
-
-Reference< XFastContextHandler > SAL_CALL
-DiagramDefinitionContext::createFastChildContext( ::sal_Int32 aElement,
- const Reference< XFastAttributeList >& xAttribs )
- throw (SAXException, RuntimeException)
-{
- Reference< XFastContextHandler > xRet;
-
switch( aElement )
{
case DGM_TOKEN( title ):
- mpLayout->setTitle( xAttribs->getOptionalValue( XML_val ) );
+ mpLayout->setTitle( rAttribs.getString( XML_val ).get() );
break;
case DGM_TOKEN( desc ):
- mpLayout->setDesc( xAttribs->getOptionalValue( XML_val ) );
+ mpLayout->setDesc( rAttribs.getString( XML_val ).get() );
break;
case DGM_TOKEN( layoutNode ):
{
LayoutNodePtr pNode( new LayoutNode() );
mpLayout->getNode() = pNode;
- 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, AttributeList( xAttribs ), pNode ) );
- break;
+ pNode->setChildOrder( rAttribs.getToken( XML_chOrder, XML_b ) );
+ pNode->setMoveWith( rAttribs.getString( XML_moveWith ).get() );
+ pNode->setStyleLabel( rAttribs.getString( XML_styleLbl ).get() );
+ return new LayoutNodeContext( *this, rAttribs, pNode );
}
case DGM_TOKEN( clrData ):
// TODO, does not matter for the UI. skip.
- return xRet;
+ return 0;
case DGM_TOKEN( sampData ):
mpLayout->getSampData().reset( new DiagramData );
- xRet.set( new DataModelContext( *this, mpLayout->getSampData() ) );
- break;
+ return new DataModelContext( *this, mpLayout->getSampData() );
case DGM_TOKEN( styleData ):
mpLayout->getStyleData().reset( new DiagramData );
- xRet.set( new DataModelContext( *this, mpLayout->getStyleData() ) );
- break;
+ return new DataModelContext( *this, mpLayout->getStyleData() );
case DGM_TOKEN( cat ):
case DGM_TOKEN( catLst ):
// TODO, does not matter for the UI
default:
break;
}
- if( !xRet.is() )
- xRet.set(this);
- return xRet;
+ return this;
}
diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx
index aca89f8e6332..983c2dfa3591 100644
--- a/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx
+++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx
@@ -31,8 +31,7 @@ public:
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);
- 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:
DiagramLayoutPtr mpLayout;
diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
index e7687c31948e..cea339ad1758 100644
--- a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
+++ b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
@@ -96,26 +96,19 @@ void SAL_CALL DiagramLayoutFragmentHandler::endDocument()
}
-Reference< XFastContextHandler > SAL_CALL
-DiagramLayoutFragmentHandler::createFastChildContext( ::sal_Int32 aElement,
- const Reference< XFastAttributeList >& xAttribs )
- throw ( SAXException, RuntimeException)
+ContextHandlerRef
+DiagramLayoutFragmentHandler::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
-
switch( aElement )
{
case DGM_TOKEN( layoutDef ):
- xRet.set( new DiagramDefinitionContext( *this, AttributeList( xAttribs ), mpDataPtr ) );
- break;
+ return new DiagramDefinitionContext( *this, AttributeList( rAttribs ), mpDataPtr );
default:
break;
}
- if( !xRet.is() )
- xRet = getFastContextHandler();
-
- return xRet;
+ return this;
}
///////////////////////
diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.hxx b/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
index 13385427a050..95808ce243d8 100644
--- a/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
+++ b/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
@@ -50,7 +50,7 @@ public:
virtual ~DiagramLayoutFragmentHandler() 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 ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
private:
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx
index 5be7ec622b8e..17c16efeae15 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.cxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -58,32 +58,25 @@ public:
pNode->setType(rAttribs.getToken(XML_type, 0));
}
- virtual Reference< XFastContextHandler > SAL_CALL
- createFastChildContext( ::sal_Int32 aElement,
- const Reference< XFastAttributeList >& xAttribs )
- throw (SAXException, RuntimeException)
+ virtual ContextHandlerRef
+ onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs ) SAL_OVERRIDE
{
- Reference< XFastContextHandler > xRet;
-
switch( aElement )
{
case DGM_TOKEN( param ):
{
- AttributeList aAttribs( xAttribs );
- const sal_Int32 nValTok=aAttribs.getToken( XML_val, 0 );
+ const sal_Int32 nValTok = rAttribs.getToken( XML_val, 0 );
mpNode->addParam(
- aAttribs.getToken( XML_type, 0 ),
- nValTok>0 ? nValTok : aAttribs.getInteger( XML_val, 0 ) );
+ rAttribs.getToken( XML_type, 0 ),
+ nValTok>0 ? nValTok : rAttribs.getInteger( XML_val, 0 ) );
break;
}
default:
break;
}
- if( !xRet.is() )
- xRet.set(this);
-
- return xRet;
+ return this;
}
private:
@@ -103,30 +96,27 @@ public:
msName = rAttribs.getString( XML_name ).get();
}
- virtual Reference< XFastContextHandler > SAL_CALL
- createFastChildContext( ::sal_Int32 aElement,
- const Reference< XFastAttributeList >& xAttribs )
- throw (SAXException, RuntimeException)
+ virtual ContextHandlerRef
+ onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs ) SAL_OVERRIDE
{
- Reference< XFastContextHandler > xRet;
-
switch( aElement )
{
case DGM_TOKEN( if ):
{
// CT_When
- mpConditionNode.reset( new ConditionAtom(xAttribs) );
+ mpConditionNode.reset( new ConditionAtom(rAttribs.getFastAttributeList()) );
mpNode->addChild( mpConditionNode );
- xRet.set( new IfContext( *this, AttributeList( xAttribs ), mpConditionNode ) );
- break;
+ return new IfContext( *this, rAttribs, mpConditionNode );
}
case DGM_TOKEN( else ):
// CT_Otherwise
if( mpConditionNode )
{
mpConditionNode->readElseBranch();
- xRet.set( new IfContext( *this, AttributeList( xAttribs ), mpConditionNode ) );
+ ContextHandlerRef xRet = new IfContext( *this, rAttribs, mpConditionNode );
mpConditionNode.reset();
+ return xRet;
}
else
{
@@ -137,10 +127,7 @@ public:
break;
}
- if( !xRet.is() )
- xRet.set(this);
-
- return xRet;
+ return this;
}
private:
OUString msName;
@@ -179,20 +166,16 @@ public:
{
}
- virtual Reference< XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElement, const Reference< XFastAttributeList >& xAttribs )
+ virtual ContextHandlerRef onCreateContext( ::sal_Int32 aElement, const AttributeList& rAttribs )
throw (SAXException, RuntimeException)
{
- Reference< XFastContextHandler > xRet;
-
sal_Int32 nIdx = LayoutNodeContext::tagToVarIdx( getBaseToken( aElement ) );
if( nIdx != -1 )
{
- mVariables[ nIdx ] = makeAny( xAttribs->getOptionalValue( XML_val ) );
+ mVariables[ nIdx ] = makeAny( rAttribs.getString( XML_val ).get() );
}
- if( !xRet.is() )
- xRet.set(this);
- return xRet;
+ return this;
}
private:
LayoutNode::VarMap & mVariables;
@@ -215,12 +198,6 @@ LayoutNodeContext::~LayoutNodeContext()
{
}
-void SAL_CALL LayoutNodeContext::endFastElement( ::sal_Int32 )
- throw (SAXException, RuntimeException)
-{
-
-}
-
/** convert the XML tag to a variable index in the array
* @param aTag the tag, without namespace
* @return the variable index. -1 is an error
@@ -264,24 +241,20 @@ sal_Int32 LayoutNodeContext::tagToVarIdx( sal_Int32 aTag )
}
-Reference< XFastContextHandler > SAL_CALL
-LayoutNodeContext::createFastChildContext( ::sal_Int32 aElement,
- const Reference< XFastAttributeList >& xAttribs )
- throw (SAXException, RuntimeException)
+ContextHandlerRef
+LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
-
switch( aElement )
{
case DGM_TOKEN( layoutNode ):
{
LayoutNodePtr pNode( new LayoutNode() );
mpNode->addChild( pNode );
- 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, AttributeList( xAttribs ), pNode ) );
- break;
+ pNode->setChildOrder( rAttribs.getToken( XML_chOrder, XML_b ) );
+ pNode->setMoveWith( rAttribs.getString( XML_moveWith ).get() );
+ pNode->setStyleLabel( rAttribs.getString( XML_styleLbl ).get() );
+ return new LayoutNodeContext( *this, rAttribs, pNode );
}
case DGM_TOKEN( shape ):
{
@@ -290,10 +263,10 @@ LayoutNodeContext::createFastChildContext( ::sal_Int32 aElement,
{
ShapePtr pShape;
- if( xAttribs->hasAttribute( XML_type ) )
+ if( rAttribs.hasAttribute( XML_type ) )
{
pShape.reset( new Shape("com.sun.star.drawing.CustomShape") );
- const sal_Int32 nType(xAttribs->getOptionalValueToken( XML_type, XML_obj ));
+ const sal_Int32 nType(rAttribs.getToken( XML_type, XML_obj ));
pShape->setSubType( nType );
pShape->getCustomShapeProperties()->setShapePresetType( nType );
}
@@ -303,7 +276,7 @@ LayoutNodeContext::createFastChildContext( ::sal_Int32 aElement,
}
pNode->setShape( pShape );
- xRet.set( new ShapeContext( *this, ShapePtr(), pShape ) );
+ return new ShapeContext( *this, ShapePtr(), pShape );
}
else
{
@@ -312,45 +285,41 @@ LayoutNodeContext::createFastChildContext( ::sal_Int32 aElement,
break;
}
case DGM_TOKEN( extLst ):
- return xRet;
+ return 0;
case DGM_TOKEN( alg ):
{
// CT_Algorithm
AlgAtomPtr pAtom( new AlgAtom );
mpNode->addChild( pAtom );
- xRet.set( new AlgorithmContext( *this, AttributeList( xAttribs ), pAtom ) );
- break;
+ return new AlgorithmContext( *this, rAttribs, pAtom );
}
case DGM_TOKEN( choose ):
{
// CT_Choose
LayoutAtomPtr pAtom( new ChooseAtom );
mpNode->addChild( pAtom );
- xRet.set( new ChooseContext( *this, AttributeList( xAttribs ), pAtom ) );
- break;
+ return new ChooseContext( *this, rAttribs, pAtom );
}
case DGM_TOKEN( forEach ):
{
// CT_ForEach
- ForEachAtomPtr pAtom( new ForEachAtom(xAttribs) );
+ ForEachAtomPtr pAtom( new ForEachAtom(rAttribs.getFastAttributeList()) );
mpNode->addChild( pAtom );
- xRet.set( new ForEachContext( *this, AttributeList( xAttribs ), pAtom ) );
- break;
+ return new ForEachContext( *this, rAttribs, pAtom );
}
case DGM_TOKEN( constrLst ):
// CT_Constraints
- xRet.set( new ConstraintListContext( *this, AttributeList( xAttribs ), mpNode ) );
- break;
+ return new ConstraintListContext( *this, rAttribs, mpNode );
case DGM_TOKEN( presOf ):
{
// CT_PresentationOf
// TODO
- xAttribs->getOptionalValue( XML_axis );
- xAttribs->getOptionalValue( XML_cnt );
- xAttribs->getOptionalValue( XML_hideLastTrans );
- xAttribs->getOptionalValue( XML_ptType );
- xAttribs->getOptionalValue( XML_st );
- xAttribs->getOptionalValue( XML_step );
+ rAttribs.getString( XML_axis );
+ rAttribs.getString( XML_cnt );
+ rAttribs.getString( XML_hideLastTrans );
+ rAttribs.getString( XML_ptType );
+ rAttribs.getString( XML_st );
+ rAttribs.getString( XML_step );
break;
}
case DGM_TOKEN( ruleLst ):
@@ -362,7 +331,7 @@ LayoutNodeContext::createFastChildContext( ::sal_Int32 aElement,
LayoutNodePtr pNode( boost::dynamic_pointer_cast< LayoutNode >( mpNode ) );
if( pNode )
{
- xRet.set( new LayoutVariablePropertySetContext( *this, pNode->variables() ) );
+ return new LayoutVariablePropertySetContext( *this, pNode->variables() );
}
else
{
@@ -373,10 +342,8 @@ LayoutNodeContext::createFastChildContext( ::sal_Int32 aElement,
default:
break;
}
- if( !xRet.is() )
- xRet.set(this);
- return xRet;
+ return this;
}
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.hxx b/oox/source/drawingml/diagram/layoutnodecontext.hxx
index 6aede0edb94f..69055fd2e37e 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.hxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.hxx
@@ -32,8 +32,7 @@ public:
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);
- 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;
static ::sal_Int32 tagToVarIdx( ::sal_Int32 aTag );
private:
diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx
index a2106b0a7baa..22ad713cb19b 100644
--- a/oox/source/drawingml/graphicshapecontext.cxx
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -57,22 +57,18 @@ GraphicShapeContext::GraphicShapeContext( ContextHandler2Helper& rParent, ShapeP
{
}
-Reference< XFastContextHandler > GraphicShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef GraphicShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
-
switch( getBaseToken( aElementToken ) )
{
// CT_ShapeProperties
case XML_xfrm:
- xRet.set( new Transform2DContext( *this, xAttribs, *mpShapePtr ) );
- break;
+ return new Transform2DContext( *this, rAttribs.getFastAttributeList(), *mpShapePtr );
case XML_blipFill:
- xRet.set( new BlipFillContext( *this, xAttribs, mpShapePtr->getGraphicProperties().maBlipProps ) );
- break;
+ return new BlipFillContext( *this, rAttribs.getFastAttributeList(), mpShapePtr->getGraphicProperties().maBlipProps );
case XML_wavAudioFile:
{
- getEmbeddedWAVAudioFile( getRelations(), xAttribs, mpShapePtr->getGraphicProperties().maAudio );
+ getEmbeddedWAVAudioFile( getRelations(), rAttribs.getFastAttributeList(), mpShapePtr->getGraphicProperties().maAudio );
if( !mpShapePtr->getGraphicProperties().maAudio.msEmbed.isEmpty() )
{
Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
@@ -99,10 +95,7 @@ Reference< XFastContextHandler > GraphicShapeContext::createFastChildContext( sa
pCstmShpProps->setShapePresetType( getBaseToken( aElementToken ) );
}
- if( !xRet.is() )
- xRet.set( ShapeContext::createFastChildContext( aElementToken, xAttribs ) );
-
- return xRet;
+ return ShapeContext::onCreateContext( aElementToken, rAttribs );
}
// ============================================================================
@@ -114,45 +107,39 @@ GraphicalObjectFrameContext::GraphicalObjectFrameContext( ContextHandler2Helper&
{
}
-Reference< XFastContextHandler > GraphicalObjectFrameContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef GraphicalObjectFrameContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
-
switch( getBaseToken( aElementToken ) )
{
// CT_ShapeProperties
case XML_nvGraphicFramePr: // CT_GraphicalObjectFrameNonVisual
break;
case XML_xfrm: // CT_Transform2D
- xRet.set( new Transform2DContext( *this, xAttribs, *mpShapePtr ) );
- break;
+ return new Transform2DContext( *this, rAttribs.getFastAttributeList(), *mpShapePtr );
case XML_graphic: // CT_GraphicalObject
- xRet.set( this );
- break;
+ return this;
case XML_graphicData : // CT_GraphicalObjectData
{
- OUString sUri( xAttribs->getOptionalValue( XML_uri ) );
+ OUString sUri( rAttribs.getString( XML_uri ).get() );
if ( sUri == "http://schemas.openxmlformats.org/presentationml/2006/ole" )
- xRet.set( new OleObjectGraphicDataContext( *this, mpShapePtr ) );
+ return new OleObjectGraphicDataContext( *this, mpShapePtr );
else if ( sUri == "http://schemas.openxmlformats.org/drawingml/2006/diagram" )
- xRet.set( new DiagramGraphicDataContext( *this, mpShapePtr ) );
+ return new DiagramGraphicDataContext( *this, mpShapePtr );
else if ( sUri == "http://schemas.openxmlformats.org/drawingml/2006/chart" )
- xRet.set( new ChartGraphicDataContext( *this, mpShapePtr, mbEmbedShapesInChart ) );
+ return new ChartGraphicDataContext( *this, mpShapePtr, mbEmbedShapesInChart );
else if ( sUri.compareToAscii( "http://schemas.openxmlformats.org/drawingml/2006/table" ) == 0 )
- xRet.set( new table::TableContext( *this, mpShapePtr ) );
+ return new table::TableContext( *this, mpShapePtr );
else
{
OSL_TRACE( "OOX: Ignore graphicsData of %s", OUSTRING_TO_CSTR( sUri ) );
- return xRet;
+ return 0;
}
}
break;
}
- if( !xRet.is() )
- xRet.set( ShapeContext::createFastChildContext( aElementToken, xAttribs ) );
- return xRet;
+ return ShapeContext::onCreateContext( aElementToken, rAttribs );
}
// ============================================================================
@@ -172,17 +159,14 @@ OleObjectGraphicDataContext::~OleObjectGraphicDataContext()
pVmlDrawing->registerOleObject( mrOleObjectInfo );
}
-Reference< XFastContextHandler > OleObjectGraphicDataContext::createFastChildContext( sal_Int32 nElement, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef OleObjectGraphicDataContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
- AttributeList aAttribs( xAttribs );
-
switch( nElement )
{
case PPT_TOKEN( oleObj ):
{
- mrOleObjectInfo.maShapeId = aAttribs.getXString( XML_spid, OUString() );
- const Relation* pRelation = getRelations().getRelationFromRelId( aAttribs.getString( R_TOKEN( id ), OUString() ) );
+ mrOleObjectInfo.maShapeId = rAttribs.getXString( XML_spid, OUString() );
+ const Relation* pRelation = getRelations().getRelationFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
OSL_ENSURE( pRelation, "OleObjectGraphicDataContext::createFastChildContext - missing relation for OLE object" );
if( pRelation )
{
@@ -198,10 +182,10 @@ Reference< XFastContextHandler > OleObjectGraphicDataContext::createFastChildCon
getFilter().importBinaryData( mrOleObjectInfo.maEmbeddedData, aFragmentPath );
}
}
- mrOleObjectInfo.maName = aAttribs.getXString( XML_name, OUString() );
- mrOleObjectInfo.maProgId = aAttribs.getXString( XML_progId, OUString() );
- mrOleObjectInfo.mbShowAsIcon = aAttribs.getBool( XML_showAsIcon, false );
- xRet.set( this );
+ mrOleObjectInfo.maName = rAttribs.getXString( XML_name, OUString() );
+ mrOleObjectInfo.maProgId = rAttribs.getXString( XML_progId, OUString() );
+ mrOleObjectInfo.mbShowAsIcon = rAttribs.getBool( XML_showAsIcon, false );
+ return this;
}
break;
@@ -211,13 +195,13 @@ Reference< XFastContextHandler > OleObjectGraphicDataContext::createFastChildCon
case PPT_TOKEN( link ):
OSL_ENSURE( mrOleObjectInfo.mbLinked, "OleObjectGraphicDataContext::createFastChildContext - unexpected child element" );
- mrOleObjectInfo.mbAutoUpdate = aAttribs.getBool( XML_updateAutomatic, false );
+ mrOleObjectInfo.mbAutoUpdate = rAttribs.getBool( XML_updateAutomatic, false );
break;
case PPT_TOKEN( pic ):
- xRet.set( new GraphicShapeContext( *this, mpMasterShapePtr, mpShapePtr ) );
+ return new GraphicShapeContext( *this, mpMasterShapePtr, mpShapePtr );
break;
}
- return xRet;
+ return 0;
}
// ============================================================================
@@ -232,19 +216,16 @@ DiagramGraphicDataContext::~DiagramGraphicDataContext()
{
}
-Reference< XFastContextHandler > DiagramGraphicDataContext::createFastChildContext( ::sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs )
- throw (SAXException, RuntimeException)
+ContextHandlerRef DiagramGraphicDataContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
-
switch( aElementToken )
{
case DGM_TOKEN( relIds ):
{
- msDm = xAttribs->getOptionalValue( R_TOKEN( dm ) );
- msLo = xAttribs->getOptionalValue( R_TOKEN( lo ) );
- msQs = xAttribs->getOptionalValue( R_TOKEN( qs ) );
- msCs = xAttribs->getOptionalValue( R_TOKEN( cs ) );
+ msDm = rAttribs.getString( R_TOKEN( dm ) ).get();
+ msLo = rAttribs.getString( R_TOKEN( lo ) ).get();
+ msQs = rAttribs.getString( R_TOKEN( qs ) ).get();
+ msCs = rAttribs.getString( R_TOKEN( cs ) ).get();
loadDiagram(mpShapePtr,
getFilter(),
getFragmentPathFromRelId( msDm ),
@@ -264,10 +245,7 @@ Reference< XFastContextHandler > DiagramGraphicDataContext::createFastChildConte
break;
}
- if( !xRet.is() )
- xRet.set( ShapeContext::createFastChildContext( aElementToken, xAttribs ) );
-
- return xRet;
+ return ShapeContext::onCreateContext( aElementToken, rAttribs );
}
// ============================================================================
@@ -278,13 +256,11 @@ ChartGraphicDataContext::ChartGraphicDataContext( ContextHandler2Helper& rParent
{
}
-Reference< XFastContextHandler > ChartGraphicDataContext::createFastChildContext( ::sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs )
- throw (SAXException, RuntimeException)
+ContextHandlerRef ChartGraphicDataContext::onCreateContext( ::sal_Int32 nElement, const AttributeList& rAttribs )
{
if( nElement == C_TOKEN( chart ) )
{
- AttributeList aAttribs( rxAttribs );
- mrChartShapeInfo.maFragmentPath = getFragmentPathFromRelId( aAttribs.getString( R_TOKEN( id ), OUString() ) );
+ mrChartShapeInfo.maFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
}
return 0;
}
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx
index 8e9c75f0cb14..db49d4f40b74 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -62,14 +62,8 @@ ShapePtr ShapeContext::getShape()
return mpShapePtr;
}
-void ShapeContext::endFastElement( sal_Int32 /* aElementToken */ ) throw( SAXException, RuntimeException )
+ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
-}
-
-Reference< XFastContextHandler > ShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
-{
- Reference< XFastContextHandler > xRet;
-
switch( getBaseToken( aElementToken ) )
{
// nvSpPr CT_ShapeNonVisual begin
@@ -77,53 +71,42 @@ Reference< XFastContextHandler > ShapeContext::createFastChildContext( sal_Int32
// break;
case XML_cNvPr:
{
- AttributeList aAttribs( xAttribs );
- mpShapePtr->setHidden( aAttribs.getBool( XML_hidden, false ) );
- mpShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
- mpShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
+ mpShapePtr->setHidden( rAttribs.getBool( XML_hidden, false ) );
+ mpShapePtr->setId( rAttribs.getString( XML_id ).get() );
+ mpShapePtr->setName( rAttribs.getString( XML_name ).get() );
break;
}
case XML_hlinkMouseOver:
case XML_hlinkClick:
- xRet = new HyperLinkContext( *this, xAttribs, getShape()->getShapeProperties() );
+ return new HyperLinkContext( *this, rAttribs.getFastAttributeList(), getShape()->getShapeProperties() );
break;
case XML_ph:
- mpShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) );
- if( xAttribs->hasAttribute( XML_idx ) )
- mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
+ mpShapePtr->setSubType( rAttribs.getToken( XML_type, XML_obj ) );
+ if( rAttribs.hasAttribute( XML_idx ) )
+ mpShapePtr->setSubTypeIndex( rAttribs.getString( XML_idx ).get().toInt32() );
break;
// nvSpPr CT_ShapeNonVisual end
case XML_spPr:
- xRet = new ShapePropertiesContext( *this, *mpShapePtr );
- break;
+ return new ShapePropertiesContext( *this, *mpShapePtr );
case XML_style:
- xRet = new ShapeStyleContext( *this, *mpShapePtr );
- break;
+ return new ShapeStyleContext( *this, *mpShapePtr );
case XML_txBody:
{
TextBodyPtr xTextBody( new TextBody );
mpShapePtr->setTextBody( xTextBody );
- xRet = new TextBodyContext( *this, *xTextBody );
- break;
+ return new TextBodyContext( *this, *xTextBody );
}
case XML_txXfrm:
{
- AttributeList aAttribs( xAttribs );
- mpShapePtr->getTextBody()->getTextProperties().moRotation = aAttribs.getInteger( XML_rot );
+ mpShapePtr->getTextBody()->getTextProperties().moRotation = rAttribs.getInteger( XML_rot );
break;
}
}
- if( !xRet.is() )
- {
- uno::Reference<XFastContextHandler> xTmp(this);
- xRet.set( xTmp );
- }
-
- return xRet;
+ return this;
}
diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx
index 87f468bc2f1d..bae6d4c55015 100644
--- a/oox/source/drawingml/shapegroupcontext.cxx
+++ b/oox/source/drawingml/shapegroupcontext.cxx
@@ -53,63 +53,49 @@ ShapeGroupContext::~ShapeGroupContext()
mpMasterShapePtr->addChild( mpGroupShapePtr );
}
-Reference< XFastContextHandler > ShapeGroupContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef ShapeGroupContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
-
switch( getBaseToken( aElementToken ) )
{
case XML_cNvPr:
{
- AttributeList aAttribs( xAttribs );
- mpGroupShapePtr->setHidden( aAttribs.getBool( XML_hidden, false ) );
- mpGroupShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
- mpGroupShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
+ mpGroupShapePtr->setHidden( rAttribs.getBool( XML_hidden, false ) );
+ mpGroupShapePtr->setId( rAttribs.getString( XML_id ).get() );
+ mpGroupShapePtr->setName( rAttribs.getString( XML_name ).get() );
break;
}
case XML_ph:
- mpGroupShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, FastToken::DONTKNOW ) );
- if( xAttribs->hasAttribute( XML_idx ) )
- mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
+ mpGroupShapePtr->setSubType( rAttribs.getToken( XML_type, FastToken::DONTKNOW ) );
+ if( rAttribs.hasAttribute( XML_idx ) )
+ mpGroupShapePtr->setSubTypeIndex( rAttribs.getString( XML_idx ).get().toInt32() );
break;
// nvSpPr CT_ShapeNonVisual end
case XML_grpSpPr:
- xRet = new ShapePropertiesContext( *this, *mpGroupShapePtr );
- break;
+ return new ShapePropertiesContext( *this, *mpGroupShapePtr );
case XML_spPr:
- xRet = new ShapePropertiesContext( *this, *mpGroupShapePtr );
- break;
+ return new ShapePropertiesContext( *this, *mpGroupShapePtr );
/*
case XML_style:
- xRet = new ShapeStyleContext( getParser() );
- break;
+ return new ShapeStyleContext( getParser() );
*/
case XML_cxnSp: // connector shape
{
ShapePtr pShape(new Shape("com.sun.star.drawing.ConnectorShape"));
pShape->setLockedCanvas(mpGroupShapePtr->getLockedCanvas());
- xRet.set( new ConnectorShapeContext( *this, mpGroupShapePtr, pShape ) );
+ return new ConnectorShapeContext( *this, mpGroupShapePtr, pShape );
}
- break;
case XML_grpSp: // group shape
- xRet.set( new ShapeGroupContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GroupShape" ) ) ) );
- break;
+ return new ShapeGroupContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GroupShape" ) ) );
case XML_sp: // shape
- xRet.set( new ShapeContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.CustomShape" ) ) ) );
- break;
+ return new ShapeContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.CustomShape" ) ) );
case XML_pic: // CT_Picture
- xRet.set( new GraphicShapeContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ) ) );
- break;
+ return new GraphicShapeContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ) );
case XML_graphicFrame: // CT_GraphicalObjectFrame
- xRet.set( new GraphicalObjectFrameContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ), true ) );
- break;
+ return new GraphicalObjectFrameContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ), true );
}
- if( !xRet.is() )
- xRet.set( this );
-
- return xRet;
+ return this;
}
} }
diff --git a/oox/source/drawingml/table/tablecontext.cxx b/oox/source/drawingml/table/tablecontext.cxx
index 87900526ac1a..f83e2877b2b6 100644
--- a/oox/source/drawingml/table/tablecontext.cxx
+++ b/oox/source/drawingml/table/tablecontext.cxx
@@ -41,58 +41,48 @@ TableContext::~TableContext()
{
}
-uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
-TableContext::createFastChildContext( ::sal_Int32 aElementToken, const uno::Reference< xml::sax::XFastAttributeList >& xAttribs )
- throw ( xml::sax::SAXException, uno::RuntimeException)
+ContextHandlerRef
+TableContext::onCreateContext( ::sal_Int32 aElementToken, const AttributeList& rAttribs )
{
- uno::Reference< xml::sax::XFastContextHandler > xRet;
-
switch( aElementToken )
{
case A_TOKEN( tblPr ): // CT_TableProperties
{
- AttributeList aAttribs( xAttribs );
- mrTableProperties.isRtl() = aAttribs.getBool( XML_rtl, sal_False );
- mrTableProperties.isFirstRow() = aAttribs.getBool( XML_firstRow, sal_False );
- mrTableProperties.isFirstCol() = aAttribs.getBool( XML_firstCol, sal_False );
- mrTableProperties.isLastRow() = aAttribs.getBool( XML_lastRow, sal_False );
- mrTableProperties.isLastCol() = aAttribs.getBool( XML_lastCol, sal_False );
- mrTableProperties.isBandRow() = aAttribs.getBool( XML_bandRow, sal_False );
- mrTableProperties.isBandCol() = aAttribs.getBool( XML_bandCol, sal_False );
+ mrTableProperties.isRtl() = rAttribs.getBool( XML_rtl, sal_False );
+ mrTableProperties.isFirstRow() = rAttribs.getBool( XML_firstRow, sal_False );
+ mrTableProperties.isFirstCol() = rAttribs.getBool( XML_firstCol, sal_False );
+ mrTableProperties.isLastRow() = rAttribs.getBool( XML_lastRow, sal_False );
+ mrTableProperties.isLastCol() = rAttribs.getBool( XML_lastCol, sal_False );
+ mrTableProperties.isBandRow() = rAttribs.getBool( XML_bandRow, sal_False );
+ mrTableProperties.isBandCol() = rAttribs.getBool( XML_bandCol, sal_False );
}
break;
case A_TOKEN( tableStyle ): // CT_TableStyle
{
boost::shared_ptr< TableStyle >& rTableStyle = mrTableProperties.getTableStyle();
rTableStyle.reset( new TableStyle() );
- xRet = new TableStyleContext( *this, xAttribs, *rTableStyle );
+ return new TableStyleContext( *this, rAttribs.getFastAttributeList(), *rTableStyle );
}
- break;
case A_TOKEN( tableStyleId ): // ST_Guid
- xRet.set( new oox::drawingml::GuidContext( *this, mrTableProperties.getStyleId() ) );
- break;
+ return new oox::drawingml::GuidContext( *this, mrTableProperties.getStyleId() );
case A_TOKEN( tblGrid ): // CT_TableGrid
break;
case A_TOKEN( gridCol ): // CT_TableCol
{
std::vector< sal_Int32 >& rvTableGrid( mrTableProperties.getTableGrid() );
- rvTableGrid.push_back( xAttribs->getOptionalValue( XML_w ).toInt32() );
+ rvTableGrid.push_back( rAttribs.getString( XML_w ).get().toInt32() );
}
break;
case A_TOKEN( tr ): // CT_TableRow
{
std::vector< TableRow >& rvTableRows( mrTableProperties.getTableRows() );
rvTableRows.resize( rvTableRows.size() + 1 );
- xRet.set( new TableRowContext( *this, xAttribs, rvTableRows.back() ) );
+ return new TableRowContext( *this, rAttribs.getFastAttributeList(), rvTableRows.back() );
}
- break;
}
- if( !xRet.is() )
- xRet.set( this );
-
- return xRet;
+ return this;
}
} } }
diff --git a/oox/source/drawingml/table/tablestylelistfragmenthandler.cxx b/oox/source/drawingml/table/tablestylelistfragmenthandler.cxx
index b189d6332b9f..18d9df6a58bb 100644
--- a/oox/source/drawingml/table/tablestylelistfragmenthandler.cxx
+++ b/oox/source/drawingml/table/tablestylelistfragmenthandler.cxx
@@ -43,25 +43,20 @@ TableStyleListFragmentHandler::~TableStyleListFragmentHandler()
}
// CT_TableStyleList
-Reference< XFastContextHandler > TableStyleListFragmentHandler::createFastChildContext(
- sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs )
- throw ( SAXException, RuntimeException )
+ContextHandlerRef TableStyleListFragmentHandler::onCreateContext(
+ sal_Int32 aElementToken, const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
switch( aElementToken )
{
case A_TOKEN( tblStyleLst ): // CT_TableStyleList
- mrTableStyleList.getDefaultStyleId() = xAttribs->getOptionalValue( XML_def );
+ mrTableStyleList.getDefaultStyleId() = rAttribs.getString( XML_def ).get();
break;
case A_TOKEN( tblStyle ): // CT_TableStyle
std::vector< TableStyle >& rTableStyles = mrTableStyleList.getTableStyles();
rTableStyles.resize( rTableStyles.size() + 1 );
- xRet = new TableStyleContext( *this, xAttribs, rTableStyles.back() );
- break;
+ return new TableStyleContext( *this, rAttribs.getFastAttributeList(), rTableStyles.back() );
}
- if ( !xRet.is() )
- xRet = getFastContextHandler();
- return xRet;
+ return this;
}
// ============================================================================
diff --git a/oox/source/ppt/extdrawingfragmenthandler.cxx b/oox/source/ppt/extdrawingfragmenthandler.cxx
index 2058a5877c37..e6d4b2f5ce97 100644
--- a/oox/source/ppt/extdrawingfragmenthandler.cxx
+++ b/oox/source/ppt/extdrawingfragmenthandler.cxx
@@ -37,31 +37,24 @@ ExtDrawingFragmentHandler::~ExtDrawingFragmentHandler( ) throw ()
}
-Reference< XFastContextHandler > SAL_CALL
-ExtDrawingFragmentHandler::createFastChildContext( ::sal_Int32 aElement,
- const Reference< XFastAttributeList >& )
- throw ( SAXException, RuntimeException)
+ContextHandlerRef
+ExtDrawingFragmentHandler::onCreateContext( ::sal_Int32 aElement,
+ const AttributeList& )
{
- Reference< XFastContextHandler > xRet;
-
switch( aElement )
{
case DSP_TOKEN( drawing ):
break;
case DSP_TOKEN( spTree ):
mpShapePtr = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) );
- xRet.set( new PPTShapeGroupContext(
+ return new PPTShapeGroupContext(
*this, mpSlidePersistPtr, meShapeLocation, mpSlidePersistPtr->getShapes(),
- mpShapePtr ) );
- break;
+ mpShapePtr );
default:
break;
}
- if( !xRet.is() )
- xRet = getFastContextHandler();
-
- return xRet;
+ return this;
}
void SAL_CALL ExtDrawingFragmentHandler::endDocument() throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException)
{
diff --git a/oox/source/ppt/extdrawingfragmenthandler.hxx b/oox/source/ppt/extdrawingfragmenthandler.hxx
index 24fa1ed231b5..0b186eb93abc 100644
--- a/oox/source/ppt/extdrawingfragmenthandler.hxx
+++ b/oox/source/ppt/extdrawingfragmenthandler.hxx
@@ -30,8 +30,8 @@ public:
oox::drawingml::ShapePtr pShapePtr ) throw();
virtual ~ExtDrawingFragmentHandler() 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:
const oox::ppt::SlidePersistPtr mpSlidePersistPtr;
diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx b/oox/source/ppt/pptgraphicshapecontext.cxx
index 63ced6609439..99c7328d9952 100644
--- a/oox/source/ppt/pptgraphicshapecontext.cxx
+++ b/oox/source/ppt/pptgraphicshapecontext.cxx
@@ -60,27 +60,25 @@ static oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sa
return !nSecondPlaceholder || pPlaceholder.get() ? pPlaceholder : PPTShape::findPlaceholder( nSecondPlaceholder, rShapes );
}
-Reference< XFastContextHandler > PPTGraphicShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef PPTGraphicShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
-
switch( aElementToken )
{
// nvSpPr CT_ShapeNonVisual begin
// case NMSP_PPT|XML_drElemPr:
// break;
case PPT_TOKEN(cNvPr):
- mpShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
- mpShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
+ mpShapePtr->setId( rAttribs.getString( XML_id ).get() );
+ mpShapePtr->setName( rAttribs.getString( XML_name ).get() );
break;
case PPT_TOKEN(ph):
{
- sal_Int32 nSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) );
+ sal_Int32 nSubType( rAttribs.getToken( XML_type, XML_obj ) );
mpShapePtr->setSubType( nSubType );
- OUString sIdx( xAttribs->getOptionalValue( XML_idx ) );
+ OUString sIdx( rAttribs.getString( XML_idx ).get() );
sal_Bool bHasIdx = !sIdx.isEmpty();
sal_Int32 nIdx = sIdx.toInt32();
- if( xAttribs->hasAttribute( XML_idx ) )
+ if( rAttribs.hasAttribute( XML_idx ) )
mpShapePtr->setSubTypeIndex( nIdx );
if ( nSubType || bHasIdx )
@@ -95,7 +93,7 @@ Reference< XFastContextHandler > PPTGraphicShapeContext::createFastChildContext(
{
// TODO: use id to shape map
SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
- if ( pMasterPersist.get() && xAttribs->hasAttribute( XML_idx ) )
+ if ( pMasterPersist.get() && rAttribs.hasAttribute( XML_idx ) )
pPlaceholder = PPTShape::findPlaceholderByIndex( nIdx, pMasterPersist->getShapes()->getChildren() );
}
if ( !pPlaceholder.get() && ( ( eShapeLocation == Slide ) || ( eShapeLocation == Layout ) ) )
@@ -165,26 +163,20 @@ Reference< XFastContextHandler > PPTGraphicShapeContext::createFastChildContext(
// nvSpPr CT_ShapeNonVisual end
case PPT_TOKEN(spPr):
- xRet = new PPTShapePropertiesContext( *this, *mpShapePtr );
- break;
+ return new PPTShapePropertiesContext( *this, *mpShapePtr );
case PPT_TOKEN(style):
- xRet = new oox::drawingml::ShapeStyleContext( *this, *mpShapePtr );
- break;
+ return new oox::drawingml::ShapeStyleContext( *this, *mpShapePtr );
case PPT_TOKEN(txBody):
{
oox::drawingml::TextBodyPtr xTextBody( new oox::drawingml::TextBody );
mpShapePtr->setTextBody( xTextBody );
- xRet = new oox::drawingml::TextBodyContext( *this, *xTextBody );
- break;
+ return new oox::drawingml::TextBodyContext( *this, *xTextBody );
}
}
- if( !xRet.is() )
- xRet.set( GraphicShapeContext::createFastChildContext( aElementToken, xAttribs ) );
-
- return xRet;
+ return GraphicShapeContext::onCreateContext( aElementToken, rAttribs );
}
diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx
index 170ee420c427..c8a4eff4fe05 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -92,9 +92,8 @@ oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32
return !nSecondPlaceholder || pPlaceholder.get() ? pPlaceholder : findPlaceholder( nSecondPlaceholder, oSubTypeIndex, rShapes );
}
-Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef PPTShapeContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
if( getNamespace( aElementToken ) == NMSP_dsp )
aElementToken = NMSP_ppt | getBaseToken( aElementToken );
@@ -105,18 +104,17 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In
// break;
case PPT_TOKEN( cNvPr ):
{
- AttributeList aAttribs( xAttribs );
- mpShapePtr->setHidden( aAttribs.getBool( XML_hidden, false ) );
- mpShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
- mpShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
+ mpShapePtr->setHidden( rAttribs.getBool( XML_hidden, false ) );
+ mpShapePtr->setId( rAttribs.getString( XML_id ).get() );
+ mpShapePtr->setName( rAttribs.getString( XML_name ).get() );
break;
}
case PPT_TOKEN( ph ):
{
- sal_Int32 nSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) );
+ sal_Int32 nSubType( rAttribs.getToken( XML_type, XML_obj ) );
mpShapePtr->setSubType( nSubType );
- if( xAttribs->hasAttribute( XML_idx ) )
- mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
+ if( rAttribs.hasAttribute( XML_idx ) )
+ mpShapePtr->setSubTypeIndex( rAttribs.getString( XML_idx ).get().toInt32() );
if ( nSubType )
{
PPTShape* pPPTShapePtr = dynamic_cast< PPTShape* >( mpShapePtr.get() );
@@ -208,32 +206,25 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In
// nvSpPr CT_ShapeNonVisual end
case PPT_TOKEN( spPr ):
- xRet = new PPTShapePropertiesContext( *this, *mpShapePtr );
- break;
+ return new PPTShapePropertiesContext( *this, *mpShapePtr );
case PPT_TOKEN( style ):
- xRet = new oox::drawingml::ShapeStyleContext( *this, *mpShapePtr );
- break;
+ return new oox::drawingml::ShapeStyleContext( *this, *mpShapePtr );
case PPT_TOKEN( txBody ):
{
oox::drawingml::TextBodyPtr xTextBody( new oox::drawingml::TextBody( mpShapePtr->getTextBody() ) );
xTextBody->getTextProperties().maPropertyMap[ PROP_FontIndependentLineSpacing ] <<= static_cast< sal_Bool >( sal_True );
mpShapePtr->setTextBody( xTextBody );
- xRet = new oox::drawingml::TextBodyContext( *this, *xTextBody );
- break;
+ return new oox::drawingml::TextBodyContext( *this, *xTextBody );
}
case PPT_TOKEN( txXfrm ):
{
- xRet = new oox::drawingml::Transform2DContext( *this, xAttribs, *mpShapePtr, true );
- break;
+ return new oox::drawingml::Transform2DContext( *this, rAttribs.getFastAttributeList(), *mpShapePtr, true );
}
}
- if( !xRet.is() )
- xRet.set( this );
-
- return xRet;
+ return this;
}
diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx
index 450fb7dbf0bb..e25bf6561d0b 100644
--- a/oox/source/ppt/pptshapegroupcontext.cxx
+++ b/oox/source/ppt/pptshapegroupcontext.cxx
@@ -58,9 +58,8 @@ PPTShapeGroupContext::PPTShapeGroupContext(
{
}
-Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef PPTShapeGroupContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
- Reference< XFastContextHandler > xRet;
if( getNamespace( aElementToken ) == NMSP_dsp )
aElementToken = NMSP_ppt | getBaseToken( aElementToken );
@@ -68,41 +67,34 @@ Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( s
{
case PPT_TOKEN( cNvPr ):
{
- AttributeList aAttribs( xAttribs );
- mpGroupShapePtr->setHidden( aAttribs.getBool( XML_hidden, false ) );
- mpGroupShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
- mpGroupShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
+ mpGroupShapePtr->setHidden( rAttribs.getBool( XML_hidden, false ) );
+ mpGroupShapePtr->setId( rAttribs.getString( XML_id ).get() );
+ mpGroupShapePtr->setName( rAttribs.getString( XML_name ).get() );
break;
}
case PPT_TOKEN( ph ):
- mpGroupShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, FastToken::DONTKNOW ) );
- if( xAttribs->hasAttribute( XML_idx ) )
- mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
+ mpGroupShapePtr->setSubType( rAttribs.getToken( XML_type, FastToken::DONTKNOW ) );
+ if( rAttribs.hasAttribute( XML_idx ) )
+ mpGroupShapePtr->setSubTypeIndex( rAttribs.getString( XML_idx ).get().toInt32() );
break;
// nvSpPr CT_ShapeNonVisual end
case PPT_TOKEN( grpSpPr ):
- xRet = new oox::drawingml::ShapePropertiesContext( *this, *mpGroupShapePtr );
- break;
+ return new oox::drawingml::ShapePropertiesContext( *this, *mpGroupShapePtr );
case PPT_TOKEN( spPr ):
- xRet = new oox::drawingml::ShapePropertiesContext( *this, *mpGroupShapePtr );
- break;
+ return new oox::drawingml::ShapePropertiesContext( *this, *mpGroupShapePtr );
/*
case PPT_TOKEN( style ):
- xRet = new ShapeStyleContext( getParser() );
- break;
+ return new ShapeStyleContext( getParser() );
*/
case PPT_TOKEN( cxnSp ): // connector shape
- xRet.set( new oox::drawingml::ConnectorShapeContext( *this, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.ConnectorShape" ) ) ) );
- break;
+ return new oox::drawingml::ConnectorShapeContext( *this, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.ConnectorShape" ) ) );
case PPT_TOKEN( grpSp ): // group shape
- xRet.set( new PPTShapeGroupContext( *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) ) ) );
- break;
+ return new PPTShapeGroupContext( *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) ) );
case PPT_TOKEN( sp ): // Shape
{
- AttributeList aAttribs( xAttribs );
boost::shared_ptr<PPTShape> pShape( new PPTShape( meShapeLocation, "com.sun.star.drawing.CustomShape" ) );
- if( aAttribs.getBool( XML_useBgFill, false ) )
+ if( rAttribs.getBool( XML_useBgFill, false ) )
{
::oox::drawingml::FillProperties &aFill = pShape->getFillProperties();
aFill.moFillType = XML_solidFill;
@@ -110,28 +102,21 @@ Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( s
// TODO: We are using white here, because thats the closest we can assume (?)
aFill.maFillColor.setSrgbClr( API_RGB_WHITE );
}
- pShape->setModelId(xAttribs->getOptionalValue( XML_modelId ));
- xRet.set( new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, pShape ) );
+ pShape->setModelId(rAttribs.getString( XML_modelId ).get());
+ return new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, pShape );
}
- break;
case PPT_TOKEN( pic ): // CT_Picture
- xRet.set( new PPTGraphicShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) ) ) );
- break;
+ return new PPTGraphicShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) ) );
case PPT_TOKEN( graphicFrame ): // CT_GraphicalObjectFrame
{
if( pGraphicShape )
importExtDrawings();
pGraphicShape = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.OLE2Shape" ) );
- xRet.set( new oox::drawingml::GraphicalObjectFrameContext( *this, mpGroupShapePtr, pGraphicShape, true ) );
+ return new oox::drawingml::GraphicalObjectFrameContext( *this, mpGroupShapePtr, pGraphicShape, true );
}
- break;
-
}
- if( !xRet.is() )
- xRet.set( this );
-
- return xRet;
+ return this;
}
void PPTShapeGroupContext::importExtDrawings( )
@@ -152,7 +137,7 @@ void PPTShapeGroupContext::importExtDrawings( )
}
}
-void PPTShapeGroupContext::endFastElement( sal_Int32 /*nElement*/ ) throw (SAXException, RuntimeException)
+void PPTShapeGroupContext::onEndElement()
{
importExtDrawings();
}
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;