From f41a08183504a59d6ffc7a00ed7f24e6b19995ab Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Tue, 27 Feb 2018 06:54:16 +0100 Subject: tdf#111789: TextBox shadow propeties are not saved to PPTX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0c858676e1fc02a72b4b6bfd10f512d8e9166061 Reviewed-on: https://gerrit.libreoffice.org/50402 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- oox/source/export/drawingml.cxx | 28 +++++++++++++++------------- oox/source/export/shapes.cxx | 1 + 2 files changed, 16 insertions(+), 13 deletions(-) (limited to 'oox') diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 987533e186b2..9cc62a072abc 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3413,31 +3413,33 @@ sal_Int32 lcl_CalculateDir(const double dX, const double dY) void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet ) { - if( !GetProperty( rXPropSet, "InteropGrabBag" ) ) - return; - Sequence< PropertyValue > aGrabBag, aEffects, aOuterShdwProps; - mAny >>= aGrabBag; - for( sal_Int32 i=0; i < aGrabBag.getLength(); ++i ) + if( GetProperty( rXPropSet, "InteropGrabBag" ) ) { - if( aGrabBag[i].Name == "EffectProperties" ) + mAny >>= aGrabBag; + for( sal_Int32 i=0; i < aGrabBag.getLength(); ++i ) { - aGrabBag[i].Value >>= aEffects; - for( sal_Int32 j=0; j < aEffects.getLength(); ++j ) + if( aGrabBag[i].Name == "EffectProperties" ) { - if( aEffects[j].Name == "outerShdw" ) + aGrabBag[i].Value >>= aEffects; + for( sal_Int32 j=0; j < aEffects.getLength(); ++j ) { - aEffects[j].Value >>= aOuterShdwProps; - break; + if( aEffects[j].Name == "outerShdw" ) + { + aEffects[j].Value >>= aOuterShdwProps; + break; + } } + break; } - break; } } + if( aEffects.getLength() == 0 ) { bool bHasShadow = false; - rXPropSet->getPropertyValue( "Shadow" ) >>= bHasShadow; + if( GetProperty( rXPropSet, "Shadow" ) ) + mAny >>= bHasShadow; if( bHasShadow ) { Sequence< PropertyValue > aShadowGrabBag( 3 ); diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index b9a19bf506b4..83b9ae72aeeb 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1866,6 +1866,7 @@ ShapeExport& ShapeExport::WriteTextShape( const Reference< XShape >& xShape ) uno::Reference xPropertySet(xShape, UNO_QUERY); WriteBlipOrNormalFill(xPropertySet, "Graphic"); WriteOutline(xPropertySet); + WriteShapeEffects(xPropertySet); pFS->endElementNS( mnXmlNamespace, XML_spPr ); WriteTextBox( xShape, mnXmlNamespace ); -- cgit