diff options
author | Khaled Hosny <khaled@libreoffice.org> | 2023-07-17 12:38:41 +0300 |
---|---|---|
committer | خالد حسني <khaled@libreoffice.org> | 2023-07-23 06:01:56 +0200 |
commit | 4b743de97fc133623e46827869c4ea3eb845ad47 (patch) | |
tree | 6386636517576c81502367819996972877adc544 /sd | |
parent | ea0f9776ed8e7e9809853d292923b86756274564 (diff) |
tdf#156234: Don’t round glyph coordinates when doing subpixel positioning
When doing subpixel positioning (i.e. OutputDevice is in map mode),
delay the rounding of the glyph coordinates after converting from pixel
to logical units to minimize the loss of precision as much as possible.
Some test expectations, expectedly, changes due to the improved
positioning precision.
Change-Id: I2591e3c7d4923ba7886a35bf53db759273354e24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154292
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/layout-tests.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx index 5e9d0e26537b..54c2215d40e0 100644 --- a/sd/qa/unit/layout-tests.cxx +++ b/sd/qa/unit/layout-tests.cxx @@ -103,10 +103,10 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf128212) xmlDocUniquePtr pXmlDoc = load("pptx/tdf128212.pptx"); // Without the fix in place, this test would have failed with - // - Expected: 7797 + // - Expected: 7792 // - Actual : 12068 - assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray", "x", "4525"); - assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray", "y", "7797"); + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray", "x", "4520"); + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray", "y", "7792"); } CPPUNIT_TEST_FIXTURE(SdLayoutTest, testColumnsLayout) @@ -220,8 +220,8 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, tdf143258_testTbRlLayout) // Box 2 column 1 { 1, 0, 6, 5346, 7250 }, { 1, 6, 5, 4635, 7250 }, - { 1, 11, 9, 3924, 7250 }, - { 1, 20, 6, 3213, 7250 }, + { 1, 11, 7, 3924, 7250 }, + { 1, 18, 8, 3213, 7250 }, // Box 2 column 2 { 1, 26, 2, 5346, 9600 }, { 1, 28, 7, 4635, 9600 }, @@ -308,9 +308,9 @@ CPPUNIT_TEST_FIXTURE(SdLayoutTest, testFitToFrameTextFitting) assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray[1]", "x", "0"); assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray[1]", "y", "406"); - assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray[1]/dxarray", "first", "114"); + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray[1]/dxarray", "first", "110"); #ifndef _WIN32 // Windows seems to differ in text layouting, so ignore for now - assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray[1]/dxarray", "last", "7010"); + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/textarray[1]/dxarray", "last", "6981"); #endif } |