summaryrefslogtreecommitdiff
path: root/oox/source/ppt/pptshape.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/ppt/pptshape.cxx')
-rw-r--r--oox/source/ppt/pptshape.cxx57
1 files changed, 34 insertions, 23 deletions
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 016857161696..7b8c1ca95d35 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -93,6 +93,12 @@ void PPTShape::addShape(
aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle();
}
break;
+ case XML_subTitle :
+ {
+ if ( ( meShapeLocation == Master ) || ( meShapeLocation == Layout ) )
+ sServiceName = rtl::OUString();
+ }
+ break;
case XML_obj :
{
const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.OutlinerShape" ) );
@@ -155,37 +161,42 @@ void PPTShape::addShape(
break;
}
}
- if ( !aMasterTextListStyle.get() )
- aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getOtherTextStyle() : rSlidePersist.getOtherTextStyle();
- setMasterTextListStyle( aMasterTextListStyle );
- Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, bClearText ) );
- if ( !rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && ( (sal_Int32)mnSubType == XML_title ) )
+ if ( sServiceName.getLength() )
{
- try
- {
- rtl::OUString aTitleText;
- Reference< XTextRange > xText( xShape, UNO_QUERY_THROW );
- aTitleText = xText->getString();
- if ( aTitleText.getLength() && ( aTitleText.getLength() < 64 ) ) // just a magic value, but we don't want to set slide names which are too long
+ if ( !aMasterTextListStyle.get() )
+ aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getOtherTextStyle() : rSlidePersist.getOtherTextStyle();
+ setMasterTextListStyle( aMasterTextListStyle );
+
+ Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, bClearText ) );
+ if ( !rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && ( (sal_Int32)mnSubType == XML_title ) )
+ {
+ try
+ {
+ rtl::OUString aTitleText;
+ Reference< XTextRange > xText( xShape, UNO_QUERY_THROW );
+ aTitleText = xText->getString();
+ if ( aTitleText.getLength() && ( aTitleText.getLength() < 64 ) ) // just a magic value, but we don't want to set slide names which are too long
+ {
+ Reference< container::XNamed > xName( rSlidePersist.getPage(), UNO_QUERY_THROW );
+ xName->setName( aTitleText );
+ }
+ }
+ catch( uno::Exception& )
{
- Reference< container::XNamed > xName( rSlidePersist.getPage(), UNO_QUERY_THROW );
- xName->setName( aTitleText );
+
}
}
- catch( uno::Exception& )
+ if( pShapeMap && msId.getLength() )
{
+ (*pShapeMap)[ msId ] = shared_from_this();
}
- }
- if( pShapeMap && msId.getLength() )
- {
- (*pShapeMap)[ msId ] = shared_from_this();
- }
- // if this is a group shape, we have to add also each child shape
- Reference< XShapes > xShapes( xShape, UNO_QUERY );
- if ( xShapes.is() )
- addChildren( rFilterBase, *this, pTheme, xShapes, pShapeRect ? *pShapeRect : awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap );
+ // if this is a group shape, we have to add also each child shape
+ Reference< XShapes > xShapes( xShape, UNO_QUERY );
+ if ( xShapes.is() )
+ addChildren( rFilterBase, *this, pTheme, xShapes, pShapeRect ? *pShapeRect : awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap );
+ }
}
}
catch( const Exception& )