filter/source/msfilter/escherex.cxx |    2 +-
 sc/source/ui/miscdlgs/autofmt.cxx   |    5 ++++-
 sc/source/ui/view/printfun.cxx      |    5 ++++-
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 66bc4a12fb45d4d3d4bb16df75d24bd390b66b56
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Jun 30 11:57:43 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Jun 30 13:26:15 2025 +0200

    tdf#166842 do not use FillColor==COL_TRANSPARENT...
    
    .. on OutputDevice if that OutputDevice does not support alpha
    
    Change-Id: Ifd84bf760a427e5af9b3f06b4439b90cc3b9a990
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187178
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/filter/source/msfilter/escherex.cxx 
b/filter/source/msfilter/escherex.cxx
index 1fbba9923dc2..03a542643822 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1447,7 +1447,7 @@ Graphic lclDrawHatch( const drawing::Hatch& rHatch, const 
Color& rBackColor, boo
     aMtf.Clear();
     aMtf.Record(pVDev);
     pVDev->SetLineColor();
-    pVDev->SetFillColor(bFillBackground ? rBackColor : COL_TRANSPARENT);
+    pVDev->SetFillColor(bFillBackground ? rBackColor : COL_WHITE);
     pVDev->DrawRect(rRect);
     pVDev->DrawHatch(tools::PolyPolygon(rRect), 
Hatch(static_cast<HatchStyle>(rHatch.Style), Color(ColorTransparency, 
rHatch.Color), rHatch.Distance,
             Degree10(rHatch.Angle)));
commit 850a98962c0bbf6e11eb1a571a6160d896127167
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Jun 30 12:00:15 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Jun 30 13:26:06 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

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 abdc270a5b4f..da24ff798dab 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