summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-04-29 20:16:36 +0200
committerJacobo Aragunde Pérez <jaragunde@igalia.com>2014-04-30 16:46:10 +0200
commit9a61470eb1fa161cba70f2e9c4ea8817dc7f617e (patch)
treebbf9308c7da2e4a7fc8320ae5fed0febab0a77cb /oox
parent5b3f88bfea3111e9b9fb26ef9d84f9018c11ab7e (diff)
ooxml: Preserve glow effect on shapes.
Reused most of the code of outerShdw and innerShdw effects. Modified an existing unit test to add a check for innerShdw. Change-Id: I7328fe696721d28c35b26ca1b702c7f64c63ab21
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/effectpropertiescontext.cxx6
-rw-r--r--oox/source/export/drawingml.cxx7
2 files changed, 11 insertions, 2 deletions
diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx
index 90e70505187c..8a2a6f49df88 100644
--- a/oox/source/drawingml/effectpropertiescontext.cxx
+++ b/oox/source/drawingml/effectpropertiescontext.cxx
@@ -91,9 +91,13 @@ ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement,
return new ColorContext( *this, mrEffectProperties.maShadow.moShadowColor );
}
break;
+ case A_TOKEN( glow ):
case A_TOKEN( softEdge ):
{
- mrEffectProperties.msUnsupportedEffectName = "softEdge";
+ if( nElement == A_TOKEN( glow ) )
+ mrEffectProperties.msUnsupportedEffectName = "glow";
+ else
+ mrEffectProperties.msUnsupportedEffectName = "softEdge";
saveUnsupportedAttribs( rAttribs );
return new ColorContext( *this, mrEffectProperties.maShadow.moShadowColor );
}
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index e9b4b2b7f41a..84a6e0fa6edc 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2101,7 +2101,7 @@ void DrawingML::WriteShapeEffects( Reference< XPropertySet > rXPropSet )
for( sal_Int32 i=0; i < aEffectProps.getLength(); ++i )
{
if( aEffectProps[i].Name == "outerShdw" || aEffectProps[i].Name == "innerShdw"
- || aEffectProps[i].Name == "softEdge" )
+ || aEffectProps[i].Name == "glow" || aEffectProps[i].Name == "softEdge" )
{
// assign the proper tag and enable bContainsColor if necessary
if( aEffectProps[i].Name == "outerShdw" )
@@ -2114,6 +2114,11 @@ void DrawingML::WriteShapeEffects( Reference< XPropertySet > rXPropSet )
nEffectToken = FSNS( XML_a, XML_innerShdw );
bContainsColor = true;
}
+ else if( aEffectProps[i].Name == "glow" )
+ {
+ nEffectToken = FSNS( XML_a, XML_glow );
+ bContainsColor = true;
+ }
else if( aEffectProps[i].Name == "softEdge" )
nEffectToken = FSNS( XML_a, XML_softEdge );