summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-03-02 13:39:00 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-03-03 08:47:56 +0100
commit06d918dcc47ae3f1c511cbdccfeacc8adb123f28 (patch)
treebbc922557ac7ed3e6c9bc8f3074f4b4707635360
parent670df8db5cbb2a9cac46a8602b95192a02fa3e2c (diff)
loplugin:unreffun (macOS)
...after 0c36f364b14aacd0eeb53087ae2fce54402dc741 "tdf#138122 Detect window scaling for multi display configurations on macOS" Change-Id: I89daad37f5911c18c5424ab3d0e0f484ebc3bb58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111829 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--vcl/qa/cppunit/BackendTest.cxx15
-rw-r--r--vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx11
-rw-r--r--vcl/qa/cppunit/outdev.cxx6
3 files changed, 19 insertions, 13 deletions
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index 018541aa40ab..734d255272c2 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -708,6 +708,8 @@ public:
// Test SalGraphics::blendBitmap() and blendAlphaBitmap() calls.
void testDrawBlendExtended()
{
+// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented
+#ifndef MACOSX
// Create virtual device with alpha.
ScopedVclPtr<VirtualDevice> device
= VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
@@ -753,10 +755,13 @@ public:
exportDevice("/tmp/blend_extended_04.png", device);
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(6, 6)));
+#endif
}
void testDrawAlphaBitmapMirrored()
{
+// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented
+#ifndef MACOSX
// Normal virtual device.
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
// Virtual device with alpha.
@@ -811,10 +816,13 @@ public:
CPPUNIT_ASSERT_EQUAL(COL_RED, alphaDevice->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, alphaDevice->GetPixel(Point(3, 2)));
alphaDevice->Erase();
+#endif
}
void testTdf124848()
{
+// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented
+#ifndef MACOSX
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
device->SetOutputSizePixel(Size(100, 100));
device->SetBackground(Wallpaper(COL_WHITE));
@@ -843,6 +851,7 @@ public:
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(50, 20)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(49, 20)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(51, 20)));
+#endif
}
void testTdf136171()
@@ -934,16 +943,10 @@ public:
CPPUNIT_TEST(testRadialGradient);
CPPUNIT_TEST(testRadialGradientOfs);
-// TODO: Following unit tests are not executed for macOS unless bitmap scaling is implemented
-#ifndef MACOSX
CPPUNIT_TEST(testDrawBlendExtended);
CPPUNIT_TEST(testDrawAlphaBitmapMirrored);
-#endif
-// TODO: Following unit test is not executed for macOS unless bitmap scaling is implemented
-#ifndef MACOSX
CPPUNIT_TEST(testTdf124848);
-#endif
CPPUNIT_TEST(testTdf136171);
CPPUNIT_TEST_SUITE_END();
diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
index 127c0201bd78..cdb8e4c39fd7 100644
--- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
+++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
@@ -50,11 +50,8 @@ public:
CPPUNIT_TEST(testTdf104141);
CPPUNIT_TEST(testTdf113918);
-// TODO: Following unit tests are not executed for macOS unless bitmap scaling is implemented
-#ifndef MACOSX
CPPUNIT_TEST(testDrawAlphaBitmapEx);
CPPUNIT_TEST(testAlphaVirtualDevice);
-#endif
CPPUNIT_TEST(testTdf116888);
CPPUNIT_TEST_SUITE_END();
@@ -110,7 +107,7 @@ void BitmapRenderTest::testTdf113918()
CPPUNIT_ASSERT(aColor.GetGreen() > 100);
}
-#if defined(_WIN32) || defined(MACOSX) || defined(IOS)
+#if defined(_WIN32) || defined(IOS)
namespace
{
@@ -128,6 +125,8 @@ int deltaColor(BitmapColor aColor1, BitmapColor aColor2)
void BitmapRenderTest::testDrawAlphaBitmapEx()
{
+// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented
+#ifndef MACOSX
ScopedVclPtrInstance<VirtualDevice> pVDev;
pVDev->SetOutputSizePixel(Size(8, 8));
pVDev->SetBackground(Wallpaper(COL_WHITE));
@@ -175,10 +174,13 @@ void BitmapRenderTest::testDrawAlphaBitmapEx()
#else
CPPUNIT_ASSERT_EQUAL(Color(0x7F, 0xFF, 0x7F), pVDev->GetPixel(Point(2, 2)));
#endif
+#endif
}
void BitmapRenderTest::testAlphaVirtualDevice()
{
+// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented
+#ifndef MACOSX
// Create an alpha virtual device
ScopedVclPtr<VirtualDevice> pAlphaVirtualDevice(VclPtr<VirtualDevice>::Create(
*Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::DEFAULT));
@@ -240,6 +242,7 @@ void BitmapRenderTest::testAlphaVirtualDevice()
#else
CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0x4422FF55), aColor);
#endif
+#endif
}
void BitmapRenderTest::testTdf116888()
diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index 9a7ef2c064e8..58a283749fa1 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -42,10 +42,7 @@ public:
CPPUNIT_TEST_SUITE(VclOutdevTest);
-// TODO: Following unit tests are not executed for macOS unless bitmap scaling is implemented
-#ifndef MACOSX
CPPUNIT_TEST(testVirtualDevice);
-#endif
CPPUNIT_TEST(testUseAfterDispose);
CPPUNIT_TEST(testPrinterBackgroundColor);
CPPUNIT_TEST(testWindowBackgroundColor);
@@ -87,6 +84,8 @@ void VclOutdevTest::testWindowBackgroundColor()
void VclOutdevTest::testVirtualDevice()
{
+// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented
+#ifndef MACOSX
ScopedVclPtrInstance<VirtualDevice> pVDev;
pVDev->SetOutputSizePixel(Size(32, 32));
pVDev->SetBackground(Wallpaper(COL_WHITE));
@@ -135,6 +134,7 @@ void VclOutdevTest::testVirtualDevice()
CPPUNIT_ASSERT( pWin );
OutputDevice *pOutDev = pWin.get();
#endif
+#endif
}
void VclOutdevTest::testUseAfterDispose()