diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-07 15:40:57 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-07 23:07:45 +0200 |
commit | a640676e06bdab3471f5c9f04dd9403bc66ddc22 (patch) | |
tree | 9b85d9b3a2edeb84f689b193e186daed56423183 /sw/qa | |
parent | dcd1795c4934e66378d4b88c914f8e9bb1678ba7 (diff) |
tdf#101181: store glow radius in 100ths of mm instead of EMUs
... as we do for all metric values. This fixes storing values like
"190.5cm" in ODF for 15 pt (should be "0.529cm").
Change-Id: I382756af56464424dcb24ed8801d0a4203658c11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index e52e250046a4..a799d69ddf6e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -246,9 +246,13 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testShapeEffectPreservation, "shape-effect-p 0 ); // should not be present // 7th shape with several effects: glow, inner shadow and reflection - assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/" - "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow", - "rad", "63500"); + // We import glow radius (in EMU in OOXML) into integral mm100 internal representation, then + // export back into EMUs. This results in inaccuracies. + OUString rad = getXPath(pXmlDoc, + "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/" + "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow", + "rad"); + CPPUNIT_ASSERT_DOUBLES_EQUAL(63500, rad.toInt64(), 150); // actually, it returns 63360 assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/" "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:srgbClr", "val", "eb2722"); |