diff options
author | Radek Doulik <rodo@novell.com> | 2012-01-16 15:37:23 +0100 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2012-01-16 15:41:26 +0100 |
commit | 229b0cc0029e93fa808624d8aa4dcfa2e289b1aa (patch) | |
tree | 5a310705d3b1b65f805a80491b46e1ef068e6675 /oox/source | |
parent | cf23f57ae6bb7af689a45e0a850c3c2f67a8f810 (diff) |
handle [more] placeholder shapes in Layout slides
- import them as outliner shapes, so that they don't appear on regular slides
- choose appropriate placeholder shapes on regular slides (Table, Picture, Chart, Media)
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/ppt/pptshape.cxx | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index dfb4a38c338c..17ceb301a7fc 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -126,7 +126,7 @@ void PPTShape::addShape( const awt::Rectangle* pShapeRect, ::oox::drawingml::ShapeIdMap* pShapeMap ) { - OSL_TRACE("add shape id: %s location: %s", rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr(), meShapeLocation == Master ? "master" : meShapeLocation == Slide ? "slide" : "other"); + OSL_TRACE("add shape id: %s location: %s subtype: %d service: %s", rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr(), meShapeLocation == Master ? "master" : meShapeLocation == Slide ? "slide" : meShapeLocation == Layout ? "layout" : "other", mnSubType, rtl::OUStringToOString(msServiceName, RTL_TEXTENCODING_UTF8 ).getStr()); // only placeholder from layout are being inserted if ( mnSubType && ( meShapeLocation == Master ) ) return; @@ -142,6 +142,7 @@ void PPTShape::addShape( if ( sServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape")) && sServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")) ) { + const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.OutlinerShape" ) ); OSL_TRACE("has master: %p", rSlidePersist.getMasterPersist().get()); switch( mnSubType ) { @@ -166,7 +167,6 @@ void PPTShape::addShape( break; case XML_obj : { - const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.OutlinerShape" ) ); sServiceName = sOutlinerShapeService; aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getBodyTextStyle() : rSlidePersist.getBodyTextStyle(); } @@ -174,7 +174,6 @@ void PPTShape::addShape( case XML_body : { const rtl::OUString sNotesShapeService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.NotesShape" ) ); - const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.OutlinerShape" ) ); if ( rSlidePersist.isNotesPage() ) { sServiceName = sNotesShapeService; @@ -221,8 +220,41 @@ void PPTShape::addShape( sServiceName = sPageShapeService; } break; - + case XML_chart : + if ( meShapeLocation == Layout ) + sServiceName = sOutlinerShapeService; + else { + const rtl::OUString sChartService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.ChartShape" ) ); + sServiceName = sChartService; + } + break; + case XML_tbl : + if ( meShapeLocation == Layout ) + sServiceName = sOutlinerShapeService; + else { + const rtl::OUString sTableService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.TableShape" ) ); + sServiceName = sTableService; + } + break; + case XML_pic : + if ( meShapeLocation == Layout ) + sServiceName = sOutlinerShapeService; + else { + const rtl::OUString sGraphicObjectService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.GraphicObjectShape" ) ); + sServiceName = sGraphicObjectService; + } + break; + case XML_media : + if ( meShapeLocation == Layout ) + sServiceName = sOutlinerShapeService; + else { + const rtl::OUString sMediaService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.MediaShape" ) ); + sServiceName = sMediaService; + } + break; default: + if ( mnSubType && meShapeLocation == Layout ) + sServiceName = sOutlinerShapeService; break; } } |