include/vcl/graphic/BitmapHelper.hxx         |    2 +-
 toolkit/source/helper/vclunohelper.cxx       |    2 +-
 vcl/source/filter/GraphicNativeTransform.cxx |    6 +++---
 vcl/source/filter/eps/eps.cxx                |    8 ++++----
 vcl/source/filter/graphicfilter.cxx          |    2 +-
 vcl/source/filter/ieps/ieps.cxx              |    2 +-
 vcl/source/filter/webp/writer.cxx            |    2 +-
 vcl/source/graphic/UnoGraphic.cxx            |    2 +-
 vcl/source/graphic/UnoGraphicProvider.cxx    |   12 ++++++------
 9 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 663cda76ad78fc14661e9640c09a3853c01ff6dd
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Aug 26 19:35:12 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Aug 26 21:11:18 2025 +0200

    BitmapEx->Bitmap in vcl
    
    now that Bitmap supports transparency
    
    Change-Id: Ia7e972d80cf0c822d74c80c2229772f42b7b1636
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190241
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/source/filter/GraphicNativeTransform.cxx 
b/vcl/source/filter/GraphicNativeTransform.cxx
index 88078b2499cb..84f583e5d7ec 100644
--- a/vcl/source/filter/GraphicNativeTransform.cxx
+++ b/vcl/source/filter/GraphicNativeTransform.cxx
@@ -74,7 +74,7 @@ bool GraphicNativeTransform::rotateBitmapOnly(Degree10 
aRotation)
         return false;
     }
 
-    BitmapEx aBitmap = mrGraphic.GetBitmapEx();
+    Bitmap aBitmap = mrGraphic.GetBitmap();
     aBitmap.Rotate(aRotation, COL_BLACK);
     mrGraphic = aBitmap;
 
