include/vcl/gdimtf.hxx          |    2 +-
 sd/source/ui/unoidl/unopage.cxx |    4 ++--
 sfx2/source/doc/docinf.cxx      |    4 ++--
 vcl/source/gdi/gdimtf.cxx       |   12 ++++++------
 4 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 58e8dd06c7d83aed0944838f93e182576f065983
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Jul 27 13:45:17 2025 +0200
Commit:     Noel Grandin <noelgran...@gmail.com>
CommitDate: Mon Jul 28 15:02:42 2025 +0200

    BitmapEx->Bitmap in GDIMetaFile::CreateThumbnail
    
    since Bitmap can now handle transparency
    
    Change-Id: I30af8e112e86173a12275f2e4ef20967231cd45d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188443
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 9b458a970a70..ce0c912b860d 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -180,7 +180,7 @@ public:
     SAL_DLLPRIVATE sal_uLong GetSizeBytes() const;
 
     /// Creates an antialiased thumbnail
-    bool            CreateThumbnail(BitmapEx& rBitmapEx,
+    bool            CreateThumbnail(Bitmap& rBitmapEx,
                                     BmpConversion nColorConversion = 
BmpConversion::N24Bit,
                                     BmpScaleFlag nScaleFlag = 
BmpScaleFlag::BestQuality) const;
 
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 9566c9274ef9..4de10123073a 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1156,11 +1156,11 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const 
OUString& PropertyName )
                     nPgNum++;
                 }
                 std::shared_ptr<GDIMetaFile> xMetaFile = 
pDocShell->GetPreviewMetaFile();
-                BitmapEx aBitmap;
+                Bitmap aBitmap;
                 if (xMetaFile && xMetaFile->CreateThumbnail(aBitmap))
                 {
                     SvMemoryStream aMemStream;
-                    WriteDIB(aBitmap.GetBitmap(), aMemStream, false, false);
+                    WriteDIB(aBitmap, aMemStream, false, false);
                     uno::Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const 
*>(aMemStream.GetData()), aMemStream.Tell() );
                     aAny <<= aSeq;
                 }
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index 8a4558760ed2..83d93eac489d 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -309,11 +309,11 @@ bool SaveOlePropertySet(
 uno::Sequence<sal_Int8> convertMetaFile(GDIMetaFile const * i_pThumb)
 {
     if (i_pThumb) {
-        BitmapEx aBitmap;
+        Bitmap aBitmap;
         SvMemoryStream aStream;
         if (i_pThumb->CreateThumbnail(aBitmap))
         {
-            WriteDIB(aBitmap.GetBitmap(), aStream, false, false);
+            WriteDIB(aBitmap, aStream, false, false);
             return uno::Sequence<sal_Int8>(static_cast< const sal_Int8* >( 
aStream.GetData() ), aStream.TellEnd());
         }
     }
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 3b4b1e3aaabd..5f39914adda4 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2267,7 +2267,7 @@ sal_uLong GDIMetaFile::GetSizeBytes() const
     return nSizeBytes;
 }
 
-bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, BmpConversion 
eColorConversion, BmpScaleFlag nScaleFlag) const
+bool GDIMetaFile::CreateThumbnail(Bitmap& rBitmap, BmpConversion 
eColorConversion, BmpScaleFlag nScaleFlag) const
 {
     // initialization seems to be complicated but is used to avoid rounding 
errors
     ScopedVclPtrInstance< VirtualDevice > aVDev;
@@ -2282,8 +2282,8 @@ bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, 
BmpConversion eColorConve
     Size            aSizePix( std::abs( aBRPix.X() - aTLPix.X() ) + 1, 
std::abs( aBRPix.Y() - aTLPix.Y() ) + 1 );
     sal_uInt32      nMaximumExtent = 512;
 
-    if (!rBitmapEx.IsEmpty())
-        rBitmapEx.SetEmpty();
+    if (!rBitmap.IsEmpty())
+        rBitmap.SetEmpty();
 
     // determine size that has the same aspect ratio as image size and
     // fits into the rectangle determined by nMaximumExtent
@@ -2324,7 +2324,7 @@ bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, 
BmpConversion eColorConve
         const_cast<GDIMetaFile *>(this)->Play(*aVDev, Point(), aAntialias);
 
         // get paint bitmap
-        BitmapEx aBitmap( aVDev->GetBitmap( aNullPt, 
aVDev->GetOutputSizePixel() ) );
+        Bitmap aBitmap( aVDev->GetBitmap( aNullPt, aVDev->GetOutputSizePixel() 
) );
 
         // scale down the image to the desired size - use the input scaler for 
the scaling operation
         aBitmap.Scale(aDrawSize, nScaleFlag);
@@ -2334,10 +2334,10 @@ bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, 
BmpConversion eColorConve
         if (aSize.Width() && aSize.Height())
             aBitmap.Convert(eColorConversion);
 
-        rBitmapEx = aBitmap;
+        rBitmap = aBitmap;
     }
 
-    return !rBitmapEx.IsEmpty();
+    return !rBitmap.IsEmpty();
 }
 
 void GDIMetaFile::UseCanvas( bool _bUseCanvas )

Reply via email to