Kaydet (Commit) b914c4c9 authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Miklos Vajna

tdf#115670 vml shadow: shadow is off unless explicitly set on

The absence of "on=" is treated in Word (tested 2003) as off.

Change-Id: Ibc6b0e5ca0f25a9c3ca1b9505fa24c4d821bfd0
Reviewed-on: https://gerrit.libreoffice.org/59457
Tested-by: Jenkins
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 2ed18399
...@@ -389,7 +389,7 @@ ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const A ...@@ -389,7 +389,7 @@ ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const A
case VML_TOKEN( shadow ): case VML_TOKEN( shadow ):
{ {
mrTypeModel.maShadowModel.mbHasShadow = true; mrTypeModel.maShadowModel.mbHasShadow = true;
mrTypeModel.maShadowModel.moShadowOn.assignIfUsed(lclDecodeBool(rAttribs, XML_on)); mrTypeModel.maShadowModel.moShadowOn = lclDecodeBool(rAttribs, XML_on).get(false);
mrTypeModel.maShadowModel.moColor.assignIfUsed(rAttribs.getString(XML_color)); mrTypeModel.maShadowModel.moColor.assignIfUsed(rAttribs.getString(XML_color));
mrTypeModel.maShadowModel.moOffset.assignIfUsed(rAttribs.getString(XML_offset)); mrTypeModel.maShadowModel.moOffset.assignIfUsed(rAttribs.getString(XML_offset));
mrTypeModel.maShadowModel.moOpacity = lclDecodePercent(rAttribs, XML_opacity, 1.0); mrTypeModel.maShadowModel.moOpacity = lclDecodePercent(rAttribs, XML_opacity, 1.0);
......
...@@ -580,6 +580,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103982, "tdf103982.docx") ...@@ -580,6 +580,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103982, "tdf103982.docx")
sal_Int32 nDistB = getXPath(pXmlDoc, "//wp:anchor", "distB").toInt32(); sal_Int32 nDistB = getXPath(pXmlDoc, "//wp:anchor", "distB").toInt32();
// This was -260350, which is not a valid value for an unsigned type. // This was -260350, which is not a valid value for an unsigned type.
CPPUNIT_ASSERT(nDistB >= 0); CPPUNIT_ASSERT(nDistB >= 0);
// tdf#115670 the shadow should not be enabled (no on="t")
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(!getProperty<bool>(xPropertySet, "Shadow"));
} }
DECLARE_OOXMLEXPORT_TEST(testTdf104115, "tdf104115.docx") DECLARE_OOXMLEXPORT_TEST(testTdf104115, "tdf104115.docx")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment