avmedia/source/viewer/mediawindow.cxx                    |    8 -
 avmedia/source/viewer/mediawindow_impl.cxx               |   18 ++--
 avmedia/source/viewer/mediawindow_impl.hxx               |    4 
 dbaccess/source/ui/app/AppIconControl.cxx                |    2 
 extensions/source/scanner/grid.cxx                       |    2 
 framework/source/uielement/recentfilesmenucontroller.cxx |    2 
 include/vcl/bitmap.hxx                                   |    2 
 include/vcl/bitmapex.hxx                                 |    1 
 include/vcl/qt/QtUtils.hxx                               |    4 
 include/vcl/wall.hxx                                     |    1 
 sc/inc/colorscale.hxx                                    |    4 
 sc/inc/document.hxx                                      |    3 
 sc/source/core/data/colorscale.cxx                       |    6 -
 sc/source/ui/unoobj/targuno.cxx                          |    4 
 sc/source/ui/view/output.cxx                             |    4 
 sd/source/core/sdpage.cxx                                |   20 ++--
 sd/source/ui/controller/displaymodecontroller.cxx        |    4 
 sd/source/ui/presenter/PresenterHelper.cxx               |    4 
 sd/source/ui/slideshow/slideshowimpl.cxx                 |   20 ++--
 sd/source/ui/slidesorter/view/SlsTheme.cxx               |    2 
 sd/source/ui/unoidl/unopage.cxx                          |    2 
 sd/source/ui/view/viewoverlaymanager.cxx                 |    4 
 sfx2/inc/templateviewitem.hxx                            |    2 
 sfx2/source/appl/shutdowniconaqua.mm                     |    2 
 sfx2/source/control/recentdocsviewitem.cxx               |   18 ++--
 sfx2/source/control/recentdocsviewitem.hxx               |    8 -
 sfx2/source/control/templatelocalview.cxx                |    8 -
 sfx2/source/control/templateviewitem.cxx                 |    2 
 sfx2/source/sidebar/DeckTitleBar.cxx                     |    4 
 svtools/source/brwbox/editbrowsebox.cxx                  |   20 ++--
 svtools/source/control/tabbar.cxx                        |    2 
 svtools/source/misc/embedhlp.cxx                         |    2 
 svx/source/dialog/dlgctrl.cxx                            |    2 
 svx/source/dialog/frmsel.cxx                             |    6 -
 svx/source/gallery2/galctrl.cxx                          |    2 
 svx/source/gallery2/galobj.cxx                           |    6 -
 svx/source/sdr/contact/viewcontactofgraphic.cxx          |    4 
 svx/source/sdr/contact/viewcontactofsdrpage.cxx          |    2 
 svx/source/svdraw/svdhdl.cxx                             |    4 
 svx/source/svdraw/svdoole2.cxx                           |    2 
 svx/source/tbxctrls/tbcontrl.cxx                         |   64 +++++++--------
 svx/source/unodraw/unoshape.cxx                          |    4 
 sw/inc/viewsh.hxx                                        |    6 -
 sw/source/core/doc/notxtfrm.cxx                          |    4 
 sw/source/core/layout/paintfrm.cxx                       |    8 -
 sw/source/core/view/viewsh.cxx                           |    6 -
 sw/source/ui/frmdlg/frmpage.cxx                          |    2 
 sw/source/uibase/docvw/PageBreakWin.cxx                  |    6 -
 sw/source/uibase/uno/unotxdoc.cxx                        |    2 
 vcl/source/bitmap/BitmapEx.cxx                           |    5 -
 vcl/source/control/button.cxx                            |    6 -
 vcl/source/gdi/wall.cxx                                  |    6 +
 vcl/source/window/scrwnd.cxx                             |    4 
 vcl/workben/vcldemo.cxx                                  |   13 +--
 54 files changed, 176 insertions(+), 177 deletions(-)

New commits:
commit 81260259067e706dec84542efaf7c4fc807b9a36
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Sat Aug 9 19:29:08 2025 +0200
Commit:     Noel Grandin <noelgran...@gmail.com>
CommitDate: Sun Aug 10 08:51:20 2025 +0200

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

diff --git a/avmedia/source/viewer/mediawindow.cxx 
b/avmedia/source/viewer/mediawindow.cxx
index a4eb12c35720..739a463fbed1 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -390,16 +390,16 @@ MediaWindow::grabFrame(const 
uno::Reference<media::XPlayer>& xPlayer,
 
             if( !aPrefSize.Width && !aPrefSize.Height )
             {
-                const BitmapEx aBmpEx(AVMEDIA_BMP_AUDIOLOGO);
-                oGraphic.emplace( aBmpEx );
+                const Bitmap aBmp(AVMEDIA_BMP_AUDIOLOGO);
+                oGraphic.emplace( aBmp );
             }
         }
     }
 
     if (!xRet.is() && !oGraphic)
     {
-        const BitmapEx aBmpEx(AVMEDIA_BMP_EMPTYLOGO);
-        oGraphic.emplace( aBmpEx );
+        const Bitmap aBmp(AVMEDIA_BMP_EMPTYLOGO);
+        oGraphic.emplace( aBmp );
     }
 
     if (oGraphic)
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index c1b0f1c6721d..2415aa1143b3 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -160,8 +160,8 @@ void MediaWindowImpl::dispose()
 
     mpMediaWindow = nullptr;
 
-    mpEmptyBmpEx.reset();
-    mpAudioBmpEx.reset();
+    mpEmptyBmp.reset();
+    mpAudioBmp.reset();
     mpMediaWindowControl.disposeAndClear();
     mpChildWindow.disposeAndClear();
 
@@ -585,21 +585,21 @@ void MediaWindowImpl::Paint(vcl::RenderContext& 
rRenderContext, const tools::Rec
     if (mxPlayerWindow.is())
         mxPlayerWindow->update();
 
-    BitmapEx* pLogo = nullptr;
+    Bitmap* pLogo = nullptr;
 
     if (!mxPlayer.is())
     {
-        if (!mpEmptyBmpEx)
-            mpEmptyBmpEx.reset(new BitmapEx(AVMEDIA_BMP_EMPTYLOGO));
+        if (!mpEmptyBmp)
+            mpEmptyBmp.reset(new Bitmap(AVMEDIA_BMP_EMPTYLOGO));
 
-        pLogo = mpEmptyBmpEx.get();
+        pLogo = mpEmptyBmp.get();
     }
     else if (!mxPlayerWindow.is())
     {
-        if (!mpAudioBmpEx)
-            mpAudioBmpEx.reset(new BitmapEx(AVMEDIA_BMP_AUDIOLOGO));
+        if (!mpAudioBmp)
+            mpAudioBmp.reset(new Bitmap(AVMEDIA_BMP_AUDIOLOGO));
 
-        pLogo = mpAudioBmpEx.get();
+        pLogo = mpAudioBmp.get();
     }
 
     if (!mpChildWindow)
diff --git a/avmedia/source/viewer/mediawindow_impl.hxx 
b/avmedia/source/viewer/mediawindow_impl.hxx
index 7c2b07a19efa..923ce074cfb8 100644
--- a/avmedia/source/viewer/mediawindow_impl.hxx
+++ b/avmedia/source/viewer/mediawindow_impl.hxx
@@ -151,8 +151,8 @@ private:
     rtl::Reference<MediaEventListenersImpl> mxEvents;
     VclPtr<MediaChildWindow> mpChildWindow;
     VclPtr<MediaWindowControl> mpMediaWindowControl;
-    std::unique_ptr<BitmapEx> mpEmptyBmpEx;
-    std::unique_ptr<BitmapEx> mpAudioBmpEx;
+    std::unique_ptr<Bitmap> mpEmptyBmp;
+    std::unique_ptr<Bitmap> mpAudioBmp;
     const MediaItem* mpItem = nullptr;
 };
 
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx 
b/dbaccess/source/ui/app/AppIconControl.cxx
index d0a0a237dd19..8eb68fdbaf39 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -84,7 +84,7 @@ void OApplicationIconControl::Fill()
         // E_TABLE is 0, but 0 means void so use id of enum + 1
         std::unique_ptr<ThumbnailViewItem> xItem(new ThumbnailViewItem(*this, 
aCategory.eType + 1));
         xItem->mbBorder = false;
