summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-05 17:49:23 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-05 17:49:23 +0000
commit76a616c506ab2ba0ebed0289e525d626244eea7c (patch)
tree5645603974c7c7bd5d1673f602e0b60a6fdc9eb3 /oox
parent4b25f4d14207409e05abaec1d599ef6e53e08767 (diff)
INTEGRATION: CWS xmlfilter03_DEV300 (1.2.4); FILE MERGED
2008/02/06 10:11:18 dr 1.2.4.2: implement ThemeFragmentHandler using FragmentHandler2 2008/02/04 13:32:48 dr 1.2.4.1: rework of fragment handler/context handler base classes
Diffstat (limited to 'oox')
-rw-r--r--oox/source/ppt/pptshapegroupcontext.cxx29
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx29
2 files changed, 31 insertions, 27 deletions
diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx
index f5b7a0703237..596026813006 100644
--- a/oox/source/ppt/pptshapegroupcontext.cxx
+++ b/oox/source/ppt/pptshapegroupcontext.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: pptshapegroupcontext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2008-01-17 08:06:00 $
+ * last change: $Author: kz $ $Date: 2008-03-05 18:48:40 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -60,10 +60,13 @@ using namespace ::com::sun::star::xml::sax;
namespace oox { namespace ppt {
-PPTShapeGroupContext::PPTShapeGroupContext( const oox::ppt::SlidePersistPtr pSlidePersistPtr, const ShapeLocation eShapeLocation,
- const FragmentHandlerRef& xHandler, sal_Int32 aElementToken,
- oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pGroupShapePtr )
-: ShapeGroupContext( xHandler, aElementToken, pMasterShapePtr, pGroupShapePtr )
+PPTShapeGroupContext::PPTShapeGroupContext(
+ ContextHandler& rParent,
+ const oox::ppt::SlidePersistPtr pSlidePersistPtr,
+ const ShapeLocation eShapeLocation,
+ oox::drawingml::ShapePtr pMasterShapePtr,
+ oox::drawingml::ShapePtr pGroupShapePtr )
+: ShapeGroupContext( rParent, pMasterShapePtr, pGroupShapePtr )
, mpSlidePersistPtr( pSlidePersistPtr )
, meShapeLocation( eShapeLocation )
{
@@ -86,10 +89,10 @@ Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( s
// nvSpPr CT_ShapeNonVisual end
case NMSP_PPT|XML_grpSpPr:
- xRet = new oox::drawingml::ShapePropertiesContext( this, *(mpGroupShapePtr.get()) );
+ xRet = new oox::drawingml::ShapePropertiesContext( *this, *mpGroupShapePtr );
break;
case NMSP_PPT|XML_spPr:
- xRet = new oox::drawingml::ShapePropertiesContext( this, *(mpGroupShapePtr.get()) );
+ xRet = new oox::drawingml::ShapePropertiesContext( *this, *mpGroupShapePtr );
break;
/*
case NMSP_PPT|XML_style:
@@ -97,19 +100,19 @@ Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( s
break;
*/
case NMSP_PPT|XML_cxnSp: // connector shape
- xRet.set( new oox::drawingml::ConnectorShapeContext( getHandler(), aElementToken, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.ConnectorShape" ) ) ) );
+ xRet.set( new oox::drawingml::ConnectorShapeContext( *this, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.ConnectorShape" ) ) ) );
break;
case NMSP_PPT|XML_grpSp: // group shape
- xRet.set( new PPTShapeGroupContext( mpSlidePersistPtr, meShapeLocation, getHandler(), aElementToken, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) ) ) );
+ xRet.set( new PPTShapeGroupContext( *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) ) ) );
break;
case NMSP_PPT|XML_sp: // Shape
- xRet.set( new oox::ppt::PPTShapeContext( mpSlidePersistPtr, getHandler(), mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.CustomShape" ) ) ) );
+ xRet.set( new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.CustomShape" ) ) ) );
break;
case NMSP_PPT|XML_pic: // CT_Picture
- xRet.set( new oox::drawingml::GraphicShapeContext( getHandler(), mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) ) ) );
+ xRet.set( new oox::drawingml::GraphicShapeContext( *this, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) ) ) );
break;
case NMSP_PPT|XML_graphicFrame: // CT_GraphicalObjectFrame
- xRet.set( new oox::drawingml::GraphicalObjectFrameContext( getHandler(), mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.OLE2Shape" ) ) ) );
+ xRet.set( new oox::drawingml::GraphicalObjectFrameContext( *this, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.OLE2Shape" ) ) ) );
break;
}
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 1740144cff5f..1ccf4d063b97 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: slidefragmenthandler.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2008-01-17 08:06:00 $
+ * last change: $Author: kz $ $Date: 2008-03-05 18:49:23 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -62,15 +62,15 @@ using namespace ::com::sun::star::container;
namespace oox { namespace ppt {
-SlideFragmentHandler::SlideFragmentHandler( const oox::core::XmlFilterRef& xFilter, const ::rtl::OUString& rFragmentPath, oox::ppt::SlidePersistPtr pPersistPtr, const oox::ppt::ShapeLocation eShapeLocation ) throw()
-: FragmentHandler( xFilter, rFragmentPath )
+SlideFragmentHandler::SlideFragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, SlidePersistPtr pPersistPtr, const ShapeLocation eShapeLocation ) throw()
+: FragmentHandler( rFilter, rFragmentPath )
, mpSlidePersistPtr( pPersistPtr )
, meShapeLocation( eShapeLocation )
{
- OUString aVMLDrawingFragmentPath = getFragmentPathFromType( CREATE_RELATIONS_TYPE( "vmlDrawing" ) );
+ OUString aVMLDrawingFragmentPath = getFragmentPathFromType( CREATE_OFFICEDOC_RELATIONSTYPE( "vmlDrawing" ) );
if( aVMLDrawingFragmentPath.getLength() > 0 )
{
- getFilter()->importFragment( new oox::vml::DrawingFragmentHandler(
+ getFilter().importFragment( new oox::vml::DrawingFragmentHandler(
getFilter(), aVMLDrawingFragmentPath, pPersistPtr->getDrawing() ) );
}
}
@@ -97,23 +97,24 @@ Reference< XFastContextHandler > SlideFragmentHandler::createFastChildContext( s
case NMSP_PPT|XML_spTree: // CT_GroupShape
{
- xRet.set( new PPTShapeGroupContext( mpSlidePersistPtr, meShapeLocation, this, aElementToken, mpSlidePersistPtr->getShapes(),
- oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) ) ) );
+ xRet.set( new PPTShapeGroupContext(
+ *this, mpSlidePersistPtr, meShapeLocation, mpSlidePersistPtr->getShapes(),
+ oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) ) ) );
}
break;
case NMSP_PPT|XML_timing: // CT_SlideTiming
- xRet.set( new SlideTimingContext( this, mpSlidePersistPtr->getTimeNodeList() ) );
+ xRet.set( new SlideTimingContext( *this, mpSlidePersistPtr->getTimeNodeList() ) );
break;
case NMSP_PPT|XML_transition: // CT_SlideTransition
- xRet.set( new SlideTransitionContext( this, xAttribs, maSlideProperties ) );
+ xRet.set( new SlideTransitionContext( *this, xAttribs, maSlideProperties ) );
break;
// BackgroundGroup
case NMSP_PPT|XML_bgPr: // CT_BackgroundProperties
{
FillPropertiesPtr pFillPropertiesPtr( new FillProperties() );
- xRet.set( new BackgroundPropertiesContext( this, pFillPropertiesPtr ) );
+ xRet.set( new BackgroundPropertiesContext( *this, pFillPropertiesPtr ) );
mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
}
break;
@@ -123,7 +124,7 @@ Reference< XFastContextHandler > SlideFragmentHandler::createFastChildContext( s
case NMSP_PPT|XML_clrMap: // CT_ColorMapping
{
oox::drawingml::ClrMapPtr pClrMapPtr( new oox::drawingml::ClrMap() );
- xRet.set( new oox::drawingml::clrMapContext( this, xAttribs, *pClrMapPtr.get() ) );
+ xRet.set( new oox::drawingml::clrMapContext( *this, xAttribs, *pClrMapPtr ) );
mpSlidePersistPtr->setClrMap( pClrMapPtr );
}
break;
@@ -131,7 +132,7 @@ Reference< XFastContextHandler > SlideFragmentHandler::createFastChildContext( s
case NMSP_PPT|XML_sldLayoutIdLst: // CT_SlideLayoutIdList
break;
case NMSP_PPT|XML_txStyles: // CT_SlideMasterTextStyles
- xRet.set( new SlideMasterTextStylesContext( this, mpSlidePersistPtr ) );
+ xRet.set( new SlideMasterTextStylesContext( *this, mpSlidePersistPtr ) );
break;
case NMSP_PPT|XML_custDataLst: // CT_CustomerDataList
case NMSP_PPT|XML_tagLst: // CT_TagList
@@ -139,7 +140,7 @@ Reference< XFastContextHandler > SlideFragmentHandler::createFastChildContext( s
}
if( !xRet.is() )
- xRet.set(this);
+ xRet = getFastContextHandler();
return xRet;
}