From f3f98b8e1f9eb0804e18bea055fb02917aca42a5 Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Wed, 6 Sep 2017 11:56:16 +0200 Subject: tdf#111838: Revert "Decrease duplicated code" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 787732fac0aef255bdc51479fdaddf15532d118e. Change-Id: Idd36f0d434c5ec867e0e1bbbfa70d8a4644d53c6 Reviewed-on: https://gerrit.libreoffice.org/41976 Reviewed-by: Michael Stahl Reviewed-by: Tamás Zolnai Tested-by: Tamás Zolnai --- oox/source/export/drawingml.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'oox') diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index f0d3ea78431f..94dcd54ed063 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3034,7 +3034,6 @@ void DrawingML::WriteShapeEffect( const OUString& sName, const Sequence< Propert if( nEffectToken > 0 ) { - mpFS->startElementNS(XML_a, XML_effectLst, FSEND); mpFS->startElement( nEffectToken, xOuterShdwAttrList ); if( bContainsColor ) @@ -3046,7 +3045,6 @@ void DrawingML::WriteShapeEffect( const OUString& sName, const Sequence< Propert } mpFS->endElement( nEffectToken ); - mpFS->endElementNS(XML_a, XML_effectLst); } } @@ -3090,17 +3088,23 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet ) aShadowGrabBag[2].Name = "RgbClrTransparency"; aShadowGrabBag[2].Value = rXPropSet->getPropertyValue( "ShadowTransparence" ); + mpFS->startElementNS(XML_a, XML_effectLst, FSEND); WriteShapeEffect( "outerShdw", aShadowGrabBag ); + mpFS->endElementNS(XML_a, XML_effectLst); } return; } + mpFS->startElementNS(XML_a, XML_effectLst, FSEND); + for( sal_Int32 i=0; i < aEffects.getLength(); ++i ) { Sequence< PropertyValue > aEffectProps; aEffects[i].Value >>= aEffectProps; WriteShapeEffect( aEffects[i].Name, aEffectProps ); } + + mpFS->endElementNS(XML_a, XML_effectLst); } void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet ) -- cgit