-        xItem->maPreview = Bitmap(BitmapEx(aCategory.aImageResId));
+        xItem->maPreview = Bitmap(aCategory.aImageResId);
         const Size aSize = xItem->maPreview.GetSizePixel();
         m_nMaxWidth = std::max(m_nMaxWidth, aSize.Width());
         m_nMaxHeight = std::max(m_nMaxHeight, aSize.Height());
diff --git a/extensions/source/scanner/grid.cxx 
b/extensions/source/scanner/grid.cxx
index 5b5a12d6d389..4c06634fa02d 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -211,7 +211,7 @@ GridDialog::GridDialog(weld::Window* pParent, double* 
pXValues, double* pYValues
     , m_xGridWindow(new GridWindow)
     , m_xGridWindowWND(new weld::CustomWeld(*m_xBuilder, u"gridwindow"_ustr, 
*m_xGridWindow))
 {
-    m_xGridWindow->Init(pXValues, pYValues, nValues, true/*bCutValues*/, 
BitmapEx(RID_SCANNER_HANDLE));
+    m_xGridWindow->Init(pXValues, pYValues, nValues, true/*bCutValues*/, 
BitmapEx(Bitmap(RID_SCANNER_HANDLE)));
     m_xResetTypeBox->set_active(0);
     m_xResetButton->connect_clicked( LINK( this, GridDialog, ClickButtonHdl ) 
);
 }
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx 
b/framework/source/uielement/recentfilesmenucontroller.cxx
index 47d99e1599f2..dac6d0b1be43 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -281,7 +281,7 @@ void 
RecentFilesMenuController::fillPopupMenu(std::unique_lock<std::mutex>& /*rG
             if ( bIsIconsAllowed ) {
                 // tdf#146219: don't use SvFileInformationManager::GetImageId,
                 // which needs to access the URL to detect if it's a directory
-                BitmapEx 
aThumbnail(SvFileInformationManager::GetFileImageId(aURL));
+                Bitmap 
aThumbnail(SvFileInformationManager::GetFileImageId(aURL));
                 rPopupMenu->setItemImage(sal_uInt16(i + 1), 
Graphic(aThumbnail).GetXGraphic(), false);
             }
 
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index c0f2851b6889..645326c22f6d 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -111,7 +111,7 @@ class SAL_WARN_UNUSED VCL_DLLPUBLIC Bitmap final
 public:
 
                             Bitmap();
-                            Bitmap( const OUString& rIconName );
+    explicit                Bitmap( const OUString& rIconName );
                             Bitmap( const Bitmap& rBitmap );
     explicit                Bitmap( const BitmapEx& rBitmapEx );
                             Bitmap( const Size& rSizePixel, vcl::PixelFormat 
ePixelFormat, const BitmapPalette* pPal = nullptr );
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index dc6d637eeb6b..f3b74479df6a 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -39,7 +39,6 @@ class SAL_WARN_UNUSED VCL_DLLPUBLIC BitmapEx
 public:
 
                         BitmapEx();
-    explicit            BitmapEx( const OUString& rIconName );
                         BitmapEx( const BitmapEx& rBitmapEx );
                         BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size 
aSize );
                         BitmapEx(Size aSize, vcl::PixelFormat ePixelFormat);
diff --git a/include/vcl/qt/QtUtils.hxx b/include/vcl/qt/QtUtils.hxx
index ac8e558bb9c1..cc20021389b0 100644
--- a/include/vcl/qt/QtUtils.hxx
+++ b/include/vcl/qt/QtUtils.hxx
@@ -67,8 +67,8 @@ inline QPixmap toQPixmap(const OutputDevice& rDevice)
 
 inline QPixmap loadQPixmapIcon(const OUString& rIconName)
 {
-    BitmapEx aIcon(rIconName);
-    return toQPixmap(aIcon);
+    Bitmap aIcon(rIconName);
+    return toQPixmap(BitmapEx(aIcon));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/wall.hxx b/include/vcl/wall.hxx
index c7e068fffbea..617027cb1fce 100644
--- a/include/vcl/wall.hxx
+++ b/include/vcl/wall.hxx
@@ -61,6 +61,7 @@ public:
                     Wallpaper( Wallpaper&& rWallpaper );
                     Wallpaper( const Color& rColor );
                     explicit Wallpaper( const BitmapEx& rBmpEx );
+                    explicit Wallpaper( const Bitmap& rBmpEx );
                     ~Wallpaper();
 
     void            SetColor( const Color& rColor );
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 52425a8d0658..0d1810b9a854 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -23,7 +23,7 @@
 class ScFormulaCell;
 class ScTokenArray;
 struct ScDataBarInfo;
-class BitmapEx;
+class Bitmap;
 
 // don't change the order
 // they are also used in the dialog to determine the position
@@ -388,7 +388,7 @@ public:
     SC_DLLPUBLIC static OUString getIconSetName( ScIconSetType eType );
     static sal_Int32 getIconSetElements( ScIconSetType eType );
     static OUString getIconName(ScIconSetType eType, sal_Int32 nIndex);
-    static BitmapEx& getBitmap(sc::IconSetBitmapMap& rBitmapMap, ScIconSetType 
eType, sal_Int32 nIndex);
+    static Bitmap& getBitmap(sc::IconSetBitmapMap& rBitmapMap, ScIconSetType 
eType, sal_Int32 nIndex);
 
     typedef ScIconSetFormatData::Entries_t::iterator iterator;
     typedef ScIconSetFormatData::Entries_t::const_iterator const_iterator;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 565a0683496f..43a8db78c6d0 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -207,6 +207,7 @@ class ScHint;
 class SvtBroadcaster;
 enum class ScDBDataPortion;
 enum class ScSheetEventId;
+class Bitmap;
 class BitmapEx;
 class ScColumnsRange;
 struct ScFilterEntries;
@@ -216,7 +217,7 @@ enum class ScConditionMode;
 
 namespace sc {
 
-typedef std::map<OUString, BitmapEx> IconSetBitmapMap;
+typedef std::map<OUString, Bitmap> IconSetBitmapMap;
 
 }
 
diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 6f569fb18bd6..ca8289828c52 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -1545,16 +1545,16 @@ OUString ScIconSetFormat::getIconName(ScIconSetType 
const eType, sal_Int32 const
     return sBitmap;
 }
 
-BitmapEx& ScIconSetFormat::getBitmap(sc::IconSetBitmapMap & rIconSetBitmapMap,
+Bitmap& ScIconSetFormat::getBitmap(sc::IconSetBitmapMap & rIconSetBitmapMap,
         ScIconSetType const eType, sal_Int32 const nIndex)
 {
     OUString sBitmap(ScIconSetFormat::getIconName(eType, nIndex));
 
-    std::map<OUString, BitmapEx>::iterator itr = 
rIconSetBitmapMap.find(sBitmap);
+    std::map<OUString, Bitmap>::iterator itr = rIconSetBitmapMap.find(sBitmap);
     if (itr != rIconSetBitmapMap.end())
         return itr->second;
 
-    BitmapEx aBitmap(sBitmap);
+    Bitmap aBitmap(sBitmap);
     auto itrNew = rIconSetBitmapMap.emplace(sBitmap, aBitmap);
     assert(itrNew.second);
 
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index 0103e3f0513c..f5b8ddffa3c1 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -229,8 +229,8 @@ void ScLinkTargetTypeObj::SetLinkTargetBitmap( uno::Any& 
rRet, sal_uInt16 nType
     }
     if (nImgId != ScContentId::ROOT)
     {
-        BitmapEx aBitmapEx { aContentBmps[static_cast<int>(nImgId) -1 ] };
-        rRet <<= VCLUnoHelper::CreateBitmap(Bitmap(aBitmapEx));
+        Bitmap aBitmap { aContentBmps[static_cast<int>(nImgId) -1 ] };
+        rRet <<= VCLUnoHelper::CreateBitmap(aBitmap);
     }
 }
 
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 67df33d7e09a..9be731d12b91 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -949,7 +949,7 @@ void drawDataBars(vcl::RenderContext& rRenderContext, const 
ScDataBarInfo* pOldD
     rRenderContext.SetFillColor();
 }
 
-const BitmapEx& getIcon(sc::IconSetBitmapMap & rIconSetBitmapMap, 
ScIconSetType eType, sal_Int32 nIndex)
+const Bitmap& getIcon(sc::IconSetBitmapMap & rIconSetBitmapMap, ScIconSetType 
eType, sal_Int32 nIndex)
 {
     return ScIconSetFormat::getBitmap(rIconSetBitmapMap, eType, nIndex);
 }
@@ -959,7 +959,7 @@ void drawIconSets(vcl::RenderContext& rRenderContext, const 
ScIconSetInfo* pOldI
 {
     ScIconSetType eType = pOldIconSetInfo->eIconSetType;
     sal_Int32 nIndex = pOldIconSetInfo->nIconIndex;
-    const BitmapEx& rIcon = getIcon(rIconSetBitmapMap, eType, nIndex);
+    const Bitmap& rIcon = getIcon(rIconSetBitmapMap, eType, nIndex);
 
     tools::Long aHeight = o3tl::convert(10, o3tl::Length::pt, 
o3tl::Length::mm100);
 
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 8500c0a71ef3..932a01658876 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -337,8 +337,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool 
bVertical, const ::t
 
         case PresObjKind::Graphic:
         {
-            BitmapEx aBmpEx(BMP_PRESOBJ_GRAPHIC);
-            Graphic  aGraphic( aBmpEx );
+            Bitmap aBmp(BMP_PRESOBJ_GRAPHIC);
+            Graphic  aGraphic( aBmp );
             OutputDevice &aOutDev = *Application::GetDefaultDevice();
             aOutDev.Push();
 
@@ -358,8 +358,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool 
bVertical, const ::t
         case PresObjKind::Object:
         {
             pSdrObj = new SdrOle2Obj(getSdrModelFromSdrPage());
-            BitmapEx aBmpEx(BMP_PRESOBJ_OBJECT);
-            Graphic aGraphic( aBmpEx );
+            Bitmap aBmp(BMP_PRESOBJ_OBJECT);
+            Graphic aGraphic( aBmp );
             static_cast<SdrOle2Obj*>(pSdrObj.get())->SetGraphic(aGraphic);
         }
         break;
@@ -368,8 +368,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool 
bVertical, const ::t
         {
             pSdrObj = new SdrOle2Obj(getSdrModelFromSdrPage());
             static_cast<SdrOle2Obj*>(pSdrObj.get())->SetProgName( 
u"StarChart"_ustr );
-            BitmapEx aBmpEx(BMP_PRESOBJ_CHART);
-            Graphic aGraphic( aBmpEx );
+            Bitmap aBmp(BMP_PRESOBJ_CHART);
+            Graphic aGraphic( aBmp );
             static_cast<SdrOle2Obj*>(pSdrObj.get())->SetGraphic(aGraphic);
         }
         break;
@@ -378,8 +378,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool 
bVertical, const ::t
         {
             pSdrObj = new SdrOle2Obj(getSdrModelFromSdrPage());
             static_cast<SdrOle2Obj*>(pSdrObj.get())->SetProgName( 
u"StarOrg"_ustr );
-            BitmapEx aBmpEx(BMP_PRESOBJ_ORGCHART);
-            Graphic aGraphic( aBmpEx );
+            Bitmap aBmp(BMP_PRESOBJ_ORGCHART);
+            Graphic aGraphic( aBmp );
             static_cast<SdrOle2Obj*>(pSdrObj.get())->SetGraphic(aGraphic);
         }
         break;
@@ -389,8 +389,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool 
bVertical, const ::t
         {
             pSdrObj = new SdrOle2Obj(getSdrModelFromSdrPage());
             static_cast<SdrOle2Obj*>(pSdrObj.get())->SetProgName( 
u"StarCalc"_ustr );
-            BitmapEx aBmpEx(BMP_PRESOBJ_TABLE);
-            Graphic aGraphic( aBmpEx );
+            Bitmap aBmp(BMP_PRESOBJ_TABLE);
+            Graphic aGraphic( aBmp );
             static_cast<SdrOle2Obj*>(pSdrObj.get())->SetGraphic(aGraphic);
         }
         break;
diff --git a/sd/source/ui/controller/displaymodecontroller.cxx 
b/sd/source/ui/controller/displaymodecontroller.cxx
index ffc8571efb59..f56cd890cf24 100644
--- a/sd/source/ui/controller/displaymodecontroller.cxx
+++ b/sd/source/ui/controller/displaymodecontroller.cxx
@@ -125,7 +125,7 @@ static void fillLayoutValueSet(ValueSet* pValue, const 
snew_slide_value_info* pI
     for( ; pInfo->mnId; pInfo++ )
     {
         OUString aText(SdResId(pInfo->mpStrResId));
-        BitmapEx aBmp(pInfo->msBmpResId);
+        Bitmap aBmp(pInfo->msBmpResId);
 
         pValue->InsertItem(pInfo->mnId, Image(aBmp), aText);
 
@@ -227,7 +227,7 @@ void DisplayModeController::setToolboxItemImage(const 
OUString& rImage)
     if (!getToolboxId( nId, &pToolBox ))
         return;
 
-    BitmapEx aBmp(rImage);
+    Bitmap aBmp(rImage);
     int targetSize = (pToolBox->GetToolboxButtonSize() == 
ToolBoxButtonSize::Large) ? 32 : 16;
     double scale = 1.0f;
     Size size = aBmp.GetSizePixel();
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx 
b/sd/source/ui/presenter/PresenterHelper.cxx
index 4c47322515ee..bc08b91d414d 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -325,10 +325,10 @@ Reference<rendering::XBitmap> PresenterHelper::loadBitmap 
(
 
     if (pCanvas)
     {
-        BitmapEx aBitmapEx(bmpid);
+        Bitmap aBitmap(bmpid);
         cppcanvas::BitmapSharedPtr xBitmap(
             cppcanvas::VCLFactory::createBitmap(pCanvas,
-                Bitmap(aBitmapEx)));
+                aBitmap));
         if (!xBitmap)
             return nullptr;
         return xBitmap->getUNOBitmap();
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 08ff8b9a6c5d..95025ac0b6f0 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1256,9 +1256,9 @@ bool SlideshowImpl::startShowImpl( const Sequence< 
beans::PropertyValue >& aProp
             mxView->getCanvas() );
         if (xSpriteCanvas.is())
         {
-            BitmapEx waitSymbolBitmap(BMP_WAIT_ICON);
+            Bitmap waitSymbolBitmap(BMP_WAIT_ICON);
             const Reference<rendering::XBitmap> xBitmap(
-                vcl::unotools::xBitmapFromBitmap( Bitmap(waitSymbolBitmap) ) );
+                vcl::unotools::xBitmapFromBitmap( waitSymbolBitmap ) );
             if (xBitmap.is())
             {
                 mxShow->setProperty(
@@ -1268,9 +1268,9 @@ bool SlideshowImpl::startShowImpl( const Sequence< 
beans::PropertyValue >& aProp
                         beans::PropertyState_DIRECT_VALUE ) );
             }
 
-            BitmapEx pointerSymbolBitmap(BMP_POINTER_ICON);
+            Bitmap pointerSymbolBitmap(BMP_POINTER_ICON);
             const Reference<rendering::XBitmap> xPointerBitmap(
-                vcl::unotools::xBitmapFromBitmap( Bitmap(pointerSymbolBitmap) 
) );
+                vcl::unotools::xBitmapFromBitmap( pointerSymbolBitmap ) );
             if (xPointerBitmap.is())
             {
                 mxShow->setProperty(
@@ -1311,27 +1311,27 @@ bool SlideshowImpl::startShowImpl( const Sequence< 
beans::PropertyValue >& aProp
                         break;
                     }
                 }
-                BitmapEx prevSlideBm(prevSlidePath);
+                Bitmap prevSlideBm(prevSlidePath);
                 const Reference<rendering::XBitmap> xPrevSBitmap(
-                    vcl::unotools::xBitmapFromBitmap(Bitmap(prevSlideBm)));
+                    vcl::unotools::xBitmapFromBitmap(prevSlideBm));
                 if (xPrevSBitmap.is())
                 {
                     
mxShow->setProperty(beans::PropertyValue(u"NavigationSlidePrev"_ustr, -1,
                                                              Any(xPrevSBitmap),
                                                              
beans::PropertyState_DIRECT_VALUE));
                 }
-                BitmapEx menuSlideBm(menuPath);
+                Bitmap menuSlideBm(menuPath);
                 const Reference<rendering::XBitmap> xMenuSBitmap(
-                    vcl::unotools::xBitmapFromBitmap(Bitmap(menuSlideBm)));
+                    vcl::unotools::xBitmapFromBitmap(menuSlideBm));
                 if (xMenuSBitmap.is())
                 {
                     
mxShow->setProperty(beans::PropertyValue(u"NavigationSlideMenu"_ustr, -1,
                                                              Any(xMenuSBitmap),
                                                              
beans::PropertyState_DIRECT_VALUE));
                 }
-                BitmapEx nextSlideBm(nextSlidePath);
+                Bitmap nextSlideBm(nextSlidePath);
                 const Reference<rendering::XBitmap> xNextSBitmap(
-                    vcl::unotools::xBitmapFromBitmap(Bitmap(nextSlideBm)));
+                    vcl::unotools::xBitmapFromBitmap(nextSlideBm));
                 if (xNextSBitmap.is())
                 {
                     
mxShow->setProperty(beans::PropertyValue(u"NavigationSlideNext"_ustr, -1,
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx 
b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index 5172e6241eaa..4bd66946e52b 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -225,7 +225,7 @@ void Theme::InitializeIcon(const IconType eType, const 
OUString& rResourceId)
 {
     if (size_t(eType)<maIcons.size())
     {
-        const BitmapEx aIcon(rResourceId);
+        const Bitmap aIcon(rResourceId);
         maIcons[eType] = aIcon;
     }
     else
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index a2fbe686c7da..5acf4dfb77c3 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1093,7 +1093,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const 
OUString& PropertyName )
     }
     case WID_PAGE_LDBITMAP:
         {
-            Reference< awt::XBitmap > 
xBitmap(VCLUnoHelper::CreateBitmap(Bitmap(BitmapEx(BMP_PAGE))));
+            Reference< awt::XBitmap > 
xBitmap(VCLUnoHelper::CreateBitmap(Bitmap(BMP_PAGE)));
             aAny <<= xBitmap;
         }
         break;
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx 
b/sd/source/ui/view/viewoverlaymanager.cxx
index c692da31c07c..2e3d4c61187c 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -105,8 +105,8 @@ static Bitmap& getButtonImage( int index, bool large )
     {
         for (size_t i = 0; i < SAL_N_ELEMENTS(aSmallPlaceHolders); i++ )
         {
-            gSmallButtonImages[i].set(BitmapEx(aSmallPlaceHolders[i]));
-            gLargeButtonImages[i].set(BitmapEx(aBigPlaceHolders[i]));
+            gSmallButtonImages[i].set(Bitmap(aSmallPlaceHolders[i]));
+            gLargeButtonImages[i].set(Bitmap(aBigPlaceHolders[i]));
         }
     }
 
diff --git a/sfx2/inc/templateviewitem.hxx b/sfx2/inc/templateviewitem.hxx
index 25f73b9d8eaa..c1eb91471e5a 100644
--- a/sfx2/inc/templateviewitem.hxx
+++ b/sfx2/inc/templateviewitem.hxx
@@ -38,7 +38,7 @@ public:
 private:
 
     OUString maPath;
-    BitmapEx maDefaultBitmap;
+    Bitmap maDefaultBitmap;
     bool mbIsDefaultTemplate;
 };
 
diff --git a/sfx2/source/appl/shutdowniconaqua.mm 
b/sfx2/source/appl/shutdowniconaqua.mm
index 7ed38096ca4f..484b0f44416f 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -289,7 +289,7 @@ struct RecentMenuEntry
 
             if ( [NSApp respondsToSelector: @selector(createNSImage:)] )
             {
-                BitmapEx 
aThumbnail(SvFileInformationManager::GetFileImageId(aURL));
+                Bitmap 
aThumbnail(SvFileInformationManager::GetFileImageId(aURL));
                 Size aBmpSize = aThumbnail.GetSizePixel();
                 if ( aBmpSize.Width() > 0 && aBmpSize.Height() > 0 )
                 {
diff --git a/sfx2/source/control/recentdocsviewitem.cxx 
b/sfx2/source/control/recentdocsviewitem.cxx
index 1cd72da80f9c..0802673e9184 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -73,16 +73,16 @@ bool IsDocEncrypted(const OUString& rURL)
 }
 
 using Ext2IconMap = std::map<sfx2::ApplicationType, OUString>;
-BitmapEx Url2Icon(std::u16string_view rURL, const Ext2IconMap& rExtToIcon, 
const OUString& sDefault)
+Bitmap Url2Icon(std::u16string_view rURL, const Ext2IconMap& rExtToIcon, const 
OUString& sDefault)
 {
     auto it = std::find_if(rExtToIcon.begin(), rExtToIcon.end(),
                            [aExt = INetURLObject(rURL).getExtension()](const 
auto& r)
                            { return 
sfx2::RecentDocsView::typeMatchesExtension(r.first, aExt); });
 
-    return BitmapEx(it != rExtToIcon.end() ? it->second : sDefault);
+    return Bitmap(it != rExtToIcon.end() ? it->second : sDefault);
 };
 
-BitmapEx getDefaultThumbnail(const OUString& rURL)
+Bitmap getDefaultThumbnail(const OUString& rURL)
 {
     static const Ext2IconMap BitmapForExtension
         = { { sfx2::ApplicationType::TYPE_WRITER, SFX_FILE_THUMBNAIL_TEXT },
@@ -106,7 +106,7 @@ BitmapEx getDefaultThumbnail(const OUString& rURL)
     return Url2Icon(rURL, rWhichMap, SFX_FILE_THUMBNAIL_DEFAULT);
 }
 
-BitmapEx getModuleOverlay(std::u16string_view rURL)
+Bitmap getModuleOverlay(std::u16string_view rURL)
 {
     static const Ext2IconMap OverlayBitmapForExtension
         = { { sfx2::ApplicationType::TYPE_WRITER, SFX_FILE_OVERLAY_TEXT },
@@ -165,7 +165,7 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView 
&rView, const OUStri
                                                             
aURLObj.getExtension()))
         {
             aThumbnail
-                = Bitmap(BitmapEx(nThumbnailSize > 192 ? 
SFX_THUMBNAIL_BASE_256 : SFX_THUMBNAIL_BASE_192));
+                = Bitmap(nThumbnailSize > 192 ? SFX_THUMBNAIL_BASE_256 : 
SFX_THUMBNAIL_BASE_192);
         }
     }
 
@@ -215,7 +215,7 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView 
&rView, const OUStri
         // Pre-scale the thumbnail to the final size before applying the 
overlay
         aThumbnail = TemplateLocalView::scaleImg(aThumbnail, nThumbnailSize, 
nThumbnailSize);
 
-        BitmapEx aModule = getModuleOverlay(rURL);
+        Bitmap aModule = getModuleOverlay(rURL);
         aModule.Scale(Size(48,48)); //tdf#155200: Thumbnails don't change 
their size so overlay must not too
         if (!aModule.IsEmpty())
         {
@@ -304,13 +304,13 @@ void 
RecentDocsViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProc
         Point aIconPos(getRemoveIconArea().TopLeft());
 
         aSeq.push_back(new DiscreteBitmapPrimitive2D(
-                    Bitmap(m_bRemoveIconHighlighted ? 
m_aRemoveRecentBitmapHighlighted : m_aRemoveRecentBitmap),
+                    m_bRemoveIconHighlighted ? 
m_aRemoveRecentBitmapHighlighted : m_aRemoveRecentBitmap,
                     B2DPoint(aIconPos.X(), aIconPos.Y())));
 
         // tdf#38742 - draw pinned icon
         const Point aPinnedIconPos(getPinnedIconArea().TopLeft());
         aSeq.push_back(new DiscreteBitmapPrimitive2D(
-            Bitmap(m_bPinnedIconHighlighted ? 
m_aPinnedDocumentBitmapHighlighted : m_aPinnedDocumentBitmap),
+            m_bPinnedIconHighlighted ? m_aPinnedDocumentBitmapHighlighted : 
m_aPinnedDocumentBitmap,
             B2DPoint(aPinnedIconPos.X(), aPinnedIconPos.Y())));
 
         pProcessor->process(aSeq);
@@ -321,7 +321,7 @@ void 
RecentDocsViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProc
         const Point aPinnedIconPos(getPinnedIconArea().TopLeft());
         drawinglayer::primitive2d::Primitive2DContainer aSeq {
             new DiscreteBitmapPrimitive2D(
-                Bitmap(m_aPinnedDocumentBitmap), B2DPoint(aPinnedIconPos.X(), 
aPinnedIconPos.Y())) };
+                m_aPinnedDocumentBitmap, B2DPoint(aPinnedIconPos.X(), 
aPinnedIconPos.Y())) };
 
         pProcessor->process(aSeq);
     }
diff --git a/sfx2/source/control/recentdocsviewitem.hxx 
b/sfx2/source/control/recentdocsviewitem.hxx
index 3c5a5a6973f3..e0d1526f5413 100644
--- a/sfx2/source/control/recentdocsviewitem.hxx
+++ b/sfx2/source/control/recentdocsviewitem.hxx
@@ -61,14 +61,14 @@ private:
     /// Is the icon that the user can click to remove the document from the 
recent documents highlighted?
     bool m_bRemoveIconHighlighted;
 
-    BitmapEx m_aRemoveRecentBitmap;
+    Bitmap m_aRemoveRecentBitmap;
 
-    BitmapEx m_aRemoveRecentBitmapHighlighted;
+    Bitmap m_aRemoveRecentBitmapHighlighted;
 
     bool m_bPinned;
     bool m_bPinnedIconHighlighted;
-    BitmapEx m_aPinnedDocumentBitmap;
-    BitmapEx m_aPinnedDocumentBitmapHighlighted;
+    Bitmap m_aPinnedDocumentBitmap;
+    Bitmap m_aPinnedDocumentBitmapHighlighted;
 };
 
 #endif // INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX
diff --git a/sfx2/source/control/templatelocalview.cxx 
b/sfx2/source/control/templatelocalview.cxx
index 105129486b39..de5fbbf607b0 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -872,13 +872,13 @@ Bitmap TemplateLocalView::getDefaultThumbnail( 
std::u16string_view rPath )
     OUString aExt = aUrl.getExtension();
 
     if ( ViewFilter_Application::isFilteredExtension( 
FILTER_APPLICATION::WRITER, aExt) )
-        aImg = Bitmap(BitmapEx(SFX_THUMBNAIL_TEXT));
+        aImg = Bitmap(SFX_THUMBNAIL_TEXT);
     else if ( ViewFilter_Application::isFilteredExtension( 
FILTER_APPLICATION::CALC, aExt) )
-        aImg = Bitmap(BitmapEx(SFX_THUMBNAIL_SHEET));
+        aImg = Bitmap(SFX_THUMBNAIL_SHEET);
     else if ( ViewFilter_Application::isFilteredExtension( 
FILTER_APPLICATION::IMPRESS, aExt) )
-        aImg = Bitmap(BitmapEx(SFX_THUMBNAIL_PRESENTATION));
+        aImg = Bitmap(SFX_THUMBNAIL_PRESENTATION);
     else if ( ViewFilter_Application::isFilteredExtension( 
FILTER_APPLICATION::DRAW, aExt) )
-        aImg = Bitmap(BitmapEx(SFX_THUMBNAIL_DRAWING));
+        aImg = Bitmap(SFX_THUMBNAIL_DRAWING);
 
     return aImg;
 }
diff --git a/sfx2/source/control/templateviewitem.cxx 
b/sfx2/source/control/templateviewitem.cxx
index 1e1a5e8f841f..d0dd8533ee6d 100644
--- a/sfx2/source/control/templateviewitem.cxx
+++ b/sfx2/source/control/templateviewitem.cxx
@@ -110,7 +110,7 @@ void 
TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces
     {
         Point aIconPos(getDefaultIconArea().TopLeft());
 
-        aSeq[4] = new DiscreteBitmapPrimitive2D( Bitmap(maDefaultBitmap),
+        aSeq[4] = new DiscreteBitmapPrimitive2D( maDefaultBitmap,
                     B2DPoint(aIconPos.X(), aIconPos.Y()));
     }
 
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx 
b/sfx2/source/sidebar/DeckTitleBar.cxx
index 3c77ab2ea014..b0430c1a5901 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -35,7 +35,7 @@ namespace sfx2::sidebar {
 class GripWidget : public weld::CustomWidgetController
 {
 private:
-    BitmapEx maGrip;
+    Bitmap maGrip;
 public:
     virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
     {
@@ -45,7 +45,7 @@ public:
 
     virtual void StyleUpdated() override
     {
-        maGrip = BitmapEx(u"sfx2/res/grip.png"_ustr);
+        maGrip = Bitmap(u"sfx2/res/grip.png"_ustr);
         Size aGripSize(maGrip.GetSizePixel());
         set_size_request(aGripSize.Width(), aGripSize.Height());
         weld::CustomWidgetController::StyleUpdated();
diff --git a/svtools/source/brwbox/editbrowsebox.cxx 
b/svtools/source/brwbox/editbrowsebox.cxx
index 6904effc94be..2db62fb04db1 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -230,37 +230,37 @@ void EditBrowseBox::PaintField( vcl::RenderContext& rDev, 
const tools::Rectangle
 
 Image EditBrowseBox::GetImage(RowStatus eStatus) const
 {
-    BitmapEx aBitmap;
+    Bitmap aBitmap;
     bool bNeedMirror = IsRTLEnabled();
     switch (eStatus)
     {
         case CURRENT:
-            aBitmap = BitmapEx(BMP_CURRENT);
+            aBitmap = Bitmap(BMP_CURRENT);
             break;
         case CURRENTNEW:
-            aBitmap = BitmapEx(BMP_CURRENTNEW);
+            aBitmap = Bitmap(BMP_CURRENTNEW);
             break;
         case MODIFIED:
-            aBitmap = BitmapEx(BMP_MODIFIED);
+            aBitmap = Bitmap(BMP_MODIFIED);
             bNeedMirror = false;    // the pen is not mirrored
             break;
         case NEW:
-            aBitmap = BitmapEx(BMP_NEW);
+            aBitmap = Bitmap(BMP_NEW);
             break;
         case DELETED:
-            aBitmap = BitmapEx(BMP_DELETED);
+            aBitmap = Bitmap(BMP_DELETED);
             break;
         case PRIMARYKEY:
-            aBitmap = BitmapEx(BMP_PRIMARYKEY);
+            aBitmap = Bitmap(BMP_PRIMARYKEY);
             break;
         case CURRENT_PRIMARYKEY:
-            aBitmap = BitmapEx(BMP_CURRENT_PRIMARYKEY);
+            aBitmap = Bitmap(BMP_CURRENT_PRIMARYKEY);
             break;
         case FILTER:
-            aBitmap = BitmapEx(BMP_FILTER);
+            aBitmap = Bitmap(BMP_FILTER);
             break;
         case HEADERFOOTER:
-            aBitmap = BitmapEx(BMP_HEADERFOOTER);
+            aBitmap = Bitmap(BMP_HEADERFOOTER);
             break;
         case CLEAN:
             break;
diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index a7ef6d45fb78..f11b4cd91f4c 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -153,7 +153,7 @@ public:
             drawSeparator();
         if (mbProtect)
         {
-            BitmapEx aBitmap(BMP_TAB_LOCK);
+            Bitmap aBitmap(BMP_TAB_LOCK);
             Point aPosition = maRect.TopLeft();
             aPosition.AdjustX(2);
             aPosition.AdjustY((maRect.getOpenHeight() - 
aBitmap.GetSizePixel().Height()) / 2);
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index b3a291936aed..ef3584d03f54 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -756,7 +756,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const 
tools::Rectangle &rRect, con
             break;
     }
 
-    BitmapEx aBmp(BMP_PLUGIN);
+    Bitmap aBmp(BMP_PLUGIN);
     tools::Long nHeight = rRect.GetHeight() - pOut->GetTextHeight();
     tools::Long nWidth = rRect.GetWidth();
     if(nHeight > 0 && nWidth > 0 && aBmp.GetSizePixel().Width() > 0)
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index b90e5c4a43cd..b37bf9603e34 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -125,7 +125,7 @@ void SvxRectCtl::InitRectBitmap()
     const StyleSettings& rStyles = 
Application::GetSettings().GetStyleSettings();
     svtools::ColorConfig aColorConfig;
 
-    pBitmap.reset(new Bitmap(BitmapEx(RID_SVXCTRL_RECTBTNS)));
+    pBitmap.reset(new Bitmap(RID_SVXCTRL_RECTBTNS));
 
     // set bitmap-colors
     Color aColorAry1[7];
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index dca9a63deb3b..3f68e6617e46 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -350,9 +350,9 @@ void FrameSelectorImpl::InitArrowImageList()
     assert(SAL_N_ELEMENTS(aImageIds) == 16);
     for (size_t i = 0; i < SAL_N_ELEMENTS(aImageIds); ++i)
     {
-        BitmapEx aBmpEx { aImageIds[i] };
-        aBmpEx.Replace(pColorAry1, pColorAry2, 3);
-        maArrows.emplace_back(aBmpEx);
+        Bitmap aBmp { aImageIds[i] };
+        aBmp.Replace(pColorAry1, pColorAry2, 3, nullptr);
+        maArrows.emplace_back(aBmp);
     }
     assert(maArrows.size() == 16);
 
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index f9ddd0194e71..1f514e0fe4b3 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -233,7 +233,7 @@ bool DialogGalleryPreview::SetGraphic( const INetURLObject& 
_aURL )
 #if HAVE_FEATURE_AVMEDIA
     if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( 
INetURLObject::DecodeMechanism::Unambiguous ), u""_ustr ) )
     {
-        aGraphic = BitmapEx(RID_SVXBMP_GALLERY_MEDIA);
+        aGraphic = Bitmap(RID_SVXBMP_GALLERY_MEDIA);
     }
     else
 #endif
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 0e2726c45bea..abea217cbbf7 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -63,7 +63,7 @@ BitmapEx SgaObject::createPreviewBitmapEx(const Size& 
rSizePixel) const
     {
         if(SgaObjKind::Sound == GetObjKind())
         {
-            aRetval = BitmapEx(RID_SVXBMP_GALLERY_MEDIA);
+            aRetval = Bitmap(RID_SVXBMP_GALLERY_MEDIA);
         }
         else if(IsThumbBitmap())
         {
@@ -344,9 +344,7 @@ Bitmap SgaObjectSound::GetThumbBmp() const
         break;
     }
 
-    const BitmapEx  aBmpEx(sId);
-
-    return Bitmap(aBmpEx);
+    return Bitmap(sId);
 }
 
 void SgaObjectSound::WriteData( SvStream& rOut, const OUString& rDestDir ) 
const
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx 
b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index c72040f5e05b..76fbdf1da64c 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -188,7 +188,7 @@ namespace sdr::contact
             aTranslate.setY(aTranslate.getY() + fDistance);
 
             // draw a draft bitmap
-            const BitmapEx aDraftBitmap(BMAP_GrafikEi);
+            const Bitmap aDraftBitmap(BMAP_GrafikEi);
 
             if(!aDraftBitmap.IsEmpty())
             {
@@ -217,7 +217,7 @@ namespace sdr::contact
 
                     xRetval.push_back(
                             new drawinglayer::primitive2d::BitmapPrimitive2D(
-                                aDraftBitmap,
+                                BitmapEx(aDraftBitmap),
                                 aBitmapMatrix));
 
                     // consume bitmap size in X
diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx 
b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
index 8273ad830d70..35ecd11198ff 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
@@ -137,7 +137,7 @@ void 
ViewContactOfPageShadow::createViewIndependentPrimitive2DSequence(drawingla
     else
     {
         static tools::DeleteOnDeinit< 
drawinglayer::primitive2d::DiscreteShadow > aDiscreteShadow((
-                Bitmap(BitmapEx(SIP_SA_PAGESHADOW35X35))));
+                Bitmap(SIP_SA_PAGESHADOW35X35)));
 
         if(aDiscreteShadow.get())
         {
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 509a26d252b0..edc9323f61b7 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -102,7 +102,7 @@ public:
 #define INDIVIDUAL_COUNT    (5)
 
 SdrHdlBitmapSet::SdrHdlBitmapSet()
-    :   maMarkersBitmap(BitmapEx(SIP_SA_MARKERS)),
+    :   maMarkersBitmap(SIP_SA_MARKERS),
         // 15 kinds (BitmapMarkerKind) use index [0..5] + 5 extra
         maRealMarkers((KIND_COUNT * INDEX_COUNT) + INDIVIDUAL_COUNT)
 {
@@ -2397,7 +2397,7 @@ void SdrCropHdl::CreateB2dIAObject()
     const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
     int nHdlSize = m_pHdlList->GetHdlSize();
 
-    const Bitmap aHandlesBitmap((BitmapEx(SIP_SA_CROP_MARKERS)));
+    const Bitmap aHandlesBitmap(SIP_SA_CROP_MARKERS);
     Bitmap aBmp1( GetBitmapForHandle( aHandlesBitmap, nHdlSize ) );
 
     for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++)
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 74fcadd5a1d5..679f8e536d95 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1985,7 +1985,7 @@ bool SdrOle2Obj::AddOwnLightClient()
 
 Graphic SdrOle2Obj::GetEmptyOLEReplacementGraphic()
 {
-    return Graphic(BitmapEx(BMP_SVXOLEOBJ));
+    return Graphic(Bitmap(BMP_SVXOLEOBJ));
 }
 
 void SdrOle2Obj::SetWindow(const css::uno::Reference < css::awt::XWindow >& 
_xWindow)
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 36347ce81b91..c2b945cf8811 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -492,7 +492,7 @@ private:
     rtl::Reference<SvxFrameToolBoxControl> mxControl;
     std::unique_ptr<SvxFrmValueSet_Impl> mxFrameSet;
     std::unique_ptr<weld::CustomWeld> mxFrameSetWin;
-    std::vector<std::pair<BitmapEx, OUString>> aImgVec;
+    std::vector<std::pair<Bitmap, OUString>> aImgVec;
     bool                        bParagraphMode;
     bool                        m_bIsWriter;
     bool                        m_bIsCalc;
@@ -2790,20 +2790,20 @@ void SvxFrameWindow_Impl::InitImageList()
         // Since they don't have diagonal borders,
         // we have to use 12 border types here.
         aImgVec = {
-            {BitmapEx(RID_SVXBMP_FRAME1), 
SvxResId(RID_SVXSTR_TABLE_PRESET_NONE)},
-            {BitmapEx(RID_SVXBMP_FRAME2), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYLEFT)},
-            {BitmapEx(RID_SVXBMP_FRAME3), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYRIGHT)},
-            {BitmapEx(RID_SVXBMP_FRAME4), 
SvxResId(RID_SVXSTR_PARA_PRESET_LEFTRIGHT)},
-
-            {BitmapEx(RID_SVXBMP_FRAME5), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYTOP)},
-            {BitmapEx(RID_SVXBMP_FRAME6), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYBOTTOM)},
-            {BitmapEx(RID_SVXBMP_FRAME7), 
SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOM)},
-            {BitmapEx(RID_SVXBMP_FRAME8), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTER)},
-
-            {BitmapEx(RID_SVXBMP_FRAME9), 
SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOMHORI)},
-            {BitmapEx(RID_SVXBMP_FRAME10), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERHORI)},
-            {BitmapEx(RID_SVXBMP_FRAME11), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERVERI)},
-            {BitmapEx(RID_SVXBMP_FRAME12), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERALL)}
+            {Bitmap(RID_SVXBMP_FRAME1), 
SvxResId(RID_SVXSTR_TABLE_PRESET_NONE)},
+            {Bitmap(RID_SVXBMP_FRAME2), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYLEFT)},
+            {Bitmap(RID_SVXBMP_FRAME3), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYRIGHT)},
+            {Bitmap(RID_SVXBMP_FRAME4), 
SvxResId(RID_SVXSTR_PARA_PRESET_LEFTRIGHT)},
+
+            {Bitmap(RID_SVXBMP_FRAME5), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYTOP)},
+            {Bitmap(RID_SVXBMP_FRAME6), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYBOTTOM)},
+            {Bitmap(RID_SVXBMP_FRAME7), 
SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOM)},
+            {Bitmap(RID_SVXBMP_FRAME8), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTER)},
+
+            {Bitmap(RID_SVXBMP_FRAME9), 
SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOMHORI)},
+            {Bitmap(RID_SVXBMP_FRAME10), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERHORI)},
+            {Bitmap(RID_SVXBMP_FRAME11), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERVERI)},
+            {Bitmap(RID_SVXBMP_FRAME12), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERALL)}
         };
     }
     else
@@ -2812,23 +2812,23 @@ void SvxFrameWindow_Impl::InitImageList()
         // Therefore use additional 3 diagonal border types,
         // which make border types 15 in total.
         aImgVec = {
-            {BitmapEx(RID_SVXBMP_FRAME1), 
SvxResId(RID_SVXSTR_TABLE_PRESET_NONE)},
-            {BitmapEx(RID_SVXBMP_FRAME2), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYLEFT)},
-            {BitmapEx(RID_SVXBMP_FRAME3), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYRIGHT)},
-            {BitmapEx(RID_SVXBMP_FRAME4), 
SvxResId(RID_SVXSTR_PARA_PRESET_LEFTRIGHT)},
-            {BitmapEx(RID_SVXBMP_FRAME14), 
SvxResId(RID_SVXSTR_PARA_PRESET_DIAGONALDOWN)}, // diagonal down border
-
-            {BitmapEx(RID_SVXBMP_FRAME5), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYTOP)},
-            {BitmapEx(RID_SVXBMP_FRAME6), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYBOTTOM)},
-            {BitmapEx(RID_SVXBMP_FRAME7), 
SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOM)},
-            {BitmapEx(RID_SVXBMP_FRAME8), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTER)},
-            {BitmapEx(RID_SVXBMP_FRAME13), 
SvxResId(RID_SVXSTR_PARA_PRESET_DIAGONALUP)}, // diagonal up border
-
-            {BitmapEx(RID_SVXBMP_FRAME9), 
SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOMHORI)},
-            {BitmapEx(RID_SVXBMP_FRAME10), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERHORI)},
-            {BitmapEx(RID_SVXBMP_FRAME11), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERVERI)},
-            {BitmapEx(RID_SVXBMP_FRAME12), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERALL)},
-            {BitmapEx(RID_SVXBMP_FRAME15), 
SvxResId(RID_SVXSTR_PARA_PRESET_CRISSCROSS)} // criss-cross border
+            {Bitmap(RID_SVXBMP_FRAME1), 
SvxResId(RID_SVXSTR_TABLE_PRESET_NONE)},
+            {Bitmap(RID_SVXBMP_FRAME2), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYLEFT)},
+            {Bitmap(RID_SVXBMP_FRAME3), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYRIGHT)},
+            {Bitmap(RID_SVXBMP_FRAME4), 
SvxResId(RID_SVXSTR_PARA_PRESET_LEFTRIGHT)},
+            {Bitmap(RID_SVXBMP_FRAME14), 
SvxResId(RID_SVXSTR_PARA_PRESET_DIAGONALDOWN)}, // diagonal down border
+
+            {Bitmap(RID_SVXBMP_FRAME5), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYTOP)},
+            {Bitmap(RID_SVXBMP_FRAME6), 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYBOTTOM)},
+            {Bitmap(RID_SVXBMP_FRAME7), 
SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOM)},
+            {Bitmap(RID_SVXBMP_FRAME8), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTER)},
+            {Bitmap(RID_SVXBMP_FRAME13), 
SvxResId(RID_SVXSTR_PARA_PRESET_DIAGONALUP)}, // diagonal up border
+
+            {Bitmap(RID_SVXBMP_FRAME9), 
SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOMHORI)},
+            {Bitmap(RID_SVXBMP_FRAME10), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERHORI)},
+            {Bitmap(RID_SVXBMP_FRAME11), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERVERI)},
+            {Bitmap(RID_SVXBMP_FRAME12), 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERALL)},
+            {Bitmap(RID_SVXBMP_FRAME15), 
SvxResId(RID_SVXSTR_PARA_PRESET_CRISSCROSS)} // criss-cross border
         };
     }
 }
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 5336919b8fb4..f8a3fd92f883 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2665,8 +2665,8 @@ bool SvxShape::getPropertyValueImpl( const OUString&, 
const SfxItemPropertyMapEn
             sId = RID_UNODRAW_OBJECTS;
         }
 
-        BitmapEx aBmp(sId);
-        Reference<awt::XBitmap> xBmp(VCLUnoHelper::CreateBitmap(Bitmap(aBmp)));
+        Bitmap aBmp(sId);
+        Reference<awt::XBitmap> xBmp(VCLUnoHelper::CreateBitmap(aBmp));
 
         rValue <<= xBmp;
         break;
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index b8c2f55a2210..61173749118f 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -129,8 +129,8 @@ class SAL_DLLPUBLIC_RTTI SwViewShell : public 
sw::Ring<SwViewShell>
     // Set SwVisArea in order to enable clean formatting before printing.
     friend void SetSwVisArea( SwViewShell *pSh, const SwRect & );
 
-    std::unique_ptr<BitmapEx> m_xReplaceBmp; ///< replaced display of still 
loaded images
-    std::unique_ptr<BitmapEx> m_xErrorBmp;   ///< error display of missed 
images
+    std::unique_ptr<Bitmap> m_xReplaceBmp; ///< replaced display of still 
loaded images
+    std::unique_ptr<Bitmap> m_xErrorBmp;   ///< error display of missed images
 
     static bool sbLstAct;            // true if EndAction of last Shell
                                      // i.e. if the EndActions of the other
@@ -609,7 +609,7 @@ public:
 
     bool IsInConstructor() const { return mbInConstructor; }
 
-    const BitmapEx& GetReplacementBitmap(bool bIsErrorState);
+    const Bitmap& GetReplacementBitmap(bool bIsErrorState);
     void DeleteReplacementBitmaps();
 
     const SwPostItMgr* GetPostItMgr() const { return 
const_cast<SwViewShell*>(this)->GetPostItMgr(); }
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index b858a1193f58..fd2927d0c414 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -143,8 +143,8 @@ static void lcl_PaintReplacement( const SwRect &rRect, 
const OUString &rText,
     aFont.SetUnderline( eUnderline );
     aFont.SetColor( aCol );
 
-    const BitmapEx& rBmp = 
const_cast<SwViewShell&>(rSh).GetReplacementBitmap(bDefect);
-    Graphic::DrawEx(*rSh.GetOut(), rText, aFont, rBmp, rRect.Pos(), 
rRect.SSize());
+    const Bitmap& rBmp = 
const_cast<SwViewShell&>(rSh).GetReplacementBitmap(bDefect);
+    Graphic::DrawEx(*rSh.GetOut(), rText, aFont, BitmapEx(rBmp), rRect.Pos(), 
rRect.SSize());
 }
 
 SwNoTextFrame::SwNoTextFrame(SwNoTextNode * const pNode, SwFrame* pSib )
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 4a13ac8ac692..43a60e563c69 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2116,9 +2116,9 @@ void DrawGraphic(
 
     if( bReplaceGrfNum )
     {
-        const BitmapEx& rBmp = rSh.GetReplacementBitmap(false);
+        const Bitmap& rBmp = rSh.GetReplacementBitmap(false);
         vcl::Font aTmp( rOutDev.GetFont() );
-        Graphic::DrawEx(rOutDev, OUString(), aTmp, rBmp, rOrg.Pos(), 
rOrg.SSize());
+        Graphic::DrawEx(rOutDev, OUString(), aTmp, BitmapEx(rBmp), rOrg.Pos(), 
rOrg.SSize());
     }
 }
 
@@ -4101,9 +4101,9 @@ bool SwFlyFrame::IsBackgroundTransparent() const
 
 static void lcl_PaintReplacement( const SwRect &rRect, const SwViewShell &rSh )
 {
-    const BitmapEx& rBmp = 
const_cast<SwViewShell&>(rSh).GetReplacementBitmap(false);
+    const Bitmap& rBmp = 
const_cast<SwViewShell&>(rSh).GetReplacementBitmap(false);
     vcl::Font aFont(rSh.GetOut()->GetFont() );
-    Graphic::DrawEx(*rSh.GetOut(), OUString(), aFont, rBmp, rRect.Pos(), 
rRect.SSize());
+    Graphic::DrawEx(*rSh.GetOut(), OUString(), aFont, BitmapEx(rBmp), 
rRect.Pos(), rRect.SSize());
 }
 
 bool SwFlyFrame::IsPaint(SdrObject *pObj, const SwViewShell& rSh)
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 706106f1ba02..df86cc955857 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2928,17 +2928,17 @@ sal_Int32 SwViewShell::GetPageNumAndSetOffsetForPDF( 
OutputDevice& rOut, const S
 }
 
 // --> PB 2007-05-30 #146850#
-const BitmapEx& SwViewShell::GetReplacementBitmap( bool bIsErrorState )
+const Bitmap& SwViewShell::GetReplacementBitmap( bool bIsErrorState )
 {
     if (bIsErrorState)
     {
         if (!m_xErrorBmp)
-            m_xErrorBmp.reset(new BitmapEx(RID_GRAPHIC_ERRORBMP));
+            m_xErrorBmp.reset(new Bitmap(RID_GRAPHIC_ERRORBMP));
         return *m_xErrorBmp;
     }
 
     if (!m_xReplaceBmp)
-        m_xReplaceBmp.reset(new BitmapEx(RID_GRAPHIC_REPLACEBMP));
+        m_xReplaceBmp.reset(new Bitmap(RID_GRAPHIC_REPLACEBMP));
     return *m_xReplaceBmp;
 }
 
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 8c6ac4b4c3ec..8ac5d98e99d2 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2506,7 +2506,7 @@ SwGrfExtPage::SwGrfExtPage(weld::Container* pPage, 
weld::DialogController* pCont
     // tdf#138843 place holder for the graphic type
     , m_xLabelGraphicType(m_xBuilder->weld_label(u"label-graphic-type"_ustr))
 {
-    m_aBmpWin.SetBitmapEx(BitmapEx(RID_BMP_PREVIEW_FALLBACK));
+    m_aBmpWin.SetBitmapEx(BitmapEx(Bitmap(RID_BMP_PREVIEW_FALLBACK)));
 
     m_xCtlAngle->SetLinkedField(m_xNfAngle.get(), 2);
 
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx 
b/sw/source/uibase/docvw/PageBreakWin.cxx
index 553bd1c96044..4ef4d86a60c1 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -204,12 +204,12 @@ void SwPageBreakWin::PaintButton()
                                         std::move(aPolygon), aColor));
 
     // Create the primitive for the image
-    BitmapEx aBmpEx(RID_BMP_PAGE_BREAK);
+    Bitmap aBmp(RID_BMP_PAGE_BREAK);
     double nImgOfstX = 3.0;
     if (bRtl)
-        nImgOfstX = aRect.Right() - aBmpEx.GetSizePixel().Width() - 3.0;
+        nImgOfstX = aRect.Right() - aBmp.GetSizePixel().Width() - 3.0;
     aSeq.push_back(new drawinglayer::primitive2d::DiscreteBitmapPrimitive2D(
-                                        Bitmap(aBmpEx), B2DPoint(nImgOfstX, 
1.0)));
+                                        aBmp, B2DPoint(nImgOfstX, 1.0)));
 
     double nTop = double(aRect.getOpenHeight()) / 2.0;
     double nBottom = nTop + 4.0;
diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 0ea38fb55e1c..0d8a2542dbda 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -4681,7 +4681,7 @@ static Any lcl_GetDisplayBitmap(std::u16string_view 
sLinkSuffix)
 
     if (!sImgId.isEmpty())
     {
-        aRet <<= VCLUnoHelper::CreateBitmap(Bitmap(BitmapEx(sImgId)));
+        aRet <<= VCLUnoHelper::CreateBitmap(Bitmap(sImgId));
     }
     return aRet;
 }
diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx
index 9c523eeceda7..9c8436ebbd52 100644
--- a/vcl/source/bitmap/BitmapEx.cxx
+++ b/vcl/source/bitmap/BitmapEx.cxx
@@ -80,11 +80,6 @@ BitmapEx::BitmapEx(Size aSize, vcl::PixelFormat ePixelFormat)
     maBitmapSize = aSize;
 }
 
-BitmapEx::BitmapEx( const OUString& rIconName )
-{
-    operator=(Bitmap(rIconName));
-}
-
 BitmapEx::BitmapEx( const Bitmap& rBmp ) :
         maBitmapSize ( rBmp.GetSizePixel() )
 {
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 480cb2413e45..1ade6af449b0 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2867,9 +2867,9 @@ static void LoadThemedImageList(const StyleSettings 
&rStyleSettings,
 
     for (const auto &a : rResources)
     {
-        BitmapEx aBmpEx(a);
-        aBmpEx.Replace(aColorAry1, aColorAry2, SAL_N_ELEMENTS(aColorAry1));
-        rList.emplace_back(aBmpEx);
+        Bitmap aBmp(a);
+        aBmp.Replace(aColorAry1, aColorAry2, SAL_N_ELEMENTS(aColorAry1), 
nullptr);
+        rList.emplace_back(aBmp);
     }
 }
 
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 2c7d571e90e6..d797e629c16f 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -136,6 +136,12 @@ Wallpaper::Wallpaper( const BitmapEx& rBmpEx )
     meStyle    = WallpaperStyle::Tile;
 }
 
+Wallpaper::Wallpaper( const Bitmap& rBmp )
+{
+    maBitmap   = rBmp;
+    meStyle    = WallpaperStyle::Tile;
+}
+
 Wallpaper::~Wallpaper() = default;
 
 void Wallpaper::ImplSetCachedBitmap( const BitmapEx& rBmp ) const
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 8634dc2332db..cb9771039c16 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -65,8 +65,8 @@ ImplWheelWindow::ImplWheelWindow( vcl::Window* pParent ) :
     // create wheel window
     SetTitleType( FloatWinTitleType::NONE );
     ImplCreateImageList();
-    BitmapEx aBmp(SV_RESID_BITMAP_SCROLLMSK);
-    ImplSetRegion(aBmp.GetBitmap());
+    Bitmap aBmp(SV_RESID_BITMAP_SCROLLMSK);
+    ImplSetRegion(aBmp);
 
     // set wheel mode
     if( bHorz && bVert )
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index cdc858ec91ee..0424bda97cd3 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -818,7 +818,7 @@ public:
         // be done with a shader / gradient
         static void SimulateBorderStretch(OutputDevice &rDev, const 
tools::Rectangle& r)
         {
-            BitmapEx aPageShadowMask(u"sw/res/page-shadow-mask.png"_ustr);
+            Bitmap aPageShadowMask(u"sw/res/page-shadow-mask.png"_ustr);
 
             BitmapEx aRight(aPageShadowMask);
             sal_Int32 nSlice = (aPageShadowMask.GetSizePixel().Width() - 3) / 
4;
@@ -844,7 +844,7 @@ public:
                 aRenderPt.Move(aShadowStretch.GetSizePixel().Width() + 4, 0);
             }
 
-            AlphaMask aWholeMask(aPageShadowMask.GetBitmap());
+            AlphaMask aWholeMask(BitmapEx(aPageShadowMask).GetBitmap());
             aBlockColor = Bitmap(aPageShadowMask.GetSizePixel(), 
vcl::PixelFormat::N24_BPP);
             aBlockColor.Erase(COL_GREEN);
             BitmapEx aWhole(aBlockColor, aWholeMask);
@@ -1138,7 +1138,7 @@ public:
         RENDER_DETAILS(icons,KEY_I,1)
 
         std::vector<OUString> maIconNames;
-        std::vector<BitmapEx> maIcons;
+        std::vector<Bitmap> maIcons;
         bool bHasLoadedAll;
         DrawIcons() : bHasLoadedAll(false)
         {
@@ -1343,7 +1343,7 @@ public:
                 Point aLocation(0,maIcons[0].GetSizePixel().Height() + 8);
                 for (size_t i = 0; i < maIcons.size(); i++)
                 {
-                    BitmapEx aSrc = maIcons[i];
+                    BitmapEx aSrc(maIcons[i]);
 
                     // original above
                     Point aAbove(aLocation);
@@ -1372,8 +1372,7 @@ public:
                     rDev.DrawBitmap(aBelow, aGrey);
 
                     aBelow.Move(aGrey.GetSizePixel().Width(),0);
-                    const BitmapEx& aGreyMask(aSrc);
-                    rDev.DrawBitmapEx(aBelow, aGreyMask);
+                    rDev.DrawBitmapEx(aBelow, aSrc);
 
                     aLocation.Move(aSrc.GetSizePixel().Width()*6,0);
                     if (aLocation.X() > r.Right())
@@ -1880,7 +1879,7 @@ public:
     {
         SetText(u"VCL widget demo"_ustr);
 
-        Wallpaper 
aWallpaper(BitmapEx(u"sfx2/res/128x128_writer_doc-p.png"_ustr));
+        Wallpaper 
aWallpaper(Bitmap(u"sfx2/res/128x128_writer_doc-p.png"_ustr));
         aWallpaper.SetStyle(WallpaperStyle::BottomRight);
         aWallpaper.SetColor(COL_RED);
 

Reply via email to