diff options
Diffstat (limited to 'vcl')
24 files changed, 69 insertions, 69 deletions
diff --git a/vcl/backendtest/outputdevice/common.cxx b/vcl/backendtest/outputdevice/common.cxx index adbae9599e0f..d85791e40745 100644 --- a/vcl/backendtest/outputdevice/common.cxx +++ b/vcl/backendtest/outputdevice/common.cxx @@ -352,9 +352,9 @@ OUString OutputDeviceTestCommon::getRenderBackendName() const void OutputDeviceTestCommon::initialSetup(tools::Long nWidth, tools::Long nHeight, Color aColor, bool bEnableAA, bool bAlphaVirtualDevice) { if (bAlphaVirtualDevice) - mpVirtualDevice = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT, DeviceFormat::DEFAULT); + mpVirtualDevice = VclPtr<VirtualDevice>::Create(DeviceFormat::WITH_ALPHA); else - mpVirtualDevice = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT); + mpVirtualDevice = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA); maVDRectangle = tools::Rectangle(Point(), Size (nWidth, nHeight)); mpVirtualDevice->SetOutputSizePixel(maVDRectangle.GetSize()); 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))); diff --git a/vcl/qt5/QtSvpSurface.cxx b/vcl/qt5/QtSvpSurface.cxx index 944110847267..760419bd7fac 100644 --- a/vcl/qt5/QtSvpSurface.cxx +++ b/vcl/qt5/QtSvpSurface.cxx @@ -83,7 +83,7 @@ VclPtr<VirtualDevice> QtSvpSurface::createVirtualDevice() const aSystemGraphicsData.pSurface = m_pSurface.get(); return VclPtr<VirtualDevice>::Create(aSystemGraphicsData, get_surface_size(m_pSurface.get()), - DeviceFormat::DEFAULT); + DeviceFormat::WITHOUT_ALPHA); } } // namespace cairo diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 259192c854cb..43a4b6305395 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -662,8 +662,8 @@ OUString SalInstanceWidget::strip_mnemonic(const OUString& rLabel) const VclPtr<VirtualDevice> SalInstanceWidget::create_virtual_device() const { // create with (annoying) separate alpha layer that LibreOffice itself uses - return VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(), DeviceFormat::DEFAULT, - DeviceFormat::DEFAULT); + return VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(), + DeviceFormat::WITH_ALPHA); } void SalInstanceWidget::call_attention_to() @@ -1379,7 +1379,7 @@ void SalInstanceWidget::DoRecursivePaint(vcl::Window* pWindow, const Point& rRen pWindow->SetMapMode(aMapMode); } - VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); + VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA)); Size aChildSizePixel(pWindow->GetSizePixel()); xOutput->SetOutputSizePixel(aChildSizePixel); diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx index a6ee4c288e00..c22a109a3ce2 100644 --- a/vcl/source/filter/eps/eps.cxx +++ b/vcl/source/filter/eps/eps.cxx @@ -1997,7 +1997,7 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, KernArra vcl::Font aNotRotatedFont( maFont ); aNotRotatedFont.SetOrientation( 0_deg10 ); - ScopedVclPtrInstance< VirtualDevice > pVirDev(DeviceFormat::DEFAULT); + ScopedVclPtrInstance< VirtualDevice > pVirDev(DeviceFormat::WITHOUT_ALPHA); pVirDev->SetMapMode( rVDev.GetMapMode() ); pVirDev->SetFont( aNotRotatedFont ); pVirDev->SetTextAlign( eTextAlign ); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 05e4c0fb3a6b..6b1300e589d6 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -818,7 +818,7 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf, const Gradient& rGrad ) { // Generate comment, GradientEx and Gradient actions (within DrawGradient) - ScopedVclPtrInstance< VirtualDevice > aVDev(rMapDev, DeviceFormat::DEFAULT); + ScopedVclPtrInstance< VirtualDevice > aVDev(rMapDev, DeviceFormat::WITHOUT_ALPHA); aVDev->EnableOutput( false ); GDIMetaFile aGradMtf; diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 8be74da9e1c5..e4807abfaae8 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1198,7 +1198,7 @@ double PDFPage::getHeight() const PDFWriterImpl::PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext, const css::uno::Reference< css::beans::XMaterialHolder >& xEnc, PDFWriter& i_rOuterFace) - : VirtualDevice(Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::NONE, OUTDEV_PDF), + : VirtualDevice(Application::GetDefaultDevice(), DeviceFormat::WITHOUT_ALPHA, OUTDEV_PDF), m_aMapMode( MapUnit::MapPoint, Point(), Fraction( 1, pointToPixel(1) ), Fraction( 1, pointToPixel(1) ) ), m_aWidgetStyleSettings(Application::GetSettings().GetStyleSettings()), m_nCurrentStructElement( 0 ), diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index d0687faa76b2..4d10f317e93c 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -154,7 +154,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, (void)pOutDev->AcquireGraphics(); pGraphics = pOutDev->mpGraphics; if ( pGraphics ) - mpVirDev = pSVData->mpDefInst->CreateVirtualDevice(*pGraphics, nDX, nDY, meFormat, pData); + mpVirDev = pSVData->mpDefInst->CreateVirtualDevice(*pGraphics, nDX, nDY, meFormatAndAlpha, pData); else mpVirDev = nullptr; if ( !mpVirDev ) @@ -200,14 +200,12 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, pSVData->maGDIData.mpFirstVirDev = this; } -VirtualDevice::VirtualDevice(const OutputDevice* pCompDev, DeviceFormat eFormat, - DeviceFormat eAlphaFormat, OutDevType eOutDevType) +VirtualDevice::VirtualDevice(const OutputDevice* pCompDev, DeviceFormat eFormatAndAlpha, + OutDevType eOutDevType) : OutputDevice(eOutDevType) - , meFormat(eFormat) - , meAlphaFormat(eAlphaFormat) + , meFormatAndAlpha(eFormatAndAlpha) { - SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) - << ", " << static_cast<int>(eAlphaFormat) + SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormatAndAlpha) << ", " << static_cast<int>(eOutDevType) << " )" ); ImplInitVirDev(pCompDev ? pCompDev : Application::GetDefaultDevice(), 0, 0); @@ -216,8 +214,7 @@ VirtualDevice::VirtualDevice(const OutputDevice* pCompDev, DeviceFormat eFormat, VirtualDevice::VirtualDevice(const SystemGraphicsData& rData, const Size &rSize, DeviceFormat eFormat) : OutputDevice(OUTDEV_VIRDEV) - , meFormat(eFormat) - , meAlphaFormat(DeviceFormat::NONE) + , meFormatAndAlpha(eFormat) { SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) << " )" ); @@ -303,7 +300,7 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra assert(mpGraphics); - pNewVirDev = pSVData->mpDefInst->CreateVirtualDevice(*mpGraphics, nNewWidth, nNewHeight, meFormat); + pNewVirDev = pSVData->mpDefInst->CreateVirtualDevice(*mpGraphics, nNewWidth, nNewHeight, meFormatAndAlpha); if ( pNewVirDev ) { SalGraphics* pGraphics = pNewVirDev->AcquireGraphics(); @@ -359,7 +356,7 @@ bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, bool bErase, { if( InnerImplSetOutputSizePixel(rNewSize, bErase, pBuffer) ) { - if (meAlphaFormat != DeviceFormat::NONE) + if (meFormatAndAlpha != DeviceFormat::WITHOUT_ALPHA) { // #110958# Setup alpha bitmap if(mpAlphaVDev && mpAlphaVDev->GetOutputSizePixel() != rNewSize) @@ -369,7 +366,7 @@ bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, bool bErase, if( !mpAlphaVDev ) { - mpAlphaVDev = VclPtr<VirtualDevice>::Create(*this, meAlphaFormat); + mpAlphaVDev = VclPtr<VirtualDevice>::Create(*this, meFormatAndAlpha); mpAlphaVDev->InnerImplSetOutputSizePixel(rNewSize, bErase, nullptr); } diff --git a/vcl/source/image/ImplImage.cxx b/vcl/source/image/ImplImage.cxx index 20469d8b4292..a63dd8ccb7ce 100644 --- a/vcl/source/image/ImplImage.cxx +++ b/vcl/source/image/ImplImage.cxx @@ -163,7 +163,7 @@ BitmapEx const & ImplImage::getBitmapExForHiDPI(bool bDisabled, SalGraphics* pGr loadStockAtScale(pGraphics, maBitmapEx); else // if (mxMetaFile) { - ScopedVclPtrInstance<VirtualDevice> aVDev(DeviceFormat::DEFAULT, DeviceFormat::DEFAULT); + ScopedVclPtrInstance<VirtualDevice> aVDev(DeviceFormat::WITH_ALPHA); aVDev->SetOutputSizePixel(aTarget); mxMetaFile->WindStart(); mxMetaFile->Play(*aVDev, Point(), aTarget); diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index 2aebffb4c8b2..7f601075edae 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -1050,8 +1050,7 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, to size_t nWordLength = nEndX - nStartX; // start with something big to avoid updating it frequently nWordLength = nWordLength < 1024 ? 1024 : nWordLength; - ScopedVclPtrInstance< VirtualDevice > pVirtDev( *this, DeviceFormat::DEFAULT, - DeviceFormat::DEFAULT ); + ScopedVclPtrInstance< VirtualDevice > pVirtDev( *this, DeviceFormat::WITH_ALPHA ); pVirtDev->SetOutputSizePixel( Size( nWordLength, nWaveHeight * 2 ), false ); pVirtDev->SetLineColor( GetLineColor() ); pVirtDev->SetBackground( Wallpaper( COL_TRANSPARENT ) ); diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index d2be9bef6fc9..4a4b6b5a54bb 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -597,7 +597,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, if( !aDstRect.IsEmpty() ) { // Create transparent buffer - ScopedVclPtrInstance<VirtualDevice> xVDev(DeviceFormat::DEFAULT, DeviceFormat::DEFAULT); + ScopedVclPtrInstance<VirtualDevice> xVDev(DeviceFormat::WITH_ALPHA); xVDev->mnDPIX = mnDPIX; xVDev->mnDPIY = mnDPIY; diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index a70f1c0e4004..a98703ca255b 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1521,8 +1521,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP // paint metafile to VDev VclPtrInstance<VirtualDevice> pMaskedDevice(*i_pTargetOutDev, - DeviceFormat::DEFAULT, - DeviceFormat::DEFAULT); + DeviceFormat::WITH_ALPHA); pMaskedDevice->SetOutputSizePixel( GetOutputSizePixel() ); pMaskedDevice->EnableRTL( IsRTLEnabled() ); diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 9439ef62e88c..603cc8aca5fd 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1124,7 +1124,7 @@ VclPtr<VirtualDevice> SystemWindow::createScreenshot() Size aSize(GetOutputSizePixel()); - VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); + VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA)); xOutput->SetOutputSizePixel(aSize); Point aPos; diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx index ede009f7f914..3e563d206619 100644 --- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx +++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx @@ -250,7 +250,7 @@ namespace cairo return VclPtr<VirtualDevice>::Create(aSystemGraphicsData, Size(width, height), - DeviceFormat::DEFAULT); + DeviceFormat::WITHOUT_ALPHA); } /** diff --git a/vcl/unx/gtk3/gtkcairo.cxx b/vcl/unx/gtk3/gtkcairo.cxx index b77711384ac2..f389f4d087c1 100644 --- a/vcl/unx/gtk3/gtkcairo.cxx +++ b/vcl/unx/gtk3/gtkcairo.cxx @@ -122,7 +122,7 @@ namespace cairo return VclPtr<VirtualDevice>::Create(aSystemGraphicsData, get_surface_size(mpSurface.get()), - DeviceFormat::DEFAULT); + DeviceFormat::WITHOUT_ALPHA); } } diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 925c8669be78..6b8b65c4fbce 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -4483,7 +4483,7 @@ public: gtk_container_resize_children(GTK_CONTAINER(m_pWidget)); #endif - VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); + VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA)); xOutput->SetOutputSizePixel(aSize); switch (rOutput.GetOutDevType()) @@ -6543,7 +6543,7 @@ public: #endif } - VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT)); + VclPtr<VirtualDevice> xOutput(VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA)); xOutput->SetOutputSizePixel(get_size()); cairo_surface_t* pSurface = get_underlying_cairo_surface(*xOutput); cairo_t* cr = cairo_create(pSurface); @@ -18352,7 +18352,7 @@ public: #if !GTK_CHECK_VERSION(4, 0, 0) , m_pAccessible(nullptr) #endif - , m_xDevice(DeviceFormat::DEFAULT) + , m_xDevice(DeviceFormat::WITHOUT_ALPHA) , m_pSurface(nullptr) , m_nQueryTooltip(g_signal_connect(m_pDrawingArea, "query-tooltip", G_CALLBACK(signalQueryTooltip), this)) #if !GTK_CHECK_VERSION(4, 0, 0) diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index c40190ff4ed3..6fb5f3514017 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1096,7 +1096,7 @@ public: if (static_cast<int>(eType) < RENDER_AS_BITMAPEX) pNested = VclPtr<VirtualDevice>::Create(rDev).get(); else - pNested = VclPtr<VirtualDevice>::Create(rDev,DeviceFormat::DEFAULT,DeviceFormat::DEFAULT).get(); + pNested = VclPtr<VirtualDevice>::Create(rDev,DeviceFormat::WITH_ALPHA).get(); pNested->SetOutputSizePixel(r.GetSize()); tools::Rectangle aWhole(Point(0,0), r.GetSize()); |