sc/source/ui/miscdlgs/autofmt.cxx |    5 ++++-
 sc/source/ui/view/printfun.cxx    |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 11c6d25f6729028a0ea4ab106ec0f76ddf220846
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Jun 30 12:00:15 2025 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue Aug 19 13:00:10 2025 +0200

    tdf#166842 do not use FillColor==COL_TRANSPARENT...
    
    .. on OutputDevice if that OutputDevice does not support alpha
    
    Change-Id: Ic6e5e2637a30d4588866a10b1519a5ffec3ae21d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187180
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit 850a98962c0bbf6e11eb1a571a6160d896127167)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189896
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sc/source/ui/miscdlgs/autofmt.cxx 
b/sc/source/ui/miscdlgs/autofmt.cxx
index a8dbe981d386..8c8f946f0e77 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -370,7 +370,10 @@ void ScAutoFmtPreview::DrawBackground(vcl::RenderContext& 
rRenderContext)
 
             rRenderContext.Push( vcl::PushFlags::LINECOLOR | 
vcl::PushFlags::FILLCOLOR );
             rRenderContext.SetLineColor();
-            rRenderContext.SetFillColor( pItem->GetColor() );
+            if (pItem->GetColor() == COL_TRANSPARENT)
+                rRenderContext.SetFillColor();
+            else
+                rRenderContext.SetFillColor( pItem->GetColor() );
 
             const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, 
nRow ));
             rRenderContext.DrawRect(
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 60055b9aed97..4476326c9685 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1334,7 +1334,10 @@ void ScPrintFunc::DrawBorder( tools::Long nScrX, 
tools::Long nScrY, tools::Long
         }
         else
         {
-            pDev->SetFillColor(pBackground->GetColor());
+            if (pBackground->GetColor() == COL_TRANSPARENT)
+                pDev->SetFillColor();
+            else
+                pDev->SetFillColor(pBackground->GetColor());
             pDev->SetLineColor();
             pDev->DrawRect(aFrameRect);
         }

Reply via email to