diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-09-08 16:22:30 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-09-08 16:34:31 +0200 |
commit | d83b84e00b33a694a28a6a08ce39d9da03b45ab7 (patch) | |
tree | 3735990018d6a9caffac623279651dd8d998d85b /sd/qa/unit/PNGExportTests.cxx | |
parent | b59d13a7835b18f4676c3a11e9d70dfa9cb934b5 (diff) |
Fix CppunitTest_sd_png_export_tests on non-default DPI
Change-Id: Id969646a82b9a408fff111c794a6096d8e857db8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139678
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd/qa/unit/PNGExportTests.cxx')
-rw-r--r-- | sd/qa/unit/PNGExportTests.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx index d38e8826a8c9..a03350d8c882 100644 --- a/sd/qa/unit/PNGExportTests.cxx +++ b/sd/qa/unit/PNGExportTests.cxx @@ -84,8 +84,8 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf105998) // make sure only the shape is exported Size aSize = aBMPEx.GetSizePixel(); const auto[scalingX, scalingY] = getDPIScaling(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(193 * scalingX, aSize.getWidth(), 1.0); - CPPUNIT_ASSERT_DOUBLES_EQUAL(193 * scalingY, aSize.getHeight(), 1.0); + CPPUNIT_ASSERT_DOUBLES_EQUAL(193 * scalingX, aSize.getWidth(), 1.5); + CPPUNIT_ASSERT_DOUBLES_EQUAL(193 * scalingY, aSize.getHeight(), 1.5); if (!IsDefaultDPI()) return; @@ -149,8 +149,10 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf126319) // make sure only the shape is exported Size aSize = aBMPEx.GetSizePixel(); const auto[scalingX, scalingY] = getDPIScaling(); - CPPUNIT_ASSERT_DOUBLES_EQUAL(295 * scalingX, aSize.getWidth(), 1.0); - CPPUNIT_ASSERT_DOUBLES_EQUAL(134 * scalingY, aSize.getHeight(), 1.0); + CPPUNIT_ASSERT_DOUBLES_EQUAL(295 * scalingX, aSize.getWidth(), 1.5); + CPPUNIT_ASSERT_DOUBLES_EQUAL(134 * scalingY, aSize.getHeight(), 1.5); + if (!IsDefaultDPI()) + return; // Check all borders are red or similar. Ignore the corners Bitmap aBMP = aBMPEx.GetBitmap(); |