diff options
Diffstat (limited to 'oox/source/ppt')
-rw-r--r-- | oox/source/ppt/animvariantcontext.cxx | 2 | ||||
-rw-r--r-- | oox/source/ppt/backgroundproperties.cxx | 2 | ||||
-rw-r--r-- | oox/source/ppt/commontimenodecontext.cxx | 8 | ||||
-rw-r--r-- | oox/source/ppt/conditioncontext.cxx | 2 | ||||
-rw-r--r-- | oox/source/ppt/pptimport.cxx | 11 | ||||
-rw-r--r-- | oox/source/ppt/presentationfragmenthandler.cxx | 14 | ||||
-rw-r--r-- | oox/source/ppt/slidefragmenthandler.cxx | 26 | ||||
-rw-r--r-- | oox/source/ppt/slidepersist.cxx | 7 | ||||
-rw-r--r-- | oox/source/ppt/slidetimingcontext.cxx | 4 | ||||
-rw-r--r-- | oox/source/ppt/slidetransitioncontext.cxx | 6 | ||||
-rw-r--r-- | oox/source/ppt/soundactioncontext.cxx | 2 | ||||
-rw-r--r-- | oox/source/ppt/timenodelistcontext.cxx | 4 | ||||
-rw-r--r-- | oox/source/ppt/timetargetelementcontext.cxx | 2 |
13 files changed, 50 insertions, 40 deletions
diff --git a/oox/source/ppt/animvariantcontext.cxx b/oox/source/ppt/animvariantcontext.cxx index e5f7f387b3cb..e8f60d9df234 100644 --- a/oox/source/ppt/animvariantcontext.cxx +++ b/oox/source/ppt/animvariantcontext.cxx @@ -89,7 +89,7 @@ namespace oox { namespace ppt { break; } case NMSP_PPT|XML_clrVal: - xRet.set( new ::oox::drawingml::colorChoiceContext( *this, maColor ) ); + xRet.set( new ::oox::drawingml::ColorContext( *this, maColor ) ); // we'll defer setting the Any until the end. break; case NMSP_PPT|XML_fltVal: diff --git a/oox/source/ppt/backgroundproperties.cxx b/oox/source/ppt/backgroundproperties.cxx index c17870f14edd..14ca161c8337 100644 --- a/oox/source/ppt/backgroundproperties.cxx +++ b/oox/source/ppt/backgroundproperties.cxx @@ -60,7 +60,7 @@ Reference< XFastContextHandler > BackgroundPropertiesContext::createFastChildCon // FillPropertiesGroupContext if( !xRet.is() ) - xRet = ::oox::drawingml::FillPropertiesGroupContext::StaticCreateContext( *this, aElementToken, xAttribs, mrFillProperties ); + xRet = ::oox::drawingml::FillPropertiesContext::createFillContext( *this, aElementToken, xAttribs, mrFillProperties ); return xRet; } diff --git a/oox/source/ppt/commontimenodecontext.cxx b/oox/source/ppt/commontimenodecontext.cxx index 291727a5e1aa..b24cb1a6ba54 100644 --- a/oox/source/ppt/commontimenodecontext.cxx +++ b/oox/source/ppt/commontimenodecontext.cxx @@ -458,12 +458,12 @@ static OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId } if( attribs.hasAttribute( XML_grpId ) ) { - attribs.getUnsignedInteger( XML_grpId, 0 ); + attribs.getUnsigned( XML_grpId, 0 ); } // ST_TLTimeNodeID if( attribs.hasAttribute( XML_id ) ) { - sal_uInt32 nId = attribs.getUnsignedInteger( XML_id, 0 ); + sal_uInt32 nId = attribs.getUnsigned( XML_id, 0 ); pNode->setId( nId ); } // ST_TLTimeNodeMasterRelation @@ -687,7 +687,7 @@ static OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId if( mbIterate ) { AttributeList attribs( xAttribs ); - double fTime = attribs.getUnsignedInteger( XML_val, 0 ); + double fTime = attribs.getUnsigned( XML_val, 0 ); // time in ms. property is in % TODO mpNode->getNodeProperties()[ NP_ITERATEINTERVAL ] <<= fTime; } @@ -696,7 +696,7 @@ static OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId if( mbIterate ) { AttributeList attribs( xAttribs ); - double fPercent = (double)attribs.getUnsignedInteger( XML_val, 0 ) / 100000.0; + double fPercent = (double)attribs.getUnsigned( XML_val, 0 ) / 100000.0; mpNode->getNodeProperties()[ NP_ITERATEINTERVAL ] <<= fPercent; } break; diff --git a/oox/source/ppt/conditioncontext.cxx b/oox/source/ppt/conditioncontext.cxx index 29f7e5ae1550..8c49785486e5 100644 --- a/oox/source/ppt/conditioncontext.cxx +++ b/oox/source/ppt/conditioncontext.cxx @@ -154,7 +154,7 @@ namespace oox { namespace ppt { { maCond.mnType = aElementToken; AttributeList attribs( xAttribs ); - sal_uInt32 nId = attribs.getUnsignedInteger( XML_val, 0 ); + sal_uInt32 nId = attribs.getUnsigned( XML_val, 0 ); maCond.maValue = makeAny( nId ); break; } diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index 27074a436b49..f772a9236785 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -75,9 +75,9 @@ bool PowerPointImport::importDocument() throw() file:///<path-to-oox-module>/source/dump/pptxdumper.ini. */ OOX_DUMP_FILE( ::oox::dump::pptx::Dumper ); - OUString aFragmentPath = getFragmentPathFromType( CREATE_OFFICEDOC_RELATIONSTYPE( "officeDocument" ) ); + OUString aFragmentPath = getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATIONSTYPE( "officeDocument" ) ); FragmentHandlerRef xPresentationFragmentHandler( new PresentationFragmentHandler( *this, aFragmentPath ) ); - maTableStyleListPath = xPresentationFragmentHandler->getFragmentPathFromType( CREATE_OFFICEDOC_RELATIONSTYPE( "tableStyles" ) ); + maTableStyleListPath = xPresentationFragmentHandler->getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATIONSTYPE( "tableStyles" ) ); return importFragment( xPresentationFragmentHandler ); @@ -132,12 +132,9 @@ sal_Int32 PowerPointImport::getSchemeClr( sal_Int32 nColorSchemeToken ) const return nColor; } -const oox::vml::DrawingPtr PowerPointImport::getDrawings() +::oox::vml::Drawing* PowerPointImport::getVmlDrawing() { - oox::vml::DrawingPtr xRet; - if ( mpActualSlidePersist ) - xRet = mpActualSlidePersist->getDrawing(); - return xRet; + return mpActualSlidePersist ? mpActualSlidePersist->getDrawing() : 0; } const oox::drawingml::table::TableStyleListPtr PowerPointImport::getTableStyles() diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index 09b089075173..287e64e14b55 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -111,18 +111,18 @@ void PresentationFragmentHandler::endDocument() throw (SAXException, RuntimeExce if( aSlideFragmentPath.getLength() > 0 ) { SlidePersistPtr pMasterPersistPtr; - SlidePersistPtr pSlidePersistPtr( new SlidePersist( sal_False, sal_False, xSlide, + SlidePersistPtr pSlidePersistPtr( new SlidePersist( rFilter, sal_False, sal_False, xSlide, ShapePtr( new PPTShape( Slide, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) ); FragmentHandlerRef xSlideFragmentHandler( new SlideFragmentHandler( rFilter, aSlideFragmentPath, pSlidePersistPtr, Slide ) ); // importing the corresponding masterpage/layout - OUString aLayoutFragmentPath = xSlideFragmentHandler->getFragmentPathFromType( CREATE_OFFICEDOC_RELATIONSTYPE( "slideLayout" ) ); + OUString aLayoutFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATIONSTYPE( "slideLayout" ) ); if ( aLayoutFragmentPath.getLength() > 0 ) { // importing layout RelationsRef xLayoutRelations = rFilter.importRelations( aLayoutFragmentPath ); - OUString aMasterFragmentPath = xLayoutRelations->getFragmentPathFromType( CREATE_OFFICEDOC_RELATIONSTYPE( "slideMaster" ) ); + OUString aMasterFragmentPath = xLayoutRelations->getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATIONSTYPE( "slideMaster" ) ); if( aMasterFragmentPath.getLength() ) { // check if the corresponding masterpage+layout has already been imported @@ -148,7 +148,7 @@ void PresentationFragmentHandler::endDocument() throw (SAXException, RuntimeExce else xMasterPage = xMasterPages->insertNewByIndex( xMasterPages->getCount() ); - pMasterPersistPtr = SlidePersistPtr( new SlidePersist( sal_True, sal_False, xMasterPage, + pMasterPersistPtr = SlidePersistPtr( new SlidePersist( rFilter, sal_True, sal_False, xMasterPage, ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) ); pMasterPersistPtr->setLayoutPath( aLayoutFragmentPath ); rFilter.getMasterPages().push_back( pMasterPersistPtr ); @@ -156,7 +156,7 @@ void PresentationFragmentHandler::endDocument() throw (SAXException, RuntimeExce FragmentHandlerRef xMasterFragmentHandler( new SlideFragmentHandler( rFilter, aMasterFragmentPath, pMasterPersistPtr, Master ) ); // set the correct theme - OUString aThemeFragmentPath = xMasterFragmentHandler->getFragmentPathFromType( CREATE_OFFICEDOC_RELATIONSTYPE( "theme" ) ); + OUString aThemeFragmentPath = xMasterFragmentHandler->getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATIONSTYPE( "theme" ) ); if( aThemeFragmentPath.getLength() > 0 ) { std::map< OUString, oox::drawingml::ThemePtr >& rThemes( rFilter.getThemes() ); @@ -194,7 +194,7 @@ void PresentationFragmentHandler::endDocument() throw (SAXException, RuntimeExce pSlidePersistPtr->createXShapes( rFilter ); // now importing the notes page - OUString aNotesFragmentPath = xSlideFragmentHandler->getFragmentPathFromType( CREATE_OFFICEDOC_RELATIONSTYPE( "notesSlide" ) ); + OUString aNotesFragmentPath = xSlideFragmentHandler->getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATIONSTYPE( "notesSlide" ) ); if( aNotesFragmentPath.getLength() > 0 ) { Reference< XPresentationPage > xPresentationPage( xSlide, UNO_QUERY ); @@ -203,7 +203,7 @@ void PresentationFragmentHandler::endDocument() throw (SAXException, RuntimeExce Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() ); if ( xNotesPage.is() ) { - SlidePersistPtr pNotesPersistPtr( new SlidePersist( sal_False, sal_True, xNotesPage, + SlidePersistPtr pNotesPersistPtr( new SlidePersist( rFilter, sal_False, sal_True, xNotesPage, ShapePtr( new PPTShape( Slide, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) ); FragmentHandlerRef xNotesFragmentHandler( new SlideFragmentHandler( getFilter(), aNotesFragmentPath, pNotesPersistPtr, Slide ) ); rFilter.getNotesPages().push_back( pNotesPersistPtr ); 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; diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index 2644a5b36ba0..5ce09bbbdbd5 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -33,6 +33,7 @@ #include "oox/ppt/pptshape.hxx" #include "oox/ppt/slidepersist.hxx" #include "oox/drawingml/fillproperties.hxx" +#include "oox/vml/vmldrawing.hxx" #include "oox/core/namespaces.hxx" #include "oox/core/xmlfilterbase.hxx" #include "tokens.hxx" @@ -52,10 +53,10 @@ using namespace ::com::sun::star::animations; namespace oox { namespace ppt { -SlidePersist::SlidePersist( sal_Bool bMaster, sal_Bool bNotes, +SlidePersist::SlidePersist( XmlFilterBase& rFilter, sal_Bool bMaster, sal_Bool bNotes, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& rxPage, oox::drawingml::ShapePtr pShapesPtr, const drawingml::TextListStylePtr & pDefaultTextStyle ) -: mpDrawingPtr( new oox::vml::Drawing ) +: mpDrawingPtr( new oox::vml::Drawing( rFilter, rxPage, oox::vml::VMLDRAWING_POWERPOINT ) ) , mxPage( rxPage ) , maShapesPtr( pShapesPtr ) , mnLayoutValueToken( 0 ) @@ -181,7 +182,7 @@ void SlidePersist::createBackground( const XmlFilterBase& rFilterBase ) PropertySet aPropSet( xPropertySet ); mpBackgroundPropertiesPtr->pushToPropSet( aPropSet, ::oox::drawingml::FillProperties::DEFAULT_IDS, - rFilterBase, rFilterBase.getModelObjectContainer(), 0, -1 ); + rFilterBase, rFilterBase.getModelObjectHelper(), 0, -1 ); xPagePropSet->setPropertyValue( sBackground, Any( xPropertySet ) ); } catch( Exception ) diff --git a/oox/source/ppt/slidetimingcontext.cxx b/oox/source/ppt/slidetimingcontext.cxx index 96e6069373e7..7fc20d0066e2 100644 --- a/oox/source/ppt/slidetimingcontext.cxx +++ b/oox/source/ppt/slidetimingcontext.cxx @@ -38,7 +38,6 @@ #include "oox/drawingml/shapegroupcontext.hxx" #include "oox/helper/attributelist.hxx" #include "oox/core/namespaces.hxx" -#include "oox/core/skipcontext.hxx" #include "oox/ppt/timenodelistcontext.hxx" #include "buildlistcontext.hxx" #include "tokens.hxx" @@ -80,8 +79,7 @@ Reference< XFastContextHandler > SlideTimingContext::createFastChildContext( sal xRet.set( new BuildListContext( *this, xAttribs, maTimeNodeList ) ); break; case NMSP_PPT|XML_extLst: - xRet.set( new SkipContext( *this ) ); - break; + return xRet; case NMSP_PPT|XML_tnLst: // timing nodes { diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx index 80b5cdd6b706..3d22ad670af2 100644 --- a/oox/source/ppt/slidetransitioncontext.cxx +++ b/oox/source/ppt/slidetransitioncontext.cxx @@ -42,7 +42,6 @@ #include "oox/drawingml/shapegroupcontext.hxx" #include "oox/helper/attributelist.hxx" #include "oox/core/namespaces.hxx" -#include "oox/core/skipcontext.hxx" #include "tokens.hxx" @@ -154,7 +153,7 @@ Reference< XFastContextHandler > SlideTransitionContext::createFastChildContext( { mbHasTransition = true; AttributeList attribs(xAttribs); - maTransition.setOoxTransitionType( aElementToken, attribs.getUnsignedInteger( XML_spokes, 4 ), 0 ); + maTransition.setOoxTransitionType( aElementToken, attribs.getUnsigned( XML_spokes, 4 ), 0 ); // unsignedInt } break; @@ -179,8 +178,7 @@ Reference< XFastContextHandler > SlideTransitionContext::createFastChildContext( xRet.set( new SoundActionContext ( *this, maSlideProperties ) ); break; case NMSP_PPT|XML_extLst: // CT_OfficeArtExtensionList - xRet.set( new SkipContext( *this ) ); - break; + return xRet; default: break; } diff --git a/oox/source/ppt/soundactioncontext.cxx b/oox/source/ppt/soundactioncontext.cxx index 24a675b072d4..0df2ed896685 100644 --- a/oox/source/ppt/soundactioncontext.cxx +++ b/oox/source/ppt/soundactioncontext.cxx @@ -115,7 +115,7 @@ namespace oox { namespace ppt { drawingml::EmbeddedWAVAudioFile aAudio; drawingml::getEmbeddedWAVAudioFile( getRelations(), xAttribs, aAudio); - msSndName = ( aAudio.mbBuiltIn ? aAudio.msName : aAudio.msLink ); + msSndName = ( aAudio.mbBuiltIn ? aAudio.msName : aAudio.msEmbed ); } break; case NMSP_PPT|XML_endSnd: diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index 7199afac01f4..70da57a52bd4 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -565,11 +565,11 @@ namespace oox { namespace ppt { break; case NMSP_PPT|XML_to: // CT_Color - xRet.set( new colorChoiceContext( *this, maToClr ) ); + xRet.set( new ColorContext( *this, maToClr ) ); break; case NMSP_PPT|XML_from: // CT_Color - xRet.set( new colorChoiceContext( *this, maFromClr ) ); + xRet.set( new ColorContext( *this, maFromClr ) ); break; default: diff --git a/oox/source/ppt/timetargetelementcontext.cxx b/oox/source/ppt/timetargetelementcontext.cxx index a3e41657af85..59a544df951e 100644 --- a/oox/source/ppt/timetargetelementcontext.cxx +++ b/oox/source/ppt/timetargetelementcontext.cxx @@ -152,7 +152,7 @@ namespace oox { namespace ppt { drawingml::EmbeddedWAVAudioFile aAudio; drawingml::getEmbeddedWAVAudioFile( getRelations(), xAttribs, aAudio); - OUString sSndName = ( aAudio.mbBuiltIn ? aAudio.msName : aAudio.msLink ); + OUString sSndName = ( aAudio.mbBuiltIn ? aAudio.msName : aAudio.msEmbed ); mpTarget->msValue = sSndName; break; } |