canvas/source/vcl/canvasbitmap.cxx |    7 ++-----
 oox/source/export/drawingml.cxx    |    4 +---
 2 files changed, 3 insertions(+), 8 deletions(-)

New commits:
commit 4863619489ce1bbe05586fab3bf51bfdc468c50d
Author:     Noel Grandin <[email protected]>
AuthorDate: Sun Oct 26 21:21:28 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Oct 27 09:03:59 2025 +0100

    no need to construct a Bitmap via an AlphaMask here
    
    we can just create a 32-bit bitmap
    
    Change-Id: Iaadbd714a6fe536db6f3e6f1aab3cb710e95dc2e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193005
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/canvas/source/vcl/canvasbitmap.cxx 
b/canvas/source/vcl/canvasbitmap.cxx
index cc995596642d..ddb4c905cd90 100644
--- a/canvas/source/vcl/canvasbitmap.cxx
+++ b/canvas/source/vcl/canvasbitmap.cxx
@@ -40,7 +40,6 @@ namespace vclcanvas
     {
         // create bitmap for given reference device
         // ========================================
-        Bitmap aBitmap(rSize, vcl::PixelFormat::N24_BPP);
 
         // only create alpha channel bitmap, if factory requested
         // that. Providing alpha-channeled bitmaps by default has,
@@ -48,15 +47,13 @@ namespace vclcanvas
         // use alpha VDev, then).
         if( bAlphaBitmap )
         {
-            AlphaMask   aAlpha ( rSize );
-
-            maCanvasHelper.init( Bitmap( aBitmap, aAlpha ),
+            maCanvasHelper.init( Bitmap(rSize, vcl::PixelFormat::N32_BPP),
                                  rDevice,
                                  rOutDevProvider );
         }
         else
         {
-            maCanvasHelper.init( aBitmap,
+            maCanvasHelper.init( Bitmap(rSize, vcl::PixelFormat::N24_BPP),
                                  rDevice,
                                  rOutDevProvider );
         }
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 097b8011d895..7bbc068a7eb5 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3302,12 +3302,10 @@ void DrawingML::WriteParagraphNumbering(const 
Reference< XPropertySet >& rXPropS
             tools::Long nPaddingY = std::lround((aDestSize.Height() - 
fBulletSizeRel * aDestSize.Height()) / 2.f);
             tools::Rectangle aDestRect(nPaddingX, nPaddingY, aDestSize.Width() 
- nPaddingX, aDestSize.Height() - nPaddingY);
 
-            AlphaMask aMask(aDestSize);
-            aMask.Erase(255);
             Bitmap aSourceBitmap(aGraphic.GetBitmap());
             aSourceBitmap.Scale(aDestRect.GetSize());
             tools::Rectangle aSourceRect(Point(0, 0), aDestRect.GetSize());
-            Bitmap aDestBitmap(Bitmap(aDestSize, vcl::PixelFormat::N24_BPP), 
aMask);
+            Bitmap aDestBitmap(aDestSize, vcl::PixelFormat::N32_BPP);
             aDestBitmap.CopyPixel(aDestRect, aSourceRect, aSourceBitmap);
             Graphic aDestGraphic(aDestBitmap);
             sRelationId = writeGraphicToStorage(aDestGraphic);

Reply via email to