summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-02-27 06:54:16 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-02-27 11:07:01 +0100
commitf41a08183504a59d6ffc7a00ed7f24e6b19995ab (patch)
tree9b0d075076e7de48ff49be3247e208a93787626f /oox
parenta5411abe23cdf1e4de3ab5abfe209a4cbf07e511 (diff)
tdf#111789: TextBox shadow propeties are not saved to PPTX
Change-Id: I0c858676e1fc02a72b4b6bfd10f512d8e9166061 Reviewed-on: https://gerrit.libreoffice.org/50402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx28
-rw-r--r--oox/source/export/shapes.cxx1
2 files changed, 16 insertions, 13 deletions
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<beans::XPropertySet> xPropertySet(xShape, UNO_QUERY);
WriteBlipOrNormalFill(xPropertySet, "Graphic");
WriteOutline(xPropertySet);
+ WriteShapeEffects(xPropertySet);
pFS->endElementNS( mnXmlNamespace, XML_spPr );
WriteTextBox( xShape, mnXmlNamespace );