diff options
author | Kurosawa Takeshi <taken.spc@gmail.com> | 2013-11-16 01:25:50 +0100 |
---|---|---|
committer | Thorsten Behrens <thb@documentfoundation.org> | 2013-11-16 01:28:33 +0100 |
commit | be7c599a125df6946c1b5a1233cda27740081273 (patch) | |
tree | 01c6c954506c7de91606d894ea77f9c7ea744401 /filter | |
parent | 1e3bc2925c0ec1b03d6ae7cf3f281b0df3ec88d3 (diff) |
fdo#33243 Fix SVG export presentation placeholder texts exported
Change-Id: I3eea9989128635616bc154466f169aed201bb5dc
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/svg/svgexport.cxx | 26 | ||||
-rw-r--r-- | filter/source/svg/svgfilter.hxx | 6 |
2 files changed, 23 insertions, 9 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 6bdfdb1edfb7..6065416df5c3 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1552,12 +1552,12 @@ sal_Bool SVGFilter::implExportPage( const OUString & sPageId, SvXMLElementExport aExp2( *mpSVGExport, XML_NAMESPACE_NONE, "g", sal_True, sal_True ); // append all shapes that make up the Master Slide - bRet = implExportShapes( xShapes ) || bRet; + bRet = implExportShapes( xShapes, true ) || bRet; } // append the </g> closing tag related to the Background Objects else { // append all shapes that make up the Slide - bRet = implExportShapes( xShapes ) || bRet; + bRet = implExportShapes( xShapes, false ) || bRet; } } // append the </g> closing tag related to the Slide/Master_Slide @@ -1567,7 +1567,8 @@ sal_Bool SVGFilter::implExportPage( const OUString & sPageId, // ----------------------------------------------------------------------------- -sal_Bool SVGFilter::implExportShapes( const Reference< XShapes >& rxShapes ) +sal_Bool SVGFilter::implExportShapes( const Reference< XShapes >& rxShapes, + sal_Bool bMaster ) { Reference< XShape > xShape; sal_Bool bRet = sal_False; @@ -1575,7 +1576,7 @@ sal_Bool SVGFilter::implExportShapes( const Reference< XShapes >& rxShapes ) for( sal_Int32 i = 0, nCount = rxShapes->getCount(); i < nCount; ++i ) { if( ( rxShapes->getByIndex( i ) >>= xShape ) && xShape.is() ) - bRet = implExportShape( xShape ) || bRet; + bRet = implExportShape( xShape, bMaster ) || bRet; xShape = NULL; } @@ -1585,7 +1586,8 @@ sal_Bool SVGFilter::implExportShapes( const Reference< XShapes >& rxShapes ) // ----------------------------------------------------------------------------- -sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape ) +sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape, + sal_Bool bMaster ) { Reference< XPropertySet > xShapePropSet( rxShape, UNO_QUERY ); sal_Bool bRet = sal_False; @@ -1600,6 +1602,13 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape ) xShapePropSet->getPropertyValue( "IsEmptyPresentationObject" ) >>= bHideObj; } + OUString aShapeClass = implGetClassFromShape( rxShape ); + if( bMaster ) + { + if( aShapeClass == "TitleText" || aShapeClass == "Outline" ) + bHideObj = true; + } + if( !bHideObj ) { if( aShapeType.lastIndexOf( "drawing.GroupShape" ) != -1 ) @@ -1611,7 +1620,7 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape ) mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "Group" ); SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", sal_True, sal_True ); - bRet = implExportShapes( xShapes ); + bRet = implExportShapes( xShapes, bMaster ); } } @@ -1630,7 +1639,6 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape ) if( rMtf.GetActionSize() ) { // for text field shapes we set up text-adjust attributes // and set visibility to hidden - OUString aShapeClass = implGetClassFromShape( rxShape ); if( mbPresentation ) { sal_Bool bIsPageNumber = ( aShapeClass == "Slide_Number" ); @@ -1994,6 +2002,10 @@ OUString SVGFilter::implGetClassFromShape( const Reference< XShape >& rxShape ) aRet = "Date/Time"; else if( aShapeType.lastIndexOf( "presentation.SlideNumberShape" ) != -1 ) aRet = "Slide_Number"; + else if( aShapeType.lastIndexOf( "presentation.TitleTextShape" ) != -1 ) + aRet = "TitleText"; + else if( aShapeType.lastIndexOf( "presentation.OutlinerShape" ) != -1 ) + aRet = "Outline"; else aRet = aShapeType; diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx index c4d133b0f785..85fab2b4c63a 100644 --- a/filter/source/svg/svgfilter.hxx +++ b/filter/source/svg/svgfilter.hxx @@ -289,8 +289,10 @@ private: const Reference< XShapes > & xShapes, sal_Bool bMaster ); - sal_Bool implExportShapes( const Reference< XShapes >& rxShapes ); - sal_Bool implExportShape( const Reference< XShape >& rxShape ); + sal_Bool implExportShapes( const Reference< XShapes >& rxShapes, + sal_Bool bMaster ); + sal_Bool implExportShape( const Reference< XShape >& rxShape, + sal_Bool bMaster ); sal_Bool implCreateObjects(); sal_Bool implCreateObjectsFromShapes( const Reference< XDrawPage > & rxPage, const Reference< XShapes >& rxShapes ); |