@@ -101,7 +101,7 @@ bool GraphicNativeTransform::rotateGeneric(Degree10 
aRotation, std::u16string_vi
 
     sal_uInt16 nFilterFormat = 
rFilter.GetExportFormatNumberForShortName(aType);
 
-    BitmapEx aBitmap = mrGraphic.GetBitmapEx();
+    Bitmap aBitmap = mrGraphic.GetBitmap();
     aBitmap.Rotate(aRotation, COL_BLACK);
     rFilter.ExportGraphic(aBitmap, u"none", aStream, nFilterFormat, 
&aFilterData);
 
@@ -116,7 +116,7 @@ bool GraphicNativeTransform::rotateGeneric(Degree10 
aRotation, std::u16string_vi
 
 void GraphicNativeTransform::rotateJPEG(Degree10 aRotation)
 {
-    BitmapEx aBitmap = mrGraphic.GetBitmapEx();
+    Bitmap aBitmap = mrGraphic.GetBitmap();
 
     if (aBitmap.GetSizePixel().Width() % 16 != 0 || 
aBitmap.GetSizePixel().Height() % 16 != 0)
     {
diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx
index 44f42414a596..40aaf96744c7 100644
--- a/vcl/source/filter/eps/eps.cxx
+++ b/vcl/source/filter/eps/eps.cxx
@@ -339,9 +339,9 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& 
rTargetStream, Filter
         ErrCode nErrCode;
         if ( mbGrayScale )
         {
-            BitmapEx aTempBitmapEx( rGraphic.GetBitmapEx() );
-            aTempBitmapEx.Convert( BmpConversion::N8BitGreys );
-            nErrCode = GraphicConverter::Export( rTargetStream, aTempBitmapEx, 
ConvertDataFormat::TIF ) ;
+            Bitmap aTempBitmap( rGraphic.GetBitmap() );
+            aTempBitmap.Convert( BmpConversion::N8BitGreys );
+            nErrCode = GraphicConverter::Export( rTargetStream, aTempBitmap, 
ConvertDataFormat::TIF ) ;
         }
         else
             nErrCode = GraphicConverter::Export( rTargetStream, rGraphic, 
ConvertDataFormat::TIF ) ;
@@ -471,7 +471,7 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
     if ( pPreview && aSizePoint.Width() && aSizePoint.Height() )
     {
         Size aSizeBitmap( ( aSizePoint.Width() + 7 ) & ~7, aSizePoint.Height() 
);
-        Bitmap aTmpBitmap( pPreview->GetBitmapEx().GetBitmap() );
+        Bitmap aTmpBitmap( pPreview->GetBitmap().CreateColorBitmap() );
         aTmpBitmap.Scale( aSizeBitmap, BmpScaleFlag::BestQuality );
         aTmpBitmap.Convert( BmpConversion::N1BitThreshold );
         BitmapScopedReadAccess pAcc(aTmpBitmap);
diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index cf35cc9db430..8f71e13f624a 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -218,7 +218,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& 
rGraphic, FilterConfigItem& r
         // Resolution is set
         if( nMode == 1 )
         {
-            BitmapEx    aBitmap( rGraphic.GetBitmapEx() );
+            Bitmap      aBitmap( rGraphic.GetBitmap() );
             MapMode     aMap( MapUnit::Map100thInch );
 
             sal_Int32   nDPI = rConfigItem.ReadInt32( u"Resolution"_ustr, 75 );
diff --git a/vcl/source/filter/ieps/ieps.cxx b/vcl/source/filter/ieps/ieps.cxx
index b5dfcfa40b64..9666609b3718 100644
--- a/vcl/source/filter/ieps/ieps.cxx
+++ b/vcl/source/filter/ieps/ieps.cxx
@@ -140,7 +140,7 @@ static void MakeAsMeta(Graphic &rGraphic)
 
     pVDev->EnableOutput( false );
     aMtf.Record( pVDev );
-    pVDev->DrawBitmapEx( Point(), aSize, rGraphic.GetBitmapEx() );
+    pVDev->DrawBitmapEx( Point(), aSize, rGraphic.GetBitmap() );
     aMtf.Stop();
     aMtf.WindStart();
     aMtf.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
diff --git a/vcl/source/filter/webp/writer.cxx 
b/vcl/source/filter/webp/writer.cxx
index fc80dd565668..a935c082bf7a 100644
--- a/vcl/source/filter/webp/writer.cxx
+++ b/vcl/source/filter/webp/writer.cxx
@@ -165,7 +165,7 @@ static bool writeWebp(SvStream& rStream, const Bitmap& 
bitmap, bool lossless,
 bool ExportWebpGraphic(SvStream& rStream, const Graphic& rGraphic,
                        FilterConfigItem* pFilterConfigItem)
 {
-    Bitmap bitmap(rGraphic.GetBitmapEx());
+    Bitmap bitmap(rGraphic.GetBitmap());
     // If lossless, neither presets nor quality matter.
     bool lossless = pFilterConfigItem->ReadBool(u"Lossless"_ustr, true);
     // Preset is WebPPreset values.
diff --git a/vcl/source/graphic/UnoGraphic.cxx 
b/vcl/source/graphic/UnoGraphic.cxx
index 4b6b8d60621d..e0498cd5567b 100644
--- a/vcl/source/graphic/UnoGraphic.cxx
+++ b/vcl/source/graphic/UnoGraphic.cxx
@@ -160,7 +160,7 @@ uno::Sequence<sal_Int8> SAL_CALL Graphic::getMaskDIB()
 
     if (!maGraphic.IsNone())
     {
-        return vcl::bitmap::GetMaskDIB(maGraphic.GetBitmapEx());
+        return vcl::bitmap::GetMaskDIB(maGraphic.GetBitmap());
     }
     else
     {
commit 8703e945331358d316c6b256698adcd3783ea37f
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Aug 26 18:31:53 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Aug 26 21:11:09 2025 +0200

    BitmapEx->Bitmap in UnoGraphicProvider
    
    Change-Id: Idd0cde234f366425b1176f4abc87446a3da5ad5c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190239
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/vcl/graphic/BitmapHelper.hxx 
b/include/vcl/graphic/BitmapHelper.hxx
index 04cb5e39ab96..948f11475a89 100644
--- a/include/vcl/graphic/BitmapHelper.hxx
+++ b/include/vcl/graphic/BitmapHelper.hxx
@@ -25,7 +25,7 @@ class Any;
 
 namespace vcl
 {
-VCL_DLLPUBLIC BitmapEx GetBitmap(const css::uno::Reference<css::awt::XBitmap>& 
xBitmap);
+VCL_DLLPUBLIC Bitmap GetBitmap(const css::uno::Reference<css::awt::XBitmap>& 
xBitmap);
 
 // Checks if the Any contains graphic::XGraphic; or if awt::XBitmap is there, 
converts it
 VCL_DLLPUBLIC css::uno::Reference<css::graphic::XGraphic> GetGraphic(const 
css::uno::Any& any);
diff --git a/toolkit/source/helper/vclunohelper.cxx 
b/toolkit/source/helper/vclunohelper.cxx
index cf4c064b3941..aab3836b0e89 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -64,7 +64,7 @@ Bitmap VCLUnoHelper::GetBitmap( const css::uno::Reference< 
css::awt::XBitmap>& r
     if (VCLXBitmap* pVCLBitmap = dynamic_cast<VCLXBitmap*>(rxBitmap.get()))
         return pVCLBitmap->GetBitmap();
 
-    return Bitmap(vcl::GetBitmap(rxBitmap));
+    return vcl::GetBitmap(rxBitmap);
 }
 
 css::uno::Reference< css::awt::XBitmap> VCLUnoHelper::CreateBitmap( const 
Bitmap& rBitmap )
diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx 
b/vcl/source/graphic/UnoGraphicProvider.cxx
index 77ea10c5f625..39765cfd6899 100644
--- a/vcl/source/graphic/UnoGraphicProvider.cxx
+++ b/vcl/source/graphic/UnoGraphicProvider.cxx
@@ -73,22 +73,22 @@ Bitmap BitmapFromDIB(const css::uno::Sequence<sal_Int8>& 
dib)
 
 namespace vcl
 {
-BitmapEx GetBitmap(const css::uno::Reference<css::awt::XBitmap>& xBitmap)
+Bitmap GetBitmap(const css::uno::Reference<css::awt::XBitmap>& xBitmap)
 {
     if (!xBitmap)
         return {};
 
     if (auto xGraphic = xBitmap.query<css::graphic::XGraphic>())
-        return Graphic(xGraphic).GetBitmapEx();
+        return Graphic(xGraphic).GetBitmap();
 
     // This is an unknown implementation of a XBitmap interface
     if (Bitmap aMask = BitmapFromDIB(xBitmap->getMaskDIB()); !aMask.IsEmpty())
     {
         aMask.Invert(); // Convert from transparency to alpha
-        return BitmapEx(BitmapFromDIB(xBitmap->getDIB()), aMask);
+        return Bitmap(BitmapEx(BitmapFromDIB(xBitmap->getDIB()), aMask));
     }
 
-    BitmapEx aBmp;
+    Bitmap aBmp;
     ReadDIBBitmapEx(aBmp, o3tl::temporary(AsStream(xBitmap->getDIB())), true);
     return aBmp;
 }
@@ -98,9 +98,9 @@ css::uno::Reference<css::graphic::XGraphic> GetGraphic(const 
css::uno::Any& any)
     if (auto xRet = any.query<css::graphic::XGraphic>())
         return xRet;
 
-    if (BitmapEx aBmpEx = GetBitmap(any.query<css::awt::XBitmap>()); 
!aBmpEx.IsEmpty())
+    if (Bitmap aBmp = GetBitmap(any.query<css::awt::XBitmap>()); 
!aBmp.IsEmpty())
     {
-        return Graphic(aBmpEx).GetXGraphic();
+        return Graphic(aBmp).GetXGraphic();
     }
 
     return {};

Reply via email to