summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-01-16 15:37:23 +0100
committerRadek Doulik <rodo@novell.com>2012-01-16 15:45:23 +0100
commitac94ca1f07ec5fd04e8d941d8cac05e1a267059e (patch)
treed2f101d52c7313666e86873e0e0505d4a39112d8
parent9b7d7322401da8ce42affb9e6bd408311b383ec4 (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)
-rw-r--r--oox/source/ppt/pptshape.cxx40
1 files changed, 36 insertions, 4 deletions
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 8ea04c422de0..e7a0a4187280 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;
}
}