svx/source/tbxctrls/tbxcolorupdate.cxx |    6 ++++--
 vcl/qa/cppunit/outdev.cxx              |    2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 79dc7ac75b3d22882079feb02d896cfa9c9013b9
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Jul 1 19:30:38 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Jul 1 22:01:55 2025 +0200

    tdf#166842 do not use FillColor==COL_TRANSPARENT...
    
    .. on OutputDevice if that OutputDevice does not support alpha
    
    Change-Id: Iaab577e27946eade4d460db80661f4e0efdfb82d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187247
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index 4925209ba2a3..10caf6e334b2 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -501,7 +501,7 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testDefaultFillColor)
 CPPUNIT_TEST_FIXTURE(VclOutdevTest, testTransparentFillColor)
 {
     // Create a virtual device, and connect a metafile to it.
-    ScopedVclPtrInstance<VirtualDevice> pVDev;
+    ScopedVclPtrInstance<VirtualDevice> pVDev(DeviceFormat::WITH_ALPHA);
 
     GDIMetaFile aMtf;
     aMtf.Record(pVDev.get());
commit 98637767d5d6781173bf373f7cb949c8f05b6192
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Jul 1 19:30:04 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Jul 1 22:01:47 2025 +0200

    tdf#166842 do not use FillColor==COL_TRANSPARENT...
    
    .. on OutputDevice if that OutputDevice does not support alpha
    
    Change-Id: Id2a8e5965f61bae7a157beed2096307b5beb6ed7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187246
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx 
b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 3cfa36af85ab..92c44b435100 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -193,7 +193,9 @@ namespace svx
 
     VclPtr<VirtualDevice> VclToolboxButtonColorUpdater::CreateVirtualDevice() 
const
     {
-        return VclPtr<VirtualDevice>::Create(*mpTbx->GetOutDev());
+        auto xVD = VclPtr<VirtualDevice>::Create(*mpTbx->GetOutDev());
+        xVD->SetBackground(Wallpaper(COL_WHITE));
+        return xVD;
     }
 
     vcl::ImageType VclToolboxButtonColorUpdater::GetImageSize() const
@@ -249,7 +251,7 @@ namespace svx
             return;
 
         ScopedVclPtr<VirtualDevice> pVirDev(CreateVirtualDevice());
-        pVirDev->SetOutputSizePixel(aItemSize, /*bErase*/true, 
/*bAlphaMaskTransparent*/true);
+        pVirDev->SetOutputSizePixel(aItemSize, /*bErase*/true, 
/*bAlphaMaskTransparent*/false);
         maBmpSize = aItemSize;
 
         std::unique_ptr<GDIMetaFile> xMetaFile;

Reply via email to