drawinglayer/inc/primitive2d/wallpaperprimitive2d.hxx    |    6 ++--
 drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx |   20 +++++++--------
 drawinglayer/source/tools/wmfemfhelper.cxx               |    2 -
 3 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 279d77593a1bc2bfebcceca463fb9227f1394d40
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Tue Aug 12 22:12:08 2025 +0200
Commit:     Noel Grandin <noelgran...@gmail.com>
CommitDate: Wed Aug 13 10:26:23 2025 +0200

    BitmapEx->Bitmap in WallpaperBitmapPrimitive2D
    
    now that Bitmap can handle transparency
    
    Change-Id: I921ae7dd72ca394ca6ae7869f607d135a0977b2d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189454
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/drawinglayer/inc/primitive2d/wallpaperprimitive2d.hxx 
b/drawinglayer/inc/primitive2d/wallpaperprimitive2d.hxx
index cf9a1ea49320..524a63e12a67 100644
--- a/drawinglayer/inc/primitive2d/wallpaperprimitive2d.hxx
+++ b/drawinglayer/inc/primitive2d/wallpaperprimitive2d.hxx
@@ -43,7 +43,7 @@ namespace drawinglayer::primitive2d
         {
         private:
             basegfx::B2DRange                   maObjectRange;
-            BitmapEx                            maBitmapEx;
+            Bitmap                              maBitmap;
             WallpaperStyle                      meWallpaperStyle;
 
             /// create local decomposition
@@ -53,12 +53,12 @@ namespace drawinglayer::primitive2d
             /// constructor
             WallpaperBitmapPrimitive2D(
                 const basegfx::B2DRange& rObjectRange,
-                const BitmapEx& rBitmapEx,
+                const Bitmap& rBitmap,
                 WallpaperStyle eWallpaperStyle);
 
             /// data read access
             const basegfx::B2DRange& getLocalObjectRange() const { return 
maObjectRange; }
-            const BitmapEx& getBitmapEx() const { return maBitmapEx ; }
+            const Bitmap& getBitmap() const { return maBitmap; }
             WallpaperStyle getWallpaperStyle() const { return 
meWallpaperStyle; }
 
             /// compare operator
diff --git a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx 
b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
index b9258ac08732..ba4f06341f4a 100644
--- a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
@@ -34,15 +34,15 @@ namespace drawinglayer::primitive2d
         Primitive2DReference 
WallpaperBitmapPrimitive2D::create2DDecomposition(const 
geometry::ViewInformation2D& /*rViewInformation*/) const
         {
 
-            if(getLocalObjectRange().isEmpty() || getBitmapEx().IsEmpty())
+            if(getLocalObjectRange().isEmpty() || getBitmap().IsEmpty())
                 return nullptr;
 
             Primitive2DReference aRetval;
 
             // get bitmap PIXEL size
-            const Size& rPixelSize = getBitmapEx().GetSizePixel();
+            const Size aPixelSize = getBitmap().GetSizePixel();
 
-            if(rPixelSize.Width() <= 0 || rPixelSize.Height() <= 0)
+            if(aPixelSize.Width() <= 0 || aPixelSize.Height() <= 0)
                 return nullptr;
 
             if(WallpaperStyle::Scale == getWallpaperStyle())
@@ -57,7 +57,7 @@ namespace drawinglayer::primitive2d
 
                 aRetval.set(
                     new BitmapPrimitive2D(
-                        Bitmap(getBitmapEx()),
+                        getBitmap(),
                         aObjectTransform));
             }
             else
@@ -65,7 +65,7 @@ namespace drawinglayer::primitive2d
                 // transform to logic size
                 basegfx::B2DHomMatrix 
aInverseViewTransformation(getViewTransformation());
                 aInverseViewTransformation.invert();
-                basegfx::B2DVector aLogicSize(rPixelSize.Width(), 
rPixelSize.Height());
+                basegfx::B2DVector aLogicSize(aPixelSize.Width(), 
aPixelSize.Height());
                 aLogicSize = aInverseViewTransformation * aLogicSize;
 
                 // apply layout
@@ -154,7 +154,7 @@ namespace drawinglayer::primitive2d
 
                     aRetval.set(
                         new BitmapPrimitive2D(
-                            Bitmap(getBitmapEx()),
+                            getBitmap(),
                             aObjectTransform));
 
                     // clip when not completely inside object range
@@ -177,7 +177,7 @@ namespace drawinglayer::primitive2d
 
                     // prepare FillGraphicAttribute
                     const attribute::FillGraphicAttribute 
aFillGraphicAttribute(
-                        Graphic(getBitmapEx()),
+                        Graphic(getBitmap()),
                         basegfx::B2DRange(aRelativeTopLeft, aRelativeTopLeft+ 
aRelativeSize),
                         true);
 
@@ -215,10 +215,10 @@ namespace drawinglayer::primitive2d
 
         WallpaperBitmapPrimitive2D::WallpaperBitmapPrimitive2D(
             const basegfx::B2DRange& rObjectRange,
-            const BitmapEx& rBitmapEx,
+            const Bitmap& rBitmap,
             WallpaperStyle eWallpaperStyle)
         :   maObjectRange(rObjectRange),
-            maBitmapEx(rBitmapEx),
+            maBitmap(rBitmap),
             meWallpaperStyle(eWallpaperStyle)
         {
         }
@@ -230,7 +230,7 @@ namespace drawinglayer::primitive2d
                 const WallpaperBitmapPrimitive2D& rCompare = static_cast<const 
WallpaperBitmapPrimitive2D&>(rPrimitive);
 
                 return (getLocalObjectRange() == rCompare.getLocalObjectRange()
-                    && getBitmapEx() == rCompare.getBitmapEx()
+                    && getBitmap() == rCompare.getBitmap()
                     && getWallpaperStyle() == rCompare.getWallpaperStyle());
             }
 
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx 
b/drawinglayer/source/tools/wmfemfhelper.cxx
index 06f23c9bb702..ec9ba943dc93 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -956,7 +956,7 @@ namespace wmfemfhelper
         rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> 
pBitmapWallpaperFill =
             new drawinglayer::primitive2d::WallpaperBitmapPrimitive2D(
                 aWallpaperRange,
-                BitmapEx(aBitmap),
+                aBitmap,
                 eWallpaperStyle);
 
         if(rProperty.getTransformation().isIdentity())

Reply via email to