summaryrefslogtreecommitdiff
path: root/oox/source/ppt/slidefragmenthandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/ppt/slidefragmenthandler.cxx')
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx26
1 files changed, 21 insertions, 5 deletions
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index f07a8a265a2d..3de6a18977b8 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -45,6 +45,8 @@
#include "oox/ppt/slidemastertextstylescontext.hxx"
#include "oox/ppt/pptshapegroupcontext.hxx"
#include "oox/ppt/pptshape.hxx"
+#include "oox/vml/vmldrawing.hxx"
+#include "oox/vml/vmldrawingfragment.hxx"
#include "oox/drawingml/clrschemecontext.hxx"
@@ -64,21 +66,22 @@ SlideFragmentHandler::SlideFragmentHandler( XmlFilterBase& rFilter, const OUStri
, mpSlidePersistPtr( pPersistPtr )
, meShapeLocation( eShapeLocation )
{
- OUString aVMLDrawingFragmentPath = getFragmentPathFromType( CREATE_OFFICEDOC_RELATIONSTYPE( "vmlDrawing" ) );
+ OUString aVMLDrawingFragmentPath = getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATIONSTYPE( "vmlDrawing" ) );
if( aVMLDrawingFragmentPath.getLength() > 0 )
- {
- getFilter().importFragment( new oox::vml::DrawingFragmentHandler(
- getFilter(), aVMLDrawingFragmentPath, pPersistPtr->getDrawing()->getShapes(), pPersistPtr->getDrawing()->getShapeTypes() ) );
- }
+ getFilter().importFragment( new oox::vml::DrawingFragment(
+ getFilter(), aVMLDrawingFragmentPath, *pPersistPtr->getDrawing() ) );
}
SlideFragmentHandler::~SlideFragmentHandler() throw()
{
+ // convert and insert all VML shapes (mostly form controls)
+ mpSlidePersistPtr->getDrawing()->convertAndInsert();
}
Reference< XFastContextHandler > SlideFragmentHandler::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
{
Reference< XFastContextHandler > xRet;
+ AttributeList aAttribs( xAttribs );
switch( aElementToken )
{
@@ -100,6 +103,19 @@ Reference< XFastContextHandler > SlideFragmentHandler::createFastChildContext( s
}
break;
+ case NMSP_PPT|XML_controls:
+ xRet = getFastContextHandler();
+ break;
+ case NMSP_PPT|XML_control:
+ {
+ ::oox::vml::ControlInfo aInfo;
+ aInfo.setShapeId( aAttribs.getInteger( XML_spid, 0 ) );
+ aInfo.maFragmentPath = getFragmentPathFromRelId( aAttribs.getString( R_TOKEN( id ), OUString() ) );
+ aInfo.maName = aAttribs.getXString( XML_name, OUString() );
+ mpSlidePersistPtr->getDrawing()->registerControl( aInfo );
+ }
+ return xRet;
+
case NMSP_PPT|XML_timing: // CT_SlideTiming
xRet.set( new SlideTimingContext( *this, mpSlidePersistPtr->getTimeNodeList() ) );
break;