include/sfx2/objsh.hxx           |    2 +-
 sfx2/source/appl/sfxpicklist.cxx |    2 +-
 sfx2/source/doc/graphhelp.cxx    |    4 ++--
 sfx2/source/doc/graphhelp.hxx    |    2 +-
 sfx2/source/doc/objcont.cxx      |    6 +++---
 sfx2/source/doc/objstor.cxx      |    2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit f4e821e5c5ce27fa0403131a891fd36344d88484
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Mon Jul 28 16:42:10 2025 +0200
Commit:     Noel Grandin <noelgran...@gmail.com>
CommitDate: Tue Jul 29 07:52:10 2025 +0200

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

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index f4f865bf991e..caa2b90d9dc6 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -464,7 +464,7 @@ public:
     Size                        GetFirstPageSize() const;
     bool                        DoClose();
     std::shared_ptr<GDIMetaFile> GetPreviewMetaFile( bool bFullContent = 
false, bool bOutputForScreen = false ) const;
-    BitmapEx                    GetPreviewBitmap() const;
+    Bitmap                      GetPreviewBitmap() const;
     virtual void                CancelTransfers();
 
     bool                        GenerateAndStoreThumbnail(
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 84903f800ca8..c52080259148 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -106,7 +106,7 @@ void SfxPickListImpl::AddDocumentToPickList(const 
SfxObjectShell* pDocSh, bool b
         }
         else
         {
-            BitmapEx aResultBitmap = pDocSh->GetPreviewBitmap();
+            Bitmap aResultBitmap = pDocSh->GetPreviewBitmap();
             if (!aResultBitmap.IsEmpty())
             {
                 SvMemoryStream aStream(65535, 65535);
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index d070439812fe..e65118e181a2 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -170,7 +170,7 @@ void* GraphicHelper::getWinMetaFileFromGDI_Impl( const 
GDIMetaFile* pGDIMeta, co
 
 
 // static
-bool GraphicHelper::getThumbnailFormatFromBitmap_Impl(const BitmapEx& rBitmap, 
const uno::Reference<io::XStream>& xStream)
+bool GraphicHelper::getThumbnailFormatFromBitmap_Impl(const Bitmap& rBitmap, 
const uno::Reference<io::XStream>& xStream)
 {
     if (rBitmap.IsEmpty() || !xStream.is())
         return false;
@@ -180,7 +180,7 @@ bool GraphicHelper::getThumbnailFormatFromBitmap_Impl(const 
BitmapEx& rBitmap, c
     if (pStream->GetError())
         return false;
 
-    BitmapEx bitmap(rBitmap);
+    Bitmap bitmap(rBitmap);
     bitmap.Convert(BmpConversion::N8BitColors);
 
     GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
diff --git a/sfx2/source/doc/graphhelp.hxx b/sfx2/source/doc/graphhelp.hxx
index 1945661fc12f..ed92d6e8e016 100644
--- a/sfx2/source/doc/graphhelp.hxx
+++ b/sfx2/source/doc/graphhelp.hxx
@@ -54,7 +54,7 @@ public:
     }
 
     static bool getThumbnailFormatFromBitmap_Impl(
-            const BitmapEx& rBitmap,
+            const Bitmap& rBitmap,
             const css::uno::Reference< css::io::XStream >& xStream );
 
     static OUString getThumbnailReplacementIDByFactoryName_Impl(
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index fdd8fdb89804..4b07602fc011 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -103,15 +103,15 @@ SfxObjectShell::GetPreviewMetaFile( bool bFullContent, 
bool bOutputForScreen ) c
     return xFile;
 }
 
-BitmapEx SfxObjectShell::GetPreviewBitmap() const
+Bitmap SfxObjectShell::GetPreviewBitmap() const
 {
     SfxCloseVetoLock lock(this);
     ScopedVclPtrInstance< VirtualDevice > pDevice(DeviceFormat::WITH_ALPHA);
     pDevice->SetAntialiasing(AntialiasingFlags::Enable | 
pDevice->GetAntialiasing());
     if(!CreatePreview_Impl(/*bFullContent*/false, false, pDevice, nullptr))
-        return BitmapEx();
+        return Bitmap();
     Size size = pDevice->GetOutputSizePixel();
-    BitmapEx aBitmap( pDevice->GetBitmap( Point(), size) );
+    Bitmap aBitmap( pDevice->GetBitmap( Point(), size) );
     // Scale down the image to the desired size from the 4*size from 
CreatePreview_Impl().
     size = Size( size.Width() / 4, size.Height() / 4 );
     aBitmap.Scale(size, BmpScaleFlag::BestQuality);
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 078291d93e03..59fa65c02ac2 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -4155,7 +4155,7 @@ bool SfxObjectShell::WriteThumbnail(bool bEncrypted, 
const uno::Reference<io::XS
         }
         else
         {
-            BitmapEx bitmap = GetPreviewBitmap();
+            Bitmap bitmap = GetPreviewBitmap();
             if (!bitmap.IsEmpty())
             {
                 bResult = 
GraphicHelper::getThumbnailFormatFromBitmap_Impl(bitmap, xStream);

Reply via email to