diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-14 11:25:21 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-14 15:13:10 +0200 |
commit | 1f1f4232001fa23ec1a1bf67d605fda9df542eec (patch) | |
tree | 7ced650d6b784829fb3cb957d8b71443b2ed7ae1 /svx/qa | |
parent | 7f2283c2986ff94766cc1d2c076fb34a2c88a31a (diff) |
Round in XmlWriter::attribute when passing a double
Before, it truncated. Rounding provides a closer value.
Change-Id: I213e6ae34ada2f5081cb2c8b2ef431448c712b37
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165947
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/qa')
-rw-r--r-- | svx/qa/unit/sdr.cxx | 22 | ||||
-rw-r--r-- | svx/qa/unit/svdraw.cxx | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/svx/qa/unit/sdr.cxx b/svx/qa/unit/sdr.cxx index a58209941b5c..681e3100aca1 100644 --- a/svx/qa/unit/sdr.cxx +++ b/svx/qa/unit/sdr.cxx @@ -77,7 +77,7 @@ CPPUNIT_TEST_FIXTURE(SdrTest, testShadowScaleOrigin) // i.e. the shadow origin was not the top right corner for scaling (larger x position, so it was // visible on the right of the shape as well). CPPUNIT_ASSERT_EQUAL(sal_Int32(-705), fShadowX); - CPPUNIT_ASSERT_EQUAL(sal_Int32(-684), fShadowY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(-685), fShadowY); } CPPUNIT_TEST_FIXTURE(SdrTest, testShadowAlignment) @@ -97,35 +97,35 @@ CPPUNIT_TEST_FIXTURE(SdrTest, testShadowAlignment) xmlDocUniquePtr pDocument = aDumper.dumpAndParse(xPrimitiveSequence); // Without the accompanying fix in place, this test would have failed with: - // - Expected: -567 + // - Expected: -568 // - Actual : 162 // - In <>, attribute 'xy13' of '(//shadow/transform)[1]' incorrect value. // i.e. shadow alignment was ignored while scaling the shadow. - assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy13"_ostr, "-567"); + assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy13"_ostr, "-568"); assertXPath(pDocument, "(//shadow/transform)[1]"_ostr, "xy23"_ostr, "162"); - assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy13"_ostr, "-1794"); + assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy13"_ostr, "-1795"); assertXPath(pDocument, "(//shadow/transform)[2]"_ostr, "xy23"_ostr, "162"); assertXPath(pDocument, "(//shadow/transform)[3]"_ostr, "xy13"_ostr, "-3021"); assertXPath(pDocument, "(//shadow/transform)[3]"_ostr, "xy23"_ostr, "161"); - assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy13"_ostr, "-567"); + assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy13"_ostr, "-568"); assertXPath(pDocument, "(//shadow/transform)[4]"_ostr, "xy23"_ostr, "-749"); assertXPath(pDocument, "(//shadow/transform)[5]"_ostr, "xy13"_ostr, "-3021"); assertXPath(pDocument, "(//shadow/transform)[5]"_ostr, "xy23"_ostr, "-750"); - assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy13"_ostr, "-566"); - assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy23"_ostr, "-1691"); + assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy13"_ostr, "-567"); + assertXPath(pDocument, "(//shadow/transform)[6]"_ostr, "xy23"_ostr, "-1692"); - assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy13"_ostr, "-1794"); + assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy13"_ostr, "-1795"); assertXPath(pDocument, "(//shadow/transform)[7]"_ostr, "xy23"_ostr, "-1693"); - assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy13"_ostr, "-3022"); - assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy23"_ostr, "-1691"); + assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy13"_ostr, "-3023"); + assertXPath(pDocument, "(//shadow/transform)[8]"_ostr, "xy23"_ostr, "-1692"); - assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy13"_ostr, "-1794"); + assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy13"_ostr, "-1795"); assertXPath(pDocument, "(//shadow/transform)[9]"_ostr, "xy23"_ostr, "-750"); } { diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx index 969f1256704f..3254e64161fb 100644 --- a/svx/qa/unit/svdraw.cxx +++ b/svx/qa/unit/svdraw.cxx @@ -734,8 +734,8 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testClipVerticalTextOverflow) // make sure the text that isn't overflowing is still aligned properly assertXPathContent(pDocument, "count((//sdrblocktext)[5]//textsimpleportion)"_ostr, "3"); - assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[1]"_ostr, "y"_ostr, "5073"); - assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[3]"_ostr, "y"_ostr, "6597"); + assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[1]"_ostr, "y"_ostr, "5074"); + assertXPath(pDocument, "((//sdrblocktext)[5]//textsimpleportion)[3]"_ostr, "y"_ostr, "6598"); // Test vertically overflowing text, with vertical text direction assertXPathContent(pDocument, "count((//sdrblocktext)[6]//textsimpleportion)"_ostr, "12"); |