sd/qa/unit/PNGExportTests.cxx | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-)
New commits: commit 4e1ee0ba1dd6b2de4ff78b8fb7daa72b40bb940a Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Aug 17 22:36:27 2024 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Aug 18 06:46:28 2024 +0200 Revert "Workaround a non-antialiased output on one of Windows buildbots" This reverts commit 7a08c89b5af8f98045ad825ace6be2f035ad91af. Reason for revert: the cause of the failures on tb88 was low quality of RDP connection settings, which is fixed now. The bug that it affects the export still needs a separate fix. Change-Id: I36aece47108781abc3578092d5fb479a56fce050 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171986 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx index 94eb4ff19c14..253456bc5a5e 100644 --- a/sd/qa/unit/PNGExportTests.cxx +++ b/sd/qa/unit/PNGExportTests.cxx @@ -1000,7 +1000,6 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf162259) css::uno::Sequence<css::beans::PropertyValue> aFilterData{ comphelper::makePropertyValue(u"PixelWidth"_ustr, sal_Int32(101)), comphelper::makePropertyValue(u"PixelHeight"_ustr, sal_Int32(151)), - comphelper::makePropertyValue(u"AntiAliasing"_ustr, true), }; css::uno::Sequence<css::beans::PropertyValue> aDescriptor{ @@ -1012,8 +1011,6 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf162259) xGraphicExporter->filter(aDescriptor); BitmapEx bmp = vcl::PngImageReader(*maTempFile.GetStream(StreamMode::READ)).read(); - std::set<Color> topColors, bottomColors; - tools::Rectangle topX(12, 21, 37, 60); int topNonWhites = 0; tools::Rectangle bottomX(13, 83, 37, 126); @@ -1024,33 +1021,26 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf162259) { for (tools::Long y = 0; y < bmp.GetSizePixel().Height(); ++y) { - Color color = bmp.GetPixelColor(x, y); if (topX.Contains(Point{ x, y })) { - topColors.insert(color); - if (color != COL_WHITE) + if (bmp.GetPixelColor(x, y) != COL_WHITE) ++topNonWhites; } else if (bottomX.Contains(Point{ x, y })) { - bottomColors.insert(color); - if (color != COL_WHITE) + if (bmp.GetPixelColor(x, y) != COL_WHITE) ++bottomNonWhites; } else { OString msg("Pixel: "_ostr + OString::number(x) + "," + OString::number(y)); - CPPUNIT_ASSERT_EQUAL_MESSAGE(msg.getStr(), COL_WHITE, color); + CPPUNIT_ASSERT_EQUAL_MESSAGE(msg.getStr(), COL_WHITE, bmp.GetPixelColor(x, y)); } } } - // On tb88, we have a strange output, where top text is not antialiased. - // Then, its reported count is 271. - int expected = topColors.size() > 2 ? 350 : 250; - CPPUNIT_ASSERT_GREATER(expected, topNonWhites); // 399 in my testing - expected = bottomColors.size() > 2 ? 350 : 250; - CPPUNIT_ASSERT_GREATER(expected, bottomNonWhites); // 362 in my testing + CPPUNIT_ASSERT_GREATER(350, topNonWhites); // 399 in my testing + CPPUNIT_ASSERT_GREATER(350, bottomNonWhites); // 362 in my testing } CPPUNIT_PLUGIN_IMPLEMENT();