summaryrefslogtreecommitdiff
path: root/vcl/qa/cppunit
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/qa/cppunit')
-rw-r--r--vcl/qa/cppunit/BackendTest.cxx22
-rw-r--r--vcl/qa/cppunit/FontFeatureTest.cxx6
-rw-r--r--vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx4
-rw-r--r--vcl/qa/cppunit/cjktext.cxx2
-rw-r--r--vcl/qa/cppunit/lifecycle.cxx2
-rw-r--r--vcl/qa/cppunit/logicalfontinstance.cxx2
-rw-r--r--vcl/qa/cppunit/skia/skia.cxx13
-rw-r--r--vcl/qa/cppunit/text.cxx24
8 files changed, 40 insertions, 35 deletions
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index 4aeec29147c9..2c85be06e66d 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -779,7 +779,7 @@ public:
{
// Create normal virtual device (no alpha).
ScopedVclPtr<VirtualDevice> device
- = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(10, 10));
// Erase with white, check it's white.
device->SetBackground(Wallpaper(COL_WHITE));
@@ -806,7 +806,7 @@ public:
{
// Create virtual device with alpha.
ScopedVclPtr<VirtualDevice> device
- = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
+ = VclPtr<VirtualDevice>::Create(DeviceFormat::WITH_ALPHA);
device->SetOutputSizePixel(Size(10, 10));
// Erase with white, check it's white.
device->SetBackground(Wallpaper(COL_WHITE));
@@ -1139,7 +1139,7 @@ public:
return;
// Create virtual device with alpha.
ScopedVclPtr<VirtualDevice> device
- = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
+ = VclPtr<VirtualDevice>::Create(DeviceFormat::WITH_ALPHA);
#ifdef MACOSX
// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented
if (getRenderBackendName(device) == "aqua")
@@ -1194,7 +1194,8 @@ public:
if (getDefaultDeviceBitCount() < 24)
return;
// Normal virtual device.
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device
+ = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
#ifdef MACOSX
// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented
if (getRenderBackendName(device) == "aqua")
@@ -1202,7 +1203,7 @@ public:
#endif
// Virtual device with alpha.
ScopedVclPtr<VirtualDevice> alphaDevice
- = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
+ = VclPtr<VirtualDevice>::Create(DeviceFormat::WITH_ALPHA);
device->SetOutputSizePixel(Size(20, 20));
device->SetBackground(Wallpaper(COL_BLACK));
device->Erase();
@@ -1349,7 +1350,8 @@ public:
void testTdf124848()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device
+ = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
#ifdef MACOSX
// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented
if (getRenderBackendName(device) == "aqua")
@@ -1390,7 +1392,7 @@ public:
return;
// Create virtual device with alpha.
ScopedVclPtr<VirtualDevice> device
- = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
+ = VclPtr<VirtualDevice>::Create(DeviceFormat::WITH_ALPHA);
device->SetOutputSizePixel(Size(10, 10));
device->SetBackground(Wallpaper(COL_WHITE));
device->Erase();
@@ -1415,7 +1417,8 @@ public:
{
// VCL may call copyArea()/copyBits() of backends even with coordinates partially
// outside of the device, so try various copying like that.
- ScopedVclPtr<VirtualDevice> device1 = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device1
+ = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device1->SetOutputSizePixel(Size(100, 100));
device1->SetBackground(Wallpaper(COL_YELLOW));
device1->Erase();
@@ -1429,7 +1432,8 @@ public:
#endif
// Plain 1:1 copy device1->device2.
- ScopedVclPtr<VirtualDevice> device2 = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device2
+ = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device2->SetOutputSizePixel(Size(100, 100));
device2->DrawOutDev(Point(0, 0), Size(100, 100), Point(0, 0), Size(100, 100), *device1);
exportDevice("tdf145811-1.png", device2);
diff --git a/vcl/qa/cppunit/FontFeatureTest.cxx b/vcl/qa/cppunit/FontFeatureTest.cxx
index 9858c96e0a9f..9d47ceb17063 100644
--- a/vcl/qa/cppunit/FontFeatureTest.cxx
+++ b/vcl/qa/cppunit/FontFeatureTest.cxx
@@ -42,7 +42,7 @@ void FontFeatureTest::testGetFontFeaturesGraphite()
{
#if HAVE_MORE_FONTS
ScopedVclPtrInstance<VirtualDevice> aVDev(*Application::GetDefaultDevice(),
- DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
+ DeviceFormat::WITH_ALPHA);
aVDev->SetOutputSizePixel(Size(10, 10));
OUString aFontName("Linux Libertine G");
@@ -126,7 +126,7 @@ void FontFeatureTest::testGetFontFeaturesOpenType()
{
#if HAVE_MORE_FONTS
ScopedVclPtrInstance<VirtualDevice> aVDev(*Application::GetDefaultDevice(),
- DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
+ DeviceFormat::WITH_ALPHA);
aVDev->SetOutputSizePixel(Size(10, 10));
OUString aFontName("Amiri");
@@ -175,7 +175,7 @@ void FontFeatureTest::testGetFontFeaturesOpenTypeEnum()
{
#if HAVE_MORE_FONTS
ScopedVclPtrInstance<VirtualDevice> aVDev(*Application::GetDefaultDevice(),
- DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
+ DeviceFormat::WITH_ALPHA);
aVDev->SetOutputSizePixel(Size(10, 10));
OUString aFontName("Reem Kufi");
diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
index 06758e4ae694..dbe02d455b04 100644
--- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
+++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
@@ -182,8 +182,8 @@ 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));
+ ScopedVclPtr<VirtualDevice> pAlphaVirtualDevice(
+ VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(), DeviceFormat::WITH_ALPHA));
// Set it up
pAlphaVirtualDevice->SetOutputSizePixel(Size(4, 4));
diff --git a/vcl/qa/cppunit/cjktext.cxx b/vcl/qa/cppunit/cjktext.cxx
index af63b29959fd..3adc89ddcc47 100644
--- a/vcl/qa/cppunit/cjktext.cxx
+++ b/vcl/qa/cppunit/cjktext.cxx
@@ -105,7 +105,7 @@ static tools::Long getCharacterRightSideHeight(VirtualDevice* device, const Poin
void VclCjkTextTest::testVerticalText()
{
OUString text(u"\x30e8");
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(100, 100));
device->SetBackground(Wallpaper(COL_WHITE));
// Disable AA, to make all pixels be black or white.
diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx
index 853cef3828e4..5856e670a828 100644
--- a/vcl/qa/cppunit/lifecycle.cxx
+++ b/vcl/qa/cppunit/lifecycle.cxx
@@ -72,7 +72,7 @@ void LifecycleTest::testVirtualDevice()
VclPtr<VirtualDevice> pVDev = VclPtr< VirtualDevice >::Create();
ScopedVclPtrInstance< VirtualDevice > pVDev2;
VclPtrInstance<VirtualDevice> pVDev3;
- VclPtrInstance<VirtualDevice> pVDev4(DeviceFormat::DEFAULT);
+ VclPtrInstance<VirtualDevice> pVDev4(DeviceFormat::WITHOUT_ALPHA);
CPPUNIT_ASSERT(!!pVDev);
CPPUNIT_ASSERT(!!pVDev2);
CPPUNIT_ASSERT(!!pVDev3);
diff --git a/vcl/qa/cppunit/logicalfontinstance.cxx b/vcl/qa/cppunit/logicalfontinstance.cxx
index 2a7a5c83ac27..ffe9bb995ff9 100644
--- a/vcl/qa/cppunit/logicalfontinstance.cxx
+++ b/vcl/qa/cppunit/logicalfontinstance.cxx
@@ -37,7 +37,7 @@ public:
void VclLogicalFontInstanceTest::testglyphboundrect()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("Liberation Sans", Size(0, 110)));
diff --git a/vcl/qa/cppunit/skia/skia.cxx b/vcl/qa/cppunit/skia/skia.cxx
index f2990d3811fc..606541a0ac48 100644
--- a/vcl/qa/cppunit/skia/skia.cxx
+++ b/vcl/qa/cppunit/skia/skia.cxx
@@ -116,7 +116,7 @@ void SkiaTest::testDrawShaders()
{
if (!SkiaHelper::isVCLSkiaEnabled())
return;
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(20, 20));
device->SetBackground(Wallpaper(COL_WHITE));
device->Erase();
@@ -159,7 +159,8 @@ void SkiaTest::testDrawShaders()
device->Erase();
// Test with scaling. Use everything 10x larger to reduce the impact of smoothscaling.
- ScopedVclPtr<VirtualDevice> deviceLarge = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> deviceLarge
+ = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
deviceLarge->SetOutputSizePixel(Size(200, 200));
deviceLarge->SetBackground(Wallpaper(COL_WHITE));
deviceLarge->Erase();
@@ -439,7 +440,7 @@ void SkiaTest::testDrawDelayedScaleImage()
return;
if (SkiaHelper::renderMethodToUse() != SkiaHelper::RenderRaster)
return; // This test tests caching that's done only in raster mode.
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(10, 10));
device->SetBackground(Wallpaper(COL_WHITE));
device->Erase();
@@ -513,7 +514,7 @@ void SkiaTest::testTdf137329()
return;
// Draw a filled polygon in the entire device, with AA enabled.
// All pixels in the device should be black, even those at edges (i.e. not affected by AA).
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(10, 10));
device->SetBackground(Wallpaper(COL_WHITE));
device->SetAntialiasing(AntialiasingFlags::Enable);
@@ -534,7 +535,7 @@ void SkiaTest::testTdf140848()
{
if (!SkiaHelper::isVCLSkiaEnabled())
return;
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1300, 400));
device->SetBackground(Wallpaper(COL_BLACK));
device->SetAntialiasing(AntialiasingFlags::Enable);
@@ -562,7 +563,7 @@ void SkiaTest::testTdf132367()
{
if (!SkiaHelper::isVCLSkiaEnabled())
return;
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(2, 2));
device->SetBackground(Wallpaper(COL_BLACK));
device->Erase();
diff --git a/vcl/qa/cppunit/text.cxx b/vcl/qa/cppunit/text.cxx
index 833022ee2204..094610bf42c6 100644
--- a/vcl/qa/cppunit/text.cxx
+++ b/vcl/qa/cppunit/text.cxx
@@ -175,7 +175,7 @@ static tools::Long getCharacterLeftSideHeight(VirtualDevice* device, const Point
void VclTextTest::testSimpleText()
{
OUString text("L");
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(100, 100));
device->SetBackground(Wallpaper(COL_WHITE));
// Disable AA, to make all pixels be black or white.
@@ -605,7 +605,7 @@ void VclTextTest::testImplLayoutArgs_PrepareFallback_precalculatedglyphs()
void VclTextTest::testGetStringWithCenterEllpsis()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
@@ -617,7 +617,7 @@ void VclTextTest::testGetStringWithCenterEllpsis()
void VclTextTest::testGetStringWithEndEllpsis()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
@@ -636,7 +636,7 @@ void VclTextTest::testGetStringWithEndEllpsis()
void VclTextTest::testGetStringWithNewsEllpsis()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
@@ -670,7 +670,7 @@ void VclTextTest::testGetStringWithNewsEllpsis()
void VclTextTest::testGetTextBreak()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
@@ -694,7 +694,7 @@ void VclTextTest::testGetTextBreak()
void VclTextTest::testGetSingleLineTextRect()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
@@ -705,7 +705,7 @@ void VclTextTest::testGetSingleLineTextRect()
void VclTextTest::testGetSingleLineTextRectWithEndEllipsis()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
@@ -717,7 +717,7 @@ void VclTextTest::testGetSingleLineTextRectWithEndEllipsis()
void VclTextTest::testGetRightBottomAlignedSingleLineTextRect()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
@@ -729,7 +729,7 @@ void VclTextTest::testGetRightBottomAlignedSingleLineTextRect()
void VclTextTest::testGetRotatedSingleLineTextRect()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
@@ -744,7 +744,7 @@ void VclTextTest::testGetRotatedSingleLineTextRect()
void VclTextTest::testGetMultiLineTextRect()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
@@ -756,7 +756,7 @@ void VclTextTest::testGetMultiLineTextRect()
void VclTextTest::testGetMultiLineTextRectWithEndEllipsis()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
@@ -769,7 +769,7 @@ void VclTextTest::testGetMultiLineTextRectWithEndEllipsis()
void VclTextTest::testGetRightBottomAlignedMultiLineTextRect()
{
- ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));