diff options
-rw-r--r-- | oox/source/drawingml/effectpropertiescontext.cxx | 6 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 7 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx | 14 |
3 files changed, 25 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 ); diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx index 9a213e3aac29..f65f53530078 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx @@ -1111,6 +1111,20 @@ DECLARE_OOXMLEXPORT_TEST(testShapeEffectPreservation, "shape-effect-preservation assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/" "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:softEdge/*", 0 ); // should not be present + + // 5th shape with glow effect, scheme color + assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/" + "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow", + "rad", "101600"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/" + "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:schemeClr", + "val", "accent2"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/" + "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:schemeClr/a:satMod", + "val", "175000"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/" + "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:schemeClr/a:alpha", + "val", "40000"); } DECLARE_OOXMLEXPORT_TEST(fdo77719, "fdo77719.docx") |