[Libreoffice-commits] core.git: cppcanvas/source cui/source drawinglayer/source filter/source include/vcl sc/source sd/source sfx2/source svtools/source svx/source sw/qa sw/source vcl/source vcl/workben

Noel Grandin noel.grandin at collabora.co.uk
Thu May 31 12:09:14 UTC 2018


 cppcanvas/source/mtfrenderer/emfpimage.cxx |    2 +-
 cui/source/options/personalization.cxx     |    6 +++---
 cui/source/tabpages/backgrnd.cxx           |    8 ++++----
 cui/source/tabpages/grfpage.cxx            |    6 ++----
 cui/source/tabpages/numpages.cxx           |    2 +-
 cui/source/tabpages/tpline.cxx             |    2 +-
 drawinglayer/source/tools/emfpimage.cxx    |    2 +-
 filter/source/flash/swfexporter.cxx        |    2 +-
 filter/source/graphicfilter/egif/egif.cxx  |    7 +------
 filter/source/graphicfilter/eps/eps.cxx    |    6 +++---
 filter/source/graphicfilter/ieps/ieps.cxx  |    9 ++++-----
 filter/source/msfilter/msdffimp.cxx        |    2 +-
 filter/source/msfilter/svdfppt.cxx         |    2 +-
 include/vcl/dibtools.hxx                   |    7 ++++---
 include/vcl/graph.hxx                      |    1 -
 sc/source/filter/excel/xeescher.cxx        |    2 +-
 sd/source/ui/dlg/PhotoAlbumDialog.cxx      |    2 +-
 sd/source/ui/func/fuvect.cxx               |    4 +++-
 sfx2/source/dialog/filedlghelper.cxx       |    4 ++--
 svtools/source/filter/exportdialog.cxx     |    6 +++---
 svtools/source/filter/exportdialog.hxx     |    4 ++--
 svx/source/dialog/_bmpmask.cxx             |    8 ++++----
 svx/source/dialog/_contdlg.cxx             |    4 ++--
 svx/source/sidebar/nbdtmg.cxx              |    2 +-
 svx/source/unodraw/UnoGraphicExporter.cxx  |    2 +-
 svx/source/xoutdev/_xoutbmp.cxx            |   21 +++++----------------
 sw/qa/extras/inc/swmodeltestbase.hxx       |    5 ++++-
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |   24 ++++++++++--------------
 sw/source/uibase/dochdl/swdtflvr.cxx       |    2 +-
 vcl/source/filter/graphicfilter.cxx        |    8 ++++----
 vcl/source/filter/jpeg/JpegWriter.cxx      |    4 ++--
 vcl/source/gdi/dibtools.cxx                |    5 +++--
 vcl/source/gdi/graph.cxx                   |    5 -----
 vcl/source/gdi/pdfextoutdevdata.cxx        |    2 +-
 vcl/source/gdi/pdfwriter_impl.cxx          |    8 ++++----
 vcl/source/gdi/svmconverter.cxx            |   12 ++++++------
 vcl/source/graphic/UnoGraphicProvider.cxx  |    7 +------
 vcl/workben/icontest.cxx                   |    2 +-
 vcl/workben/svpclient.cxx                  |    4 ++--
 39 files changed, 92 insertions(+), 119 deletions(-)

New commits:
commit d4442ac1ac9aae36dbc08fda8154d71ea0f81708
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed May 30 13:02:25 2018 +0200

    drop Graphic::GetBitmap
    
    so that we flush out various code using Bitmap, in favour of using
    BitmapEx.
    This is part of the process of making Bitmap largely an internal detail
    of vcl
    
    Change-Id: Iaf2ead5e3d9960838723fb55b812b97108093d74
    Reviewed-on: https://gerrit.libreoffice.org/55062
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cppcanvas/source/mtfrenderer/emfpimage.cxx b/cppcanvas/source/mtfrenderer/emfpimage.cxx
index e3f1fc3d31a3..e249d5c1acca 100644
--- a/cppcanvas/source/mtfrenderer/emfpimage.cxx
+++ b/cppcanvas/source/mtfrenderer/emfpimage.cxx
@@ -59,7 +59,7 @@ namespace cppcanvas
                     GraphicFilter filter;
 
                     filter.ImportGraphic(graphic, OUString(), s);
-                    SAL_INFO("cppcanvas.emf", "EMF+\tbitmap width: " << graphic.GetBitmap().GetSizePixel().Width() << " height: " << graphic.GetBitmap().GetSizePixel().Height());
+                    SAL_INFO("cppcanvas.emf", "EMF+\tbitmap width: " << graphic.GetSizePixel().Width() << " height: " << graphic.GetSizePixel().Height());
                 }
 
             }
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index d05775e93a53..a4ab78bed8a6 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -436,7 +436,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 
         INetURLObject aURLObj( gallery + aPreviewFile );
         aFilter.ImportGraphic( aGraphic, aURLObj );
-        Bitmap aBmp = aGraphic.GetBitmap();
+        BitmapEx aBmp = aGraphic.GetBitmapEx();
         m_vDefaultPersonaImages[nIndex]->Show();
         m_vDefaultPersonaImages[nIndex++]->SetModeImage( Image( aBmp ) );
     }
@@ -531,7 +531,7 @@ IMPL_LINK_NOARG( SvxPersonalizationTabPage, SelectInstalledPersona, ListBox&, vo
     Graphic aGraphic;
     INetURLObject aURLObj( aPreviewFile );
     aFilter.ImportGraphic( aGraphic, aURLObj );
-    Bitmap aBmp = aGraphic.GetBitmap();
+    BitmapEx aBmp = aGraphic.GetBitmapEx();
     m_pExtensionPersonaPreview->SetModeImage( Image( aBmp ) );
 }
 
@@ -781,7 +781,7 @@ void SearchAndParseThread::execute()
             // for VCL to be able to create bitmaps / do visual changes in the thread
             SolarMutexGuard aGuard;
             aFilter.ImportGraphic( aGraphic, aURLObj );
-            Bitmap aBmp = aGraphic.GetBitmap();
+            BitmapEx aBmp = aGraphic.GetBitmapEx();
 
             if( !m_bExecute )
                 return;
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 8e7243a98220..6ad1cb6cc74a 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -685,7 +685,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
                 {
                     const Graphic* pGraphic = rOldItem.GetGraphic();
                     if (pGraphic)
-                        bModifyBrush = pGraphic->GetBitmap() != aBgdGraphic.GetBitmap();
+                        bModifyBrush = pGraphic->GetBitmapEx() != aBgdGraphic.GetBitmapEx();
                 }
                 if (bModifyBrush)
                 {
@@ -1100,7 +1100,7 @@ IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, Button*, pBox, void )
 
             if ( bIsGraphicValid )
             {
-                Bitmap aBmp = aBgdGraphic.GetBitmap();
+                Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
                 m_pPreviewWin2->NotifyChange( &aBmp );
             }
             else
@@ -1208,7 +1208,7 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Timer*, pIdle, void )
 
                 if ( m_pBtnPreview->IsChecked() && bIsGraphicValid )
                 {
-                    Bitmap aBmp = aBgdGraphic.GetBitmap();
+                    Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
                     m_pPreviewWin2->NotifyChange( &aBmp );
                 }
                 else
@@ -1415,7 +1415,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
 
         if ( m_pBtnPreview->IsChecked() && bIsGraphicValid )
         {
-            Bitmap aBmp = aBgdGraphic.GetBitmap();
+            Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
             m_pPreviewWin2->NotifyChange( &aBmp );
         }
         else
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 6b148013bb00..0d1b9c8af88c 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -236,8 +236,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet *rSet )
             aOrigSize = GetGrfOrigSize( *pGrf );
             if (pGrf->GetType() == GraphicType::Bitmap && aOrigSize.Width() && aOrigSize.Height())
             {
-                Bitmap aBitmap = pGrf->GetBitmap();
-                aOrigPixelSize = aBitmap.GetSizePixel();
+                aOrigPixelSize = pGrf->GetSizePixel();
             }
 
             if( aOrigSize.Width() && aOrigSize.Height() )
@@ -386,8 +385,7 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
             m_pExampleWN->SetGraphic( *pGrf );
             aOrigSize = GetGrfOrigSize( *pGrf );
             if (pGrf->GetType() == GraphicType::Bitmap && aOrigSize.Width() > 1 && aOrigSize.Height() > 1) {
-                Bitmap aBitmap = pGrf->GetBitmap();
-                aOrigPixelSize = aBitmap.GetSizePixel();
+                aOrigPixelSize = pGrf->GetSizePixel();
             }
             m_pExampleWN->SetFrameSize(aOrigSize);
             GraphicHasChanged( aOrigSize.Width() && aOrigSize.Height() );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 3c31e11d4a4b..439f1db1b656 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2007,7 +2007,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl, MenuButton *, void)
 
                 if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, i, &aGraphic))
                 {
-                    Bitmap aBitmap(aGraphic.GetBitmap());
+                    BitmapEx aBitmap(aGraphic.GetBitmapEx());
                     Size aSize(aBitmap.GetSizePixel());
                     if(aSize.Width() > MAX_BMP_WIDTH ||
                         aSize.Height() > MAX_BMP_HEIGHT)
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index c855a9c13437..9c2249310ffc 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -310,7 +310,7 @@ void SvxLineTabPage::InitSymbols(MenuButton const * pButton)
 
             if(pGraphic)
             {
-                Bitmap aBitmap(pGraphic->GetBitmap());
+                BitmapEx aBitmap(pGraphic->GetBitmapEx());
                 Size aSize(aBitmap.GetSizePixel());
                 if(aSize.Width()  > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT)
                 {
diff --git a/drawinglayer/source/tools/emfpimage.cxx b/drawinglayer/source/tools/emfpimage.cxx
index f5a5f6b2a44d..a2f6b2f12b69 100644
--- a/drawinglayer/source/tools/emfpimage.cxx
+++ b/drawinglayer/source/tools/emfpimage.cxx
@@ -38,7 +38,7 @@ namespace emfplushelper
                 // non native formats
                 GraphicFilter filter;
                 filter.ImportGraphic(graphic, OUString(), s);
-                SAL_INFO("drawinglayer", "EMF+\tbitmap width: " << graphic.GetBitmap().GetSizePixel().Width() << " height: " << graphic.GetBitmap().GetSizePixel().Height());
+                SAL_INFO("drawinglayer", "EMF+\tbitmap width: " << graphic.GetSizePixel().Width() << " height: " << graphic.GetSizePixel().Height());
             }
         }
         else if (ImageDataTypeMetafile == type)
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx
index 185a382b5ba3..643871e90608 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -656,7 +656,7 @@ bool FlashExporter::getMetaFile( Reference< XComponent > const &xComponent, GDIM
         GraphicFilter aFilter(false);
 
         aFilter.ImportGraphic( aGraphic, aFile.GetURL(), *aFile.GetStream( StreamMode::READ ) );
-        BitmapEx rBitmapEx( aGraphic.GetBitmap(), Color(255,255,255) );
+        BitmapEx rBitmapEx( aGraphic.GetBitmapEx().GetBitmap(), Color(255,255,255) );
 
         tools::Rectangle clipRect;
         for( size_t i = 0, nCount = rMtf.GetActionSize(); i < nCount; i++ )
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 0ed794a927da..46f5d78bee45 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -136,12 +136,7 @@ bool GIFWriter::WriteGIF(const Graphic& rGraphic, FilterConfigItem* pFilterConfi
     {
         const bool bGrafTrans = rGraphic.IsTransparent();
 
-        BitmapEx aBmpEx;
-
-        if( bGrafTrans )
-            aBmpEx = rGraphic.GetBitmapEx();
-        else
-            aBmpEx = BitmapEx( rGraphic.GetBitmap() );
+        BitmapEx aBmpEx = rGraphic.GetBitmapEx();
 
         nMinPercent = 0;
         nMaxPercent = 100;
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 3eba386bac82..09815fd2d043 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -382,11 +382,11 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
     }
     else
     {
-        Bitmap aBmp( rGraphic.GetBitmap() );
+        BitmapEx aBmp( rGraphic.GetBitmapEx() );
         pAMTF.reset( new GDIMetaFile );
         ScopedVclPtrInstance< VirtualDevice > pTmpVDev;
         pAMTF->Record( pTmpVDev );
-        pTmpVDev->DrawBitmap( Point(), aBmp );
+        pTmpVDev->DrawBitmapEx( Point(), aBmp );
         pAMTF->Stop();
         pAMTF->SetPrefSize( aBmp.GetSizePixel() );
         pMTF = pAMTF.get();
@@ -478,7 +478,7 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
     if ( pPreview && aSizePoint.Width() && aSizePoint.Height() )
     {
         Size aSizeBitmap( ( aSizePoint.Width() + 7 ) & ~7, aSizePoint.Height() );
-        Bitmap aTmpBitmap( pPreview->GetBitmap() );
+        Bitmap aTmpBitmap( pPreview->GetBitmapEx().GetBitmap() );
         aTmpBitmap.Scale( aSizeBitmap, BmpScaleFlag::BestQuality );
         aTmpBitmap.Convert( BmpConversion::N1BitThreshold );
         BitmapReadAccess* pAcc = aTmpBitmap.AcquireReadAccess();
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index cf398e481e78..e737b8ba8d82 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -130,19 +130,18 @@ static void MakeAsMeta(Graphic &rGraphic)
 {
     ScopedVclPtrInstance< VirtualDevice > pVDev;
     GDIMetaFile     aMtf;
-    Bitmap          aBmp( rGraphic.GetBitmap() );
-    Size            aSize = aBmp.GetPrefSize();
+    Size            aSize = rGraphic.GetPrefSize();
 
     if( !aSize.Width() || !aSize.Height() )
         aSize = Application::GetDefaultDevice()->PixelToLogic(
-            aBmp.GetSizePixel(), MapMode(MapUnit::Map100thMM));
+            rGraphic.GetSizePixel(), MapMode(MapUnit::Map100thMM));
     else
         aSize = OutputDevice::LogicToLogic( aSize,
-            aBmp.GetPrefMapMode(), MapMode(MapUnit::Map100thMM));
+            rGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM));
 
     pVDev->EnableOutput( false );
     aMtf.Record( pVDev );
-    pVDev->DrawBitmap( Point(), aSize, rGraphic.GetBitmap() );
+    pVDev->DrawBitmapEx( Point(), aSize, rGraphic.GetBitmapEx() );
     aMtf.Stop();
     aMtf.WindStart();
     aMtf.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 17b8273b908f..2e6843eb2d61 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1351,7 +1351,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co
                 {
                     if ( eMSO_FillType == mso_fillPattern )
                     {
-                        Bitmap aBmp( aGraf.GetBitmap() );
+                        Bitmap aBmp( aGraf.GetBitmapEx().GetBitmap() );
                         if( aBmp.GetSizePixel().Width() == 8 && aBmp.GetSizePixel().Height() == 8 && aBmp.GetColorCount() == 2)
                         {
                             Color aCol1( COL_WHITE ), aCol2( COL_WHITE );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 67dddd3a5fd1..b6e5b74a3293 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5685,7 +5685,7 @@ void PPTPortionObj::ApplyTo(  SfxItemSet& rSet, SdrPowerPointImport& rManager, T
                 Graphic aGraf;
                 if ( rManager.GetBLIP( rManager.GetPropertyValue( DFF_Prop_fillBlip, 0 ), aGraf ) )
                 {
-                    Bitmap aBmp( aGraf.GetBitmap() );
+                    Bitmap aBmp( aGraf.GetBitmapEx().GetBitmap() );
                     Size aSize( aBmp.GetSizePixel() );
                     if ( aSize.Width() && aSize.Height() )
                     {
diff --git a/include/vcl/dibtools.hxx b/include/vcl/dibtools.hxx
index 02c356b5cca8..65d6b26f2340 100644
--- a/include/vcl/dibtools.hxx
+++ b/include/vcl/dibtools.hxx
@@ -54,16 +54,17 @@ bool VCL_DLLPUBLIC ReadDIBV5(
     SvStream& rIStm);
 
 
-bool VCL_DLLPUBLIC WriteDIB( // WriteDIB(rBitmap, rOStm, false, true);
+bool VCL_DLLPUBLIC WriteDIB(
     const Bitmap& rSource,
     SvStream& rOStm,
     bool bCompressed,
     bool bFileHeader);
 
 // compressed, with file header
-bool VCL_DLLPUBLIC WriteDIB( // WriteDIB(rBitmap, rOStm, false, true);
+bool VCL_DLLPUBLIC WriteDIB(
     const BitmapEx& rSource,
-    SvStream& rOStm);
+    SvStream& rOStm,
+    bool bCompressed = true);
 
 bool VCL_DLLPUBLIC WriteDIBBitmapEx(
     const BitmapEx& rSource,
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 8406686c6e09..3eb7c79e7c1e 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -152,7 +152,6 @@ public:
     // allow giving parameters which control AntiAliasing and LineSnapping of the
     // MetaFile when played. Defaults will use a no-AAed, not snapped conversion as
     // before.
-    Bitmap          GetBitmap(const GraphicConversionParameters& rParameters = GraphicConversionParameters()) const;
     BitmapEx        GetBitmapEx(const GraphicConversionParameters& rParameters = GraphicConversionParameters()) const;
     /// Gives direct access to the contained BitmapEx.
     const BitmapEx& GetBitmapExRef() const;
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index df36ba79d252..4c3728691c98 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -401,7 +401,7 @@ XclExpImgData::XclExpImgData( const Graphic& rGraphic, sal_uInt16 nRecId ) :
 
 void XclExpImgData::Save( XclExpStream& rStrm )
 {
-    Bitmap aBmp = maGraphic.GetBitmap();
+    Bitmap aBmp = maGraphic.GetBitmapEx().GetBitmap();
     if( aBmp.GetBitCount() != 24 )
         aBmp.Convert( BmpConversion::N24Bit );
 
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 95b46a89bb69..bd14bce7f6fe 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -623,7 +623,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, SelectHdl, weld::TreeView&, void)
             m_pGraphicFilter->ImportGraphic( aGraphic, aURLObj, nFilter, nullptr, nFilterImportFlags );
         }
 
-        Bitmap aBmp = aGraphic.GetBitmap();
+        BitmapEx aBmp = aGraphic.GetBitmapEx();
         sal_Int32 nBmpWidth  = aBmp.GetSizePixel().Width();
         sal_Int32 nBmpHeight = aBmp.GetSizePixel().Height();
 
diff --git a/sd/source/ui/func/fuvect.cxx b/sd/source/ui/func/fuvect.cxx
index 7d51a805be5e..03fd915077b9 100644
--- a/sd/source/ui/func/fuvect.cxx
+++ b/sd/source/ui/func/fuvect.cxx
@@ -62,7 +62,9 @@ void FuVectorize::DoExecute( SfxRequest& )
         if( pObj && dynamic_cast< const SdrGrafObj *>( pObj ) !=  nullptr )
         {
             SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-            ScopedVclPtr<AbstractSdVectorizeDlg> pDlg(pFact ? pFact->CreateSdVectorizeDlg(mpWindow ? mpWindow->GetFrameWeld() : nullptr, static_cast<SdrGrafObj*>( pObj )->GetGraphic().GetBitmap(), mpDocSh ) : nullptr);
+            ScopedVclPtr<AbstractSdVectorizeDlg> pDlg(
+                    pFact->CreateSdVectorizeDlg(mpWindow ? mpWindow->GetFrameWeld() : nullptr,
+                        static_cast<SdrGrafObj*>( pObj )->GetGraphic().GetBitmapEx().GetBitmap(), mpDocSh ) );
             if( pDlg && pDlg->Execute() == RET_OK )
             {
                 const GDIMetaFile&  rMtf = pDlg->GetGDIMetaFile();
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 5e4055195eb5..5d20a0f5b0c8 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -690,7 +690,7 @@ IMPL_LINK_NOARG(FileDialogHelper_Impl, TimeOutHdl_Impl, Timer *, void)
             // is responsible for placing it at its
             // proper position and painting a frame
 
-            Bitmap aBmp = maGraphic.GetBitmap();
+            BitmapEx aBmp = maGraphic.GetBitmapEx();
             if ( !aBmp.IsEmpty() )
             {
                 // scale the bitmap to the correct size
@@ -713,7 +713,7 @@ IMPL_LINK_NOARG(FileDialogHelper_Impl, TimeOutHdl_Impl, Timer *, void)
                 // and copy it into the Any
                 SvMemoryStream aData;
 
-                WriteDIB(aBmp, aData, false, true);
+                WriteDIB(aBmp, aData, false);
 
                 const Sequence < sal_Int8 > aBuffer(
                     static_cast< const sal_Int8* >(aData.GetData()),
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 8f2dc48e1803..c58bad20cf80 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -517,14 +517,14 @@ void ExportDialog::GetGraphicStream()
     }
 }
 
-Bitmap ExportDialog::GetGraphicBitmap( SvStream& rInputStream )
+BitmapEx ExportDialog::GetGraphicBitmap( SvStream& rInputStream )
 {
-    Bitmap aRet;
+    BitmapEx aRet;
     Graphic aGraphic;
     GraphicFilter aFilter( false );
     if ( aFilter.ImportGraphic( aGraphic, "", rInputStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast<css::uno::Sequence< css::beans::PropertyValue >*>(nullptr) ) == ERRCODE_NONE )
     {
-        aRet = aGraphic.GetBitmap();
+        aRet = aGraphic.GetBitmapEx();
     }
     return aRet;
 }
diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx
index d2aa54f1fb80..7d66df5a2c29 100644
--- a/svtools/source/filter/exportdialog.hxx
+++ b/svtools/source/filter/exportdialog.hxx
@@ -119,7 +119,7 @@ private:
     sal_Int32           mnMaxFilesizeForRealtimePreview;
 
     std::unique_ptr<SvMemoryStream> mpTempStream;
-    Bitmap              maBitmap;
+    BitmapEx            maBitmap;
 
     css::awt::Size      maOriginalSize;     // the original graphic size in 1/100mm
     css::awt::Size      maSize;             // for vector graphics it always contains the logical size in 1/100mm
@@ -158,7 +158,7 @@ private:
 
                         void GetGraphicSource();
                         void GetGraphicStream();
-                        static Bitmap GetGraphicBitmap( SvStream& rStream );
+                        static BitmapEx GetGraphicBitmap( SvStream& rStream );
                         css::uno::Sequence< css::beans::PropertyValue >
                             GetFilterData( bool bUpdateConfig );
 
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 0256b719e9a4..a6522e6cb100 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -828,7 +828,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
                 case MetaActionType::BMP:
                 {
                     MetaBmpAction*  pAct = static_cast<MetaBmpAction*>(pAction);
-                    const Bitmap    aBmp( Mask( pAct->GetBitmap() ).GetBitmap() );
+                    const Bitmap    aBmp( Mask( pAct->GetBitmap() ).GetBitmapEx().GetBitmap() );
 
                     pAct = new MetaBmpAction( pAct->GetPoint(), aBmp );
                     aMtf.AddAction( pAct );
@@ -838,7 +838,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
                 case MetaActionType::BMPSCALE:
                 {
                     MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
-                    const Bitmap        aBmp( Mask( pAct->GetBitmap() ).GetBitmap() );
+                    const Bitmap        aBmp( Mask( pAct->GetBitmap() ).GetBitmapEx().GetBitmap() );
 
                     pAct = new MetaBmpScaleAction( pAct->GetPoint(), pAct->GetSize(), aBmp );
                     aMtf.AddAction( pAct );
@@ -848,7 +848,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
                 case MetaActionType::BMPSCALEPART:
                 {
                     MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
-                    const Bitmap            aBmp( Mask( pAct->GetBitmap() ).GetBitmap() );
+                    const Bitmap            aBmp( Mask( pAct->GetBitmap() ).GetBitmapEx().GetBitmap() );
 
                     pAct = new MetaBmpScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
                                                        pAct->GetSrcPoint(), pAct->GetSrcSize(), aBmp );
@@ -1025,7 +1025,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
                         }
 
                         // now replace it again with the normal colors
-                        Bitmap  aBitmap( ImpMask( aGraphic.GetBitmap() ) );
+                        Bitmap  aBitmap( ImpMask( aGraphic.GetBitmapEx().GetBitmap() ) );
                         Size    aSize( aBitmap.GetSizePixel() );
 
                         if ( aSize.Width() && aSize.Height() )
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index a8a9d47708f1..aa5e1577aa04 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -140,7 +140,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
             aBmp = rGraphic.GetBitmapEx().GetMask();
         else
         {
-            aBmp = rGraphic.GetBitmap();
+            aBmp = rGraphic.GetBitmapEx().GetBitmap();
             nContourFlags |= XOutFlags::ContourEdgeDetect;
         }
     }
@@ -689,7 +689,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
 
         if( aGraphic.GetType() == GraphicType::Bitmap )
         {
-            Bitmap      aBmp( aGraphic.GetBitmap() );
+            Bitmap      aBmp( aGraphic.GetBitmapEx().GetBitmap() );
             const long  nTol = static_cast<long>(m_pMtfTolerance->GetValue() * 255L / 100L);
 
             aMask = aBmp.CreateMask( rColor, nTol );
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index a9fcb50a9673..f558a95880bd 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -670,7 +670,7 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m
                             const Graphic* pGrf2 = pBrsh2->GetGraphic();
                             if (pGrf1==pGrf2) bIsMatch = true;
                             if (pGrf1 && pGrf2) {
-                                if ( pGrf1->GetBitmap() == pGrf2->GetBitmap() &&
+                                if ( pGrf1->GetBitmapEx() == pGrf2->GetBitmapEx() &&
                                      _pSet->aSize == aFmt.GetGraphicSize())
                                     bIsMatch = true;
                             }
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 2f7d8085c084..52b7eb7db319 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -247,7 +247,7 @@ namespace {
                 aDrawinglayerOpt.IsSnapHorVerLinesToDiscrete());
             const Graphic aGraphic(rMtf);
 
-            aBmpEx = BitmapEx(aGraphic.GetBitmap(aParameters));
+            aBmpEx = aGraphic.GetBitmapEx(aParameters);
             aBmpEx.SetPrefMapMode( rMtf.GetPrefMapMode() );
             aBmpEx.SetPrefSize( rMtf.GetPrefSize() );
         }
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 4b943e817767..55128d08f7d8 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -96,20 +96,9 @@ Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const BmpMirrorFlags
         }
         else
         {
-            if( rGraphic.IsTransparent() )
-            {
-                BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
-
-                aBmpEx.Mirror( nMirrorFlags );
-                aRetGraphic = aBmpEx;
-            }
-            else
-            {
-                Bitmap aBmp( rGraphic.GetBitmap() );
-
-                aBmp.Mirror( nMirrorFlags );
-                aRetGraphic = aBmp;
-            }
+            BitmapEx aBmp( rGraphic.GetBitmapEx() );
+            aBmp.Mirror( nMirrorFlags );
+            aRetGraphic = aBmp;
         }
     }
     else
@@ -322,10 +311,10 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
                             aGraphic = pVDev->GetBitmap( Point(), aSize );
                         }
                         else
-                            aGraphic = rGraphic.GetBitmap();
+                            aGraphic = rGraphic.GetBitmapEx();
                     }
                     else
-                        aGraphic = rGraphic.GetBitmap();
+                        aGraphic = rGraphic.GetBitmapEx();
                 }
 
                 // mirror?
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 5a11a088b9ba..d66208ccfdc5 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -989,7 +989,10 @@ inline void assertBorderEqual(
 
 inline std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
 {
-    rStrm << "Color: R:" << static_cast<int>(rColor.GetRed()) << " G:" << static_cast<int>(rColor.GetGreen()) << " B: " << static_cast<int>(rColor.GetBlue());
+    rStrm << "Color: R:" << static_cast<int>(rColor.GetRed())
+          << " G:" << static_cast<int>(rColor.GetGreen())
+          << " B:" << static_cast<int>(rColor.GetBlue())
+          << " A:" << static_cast<int>(rColor.GetTransparency());
     return rStrm;
 }
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index fcfea4083551..a4272feb459c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -359,14 +359,12 @@ DECLARE_OOXMLEXPORT_TEST(testPictureWithSchemeColor, "picture-with-schemecolor.d
     uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY);
     uno::Reference<graphic::XGraphic> xGraphic = getProperty<uno::Reference<graphic::XGraphic> >(xImage, "Graphic");
     Graphic aVclGraphic(xGraphic);
-    Bitmap aBitmap(aVclGraphic.GetBitmap());
-    Bitmap::ScopedReadAccess pAccess(aBitmap);
-    CPPUNIT_ASSERT(pAccess);
-    CPPUNIT_ASSERT_EQUAL(341L, pAccess->Width());
-    CPPUNIT_ASSERT_EQUAL(181L, pAccess->Height());
-    Color aColor(pAccess->GetPixel(30, 120).GetColor());
+    BitmapEx aBitmap(aVclGraphic.GetBitmapEx());
+    CPPUNIT_ASSERT_EQUAL(341L, aBitmap.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(181L, aBitmap.GetSizePixel().Height());
+    Color aColor(aBitmap.GetPixelColor(120, 30));
     CPPUNIT_ASSERT_EQUAL(aColor, Color( 0xb1, 0xc8, 0xdd ));
-    aColor = pAccess->GetPixel(130, 260).GetColor();
+    aColor = aBitmap.GetPixelColor(260, 130);
     CPPUNIT_ASSERT_EQUAL(aColor, Color( 0xb1, 0xc8, 0xdd ));
 }
 
@@ -537,13 +535,11 @@ DECLARE_OOXMLEXPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.docx"
     imageProperties->getPropertyValue( "Graphic" ) >>= graphic;
     uno::Reference<awt::XBitmap> bitmap(graphic, uno::UNO_QUERY);
     Graphic aVclGraphic(graphic);
-    Bitmap aBitmap(aVclGraphic.GetBitmap());
-    Bitmap::ScopedReadAccess pAccess(aBitmap);
-    CPPUNIT_ASSERT(pAccess);
-    CPPUNIT_ASSERT_EQUAL(58L, pAccess->Width());
-    CPPUNIT_ASSERT_EQUAL(320L, pAccess->Height());
-    Color aColor(pAccess->GetPixel(30, 20).GetColor());
-    CPPUNIT_ASSERT_EQUAL(aColor, Color( 0xce, 0xce, 0xce ));
+    BitmapEx aBitmap(aVclGraphic.GetBitmapEx());
+    CPPUNIT_ASSERT_EQUAL(58L, aBitmap.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL(320L, aBitmap.GetSizePixel().Height());
+    Color aColor(aBitmap.GetPixelColor(20, 30));
+    CPPUNIT_ASSERT_EQUAL(Color( 255, 0xce, 0xce, 0xce ), aColor);
 }
 
 DECLARE_OOXMLEXPORT_TEST(testChartSize, "chart-size.docx")
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 85e1638aafed..5c7a9f474780 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -797,7 +797,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
         SwDoc *const pDoc = lcl_GetDoc(*m_pClpDocFac);
         m_pWrtShell->Copy( pDoc );
 
-        if (m_pOrigGraphic && !m_pOrigGraphic->GetBitmap().IsEmpty())
+        if (m_pOrigGraphic && !m_pOrigGraphic->GetBitmapEx().IsEmpty())
           AddFormat( SotClipboardFormatId::SVXB );
 
         PrepareOLE( m_aObjDesc );
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 6e37dd6d3ff1..9f5d6caeb0eb 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -825,7 +825,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
             // Resolution is set
             if( nMode == 1 )
             {
-                Bitmap      aBitmap( rGraphic.GetBitmap() );
+                BitmapEx    aBitmap( rGraphic.GetBitmapEx() );
                 MapMode     aMap( MapUnit::Map100thInch );
 
                 sal_Int32   nDPI = rConfigItem.ReadInt32( "Resolution", 75 );
@@ -2213,16 +2213,16 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
         {
             if( aFilterName.equalsIgnoreAsciiCase( EXP_BMP ) )
             {
-                Bitmap aBmp( aGraphic.GetBitmap() );
+                BitmapEx aBmp( aGraphic.GetBitmapEx() );
                 BmpConversion nColorRes = static_cast<BmpConversion>(aConfigItem.ReadInt32( "Colors", 0 ));
                 if ( nColorRes != BmpConversion::NNONE && ( nColorRes <= BmpConversion::N24Bit) )
                 {
                     if( !aBmp.Convert( nColorRes ) )
-                        aBmp = aGraphic.GetBitmap();
+                        aBmp = aGraphic.GetBitmapEx();
                 }
                 bool    bRleCoding = aConfigItem.ReadBool( "RLE_Coding", true );
                 // save RLE encoded?
-                WriteDIB(aBmp, rOStm, bRleCoding, true);
+                WriteDIB(aBmp, rOStm, bRleCoding);
 
                 if( rOStm.GetError() )
                     nStatus = ERRCODE_GRFILTER_IOERROR;
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index f6787145eabf..c5916a7a992d 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -190,12 +190,12 @@ bool JPEGWriter::Write( const Graphic& rGraphic )
         mxStatusIndicator->start( OUString(), 100 );
     }
 
-    Bitmap aGraphicBmp( rGraphic.GetBitmap() );
+    Bitmap aGraphicBmp( rGraphic.GetBitmapEx().GetBitmap() );
 
     if ( mbGreys )
     {
         if ( !aGraphicBmp.Convert( BmpConversion::N8BitGreys ) )
-            aGraphicBmp = rGraphic.GetBitmap();
+            aGraphicBmp = rGraphic.GetBitmapEx().GetBitmap();
     }
 
     mpReadAccess = Bitmap::ScopedReadAccess(aGraphicBmp);
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index de8615226492..d0a0a53b2e87 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -1830,9 +1830,10 @@ bool WriteDIB(
 
 bool WriteDIB(
     const BitmapEx& rSource,
-    SvStream& rOStm)
+    SvStream& rOStm,
+    bool bCompressed)
 {
-    return ImplWriteDIB(rSource.GetBitmapRef(), rOStm, /*bCompressed*/true, /*bFileHeader*/true);
+    return ImplWriteDIB(rSource.GetBitmapRef(), rOStm, bCompressed, /*bFileHeader*/true);
 }
 
 bool WriteDIBBitmapEx(
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 2533a75e47c4..19bb99d254e4 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -348,11 +348,6 @@ bool Graphic::IsEPS() const
     return mxImpGraphic->ImplIsEPS();
 }
 
-Bitmap Graphic::GetBitmap(const GraphicConversionParameters& rParameters) const
-{
-    return mxImpGraphic->ImplGetBitmap(rParameters);
-}
-
 BitmapEx Graphic::GetBitmapEx(const GraphicConversionParameters& rParameters) const
 {
     return mxImpGraphic->ImplGetBitmapEx(rParameters);
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index d36ab2844f17..aa9ee14466c1 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -481,7 +481,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc
                                 }
                             }
 
-                            rWriter.DrawJPGBitmap( aTmp, aGraphic.GetBitmap().GetBitCount() > 8, aGraphic.GetSizePixel(), aOutputRect, aMask, aGraphic );
+                            rWriter.DrawJPGBitmap( aTmp, aGraphic.GetBitmapEx().GetBitCount() > 8, aGraphic.GetSizePixel(), aOutputRect, aMask, aGraphic );
                         }
 
                         if ( bClippingNeeded )
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index f5b7efe16570..b72078caa819 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -9750,7 +9750,7 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject
         rEmit.m_aPDFData = rGraphic.getPdfData();
 
     rEmit.m_nFormObject = createObject();
-    rEmit.m_aPixelSize = rGraphic.GetBitmap().GetPrefSize();
+    rEmit.m_aPixelSize = rGraphic.GetPrefSize();
 }
 
 void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const tools::Rectangle& rTargetArea, const Bitmap& rMask, const Graphic& rGraphic )
@@ -9773,14 +9773,14 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
         // load stream to bitmap and draw the bitmap instead
         Graphic aGraphic;
         GraphicConverter::Import( rDCTData, aGraphic, ConvertDataFormat::JPG );
-        Bitmap aBmp( aGraphic.GetBitmap() );
-        if( !!rMask && rMask.GetSizePixel() == aBmp.GetSizePixel() )
+        if( !!rMask && rMask.GetSizePixel() == aGraphic.GetSizePixel() )
         {
+            Bitmap aBmp( aGraphic.GetBitmapEx().GetBitmap() );
             BitmapEx aBmpEx( aBmp, rMask );
             drawBitmap( rTargetArea.TopLeft(), rTargetArea.GetSize(), aBmpEx );
         }
         else
-            drawBitmap( rTargetArea.TopLeft(), rTargetArea.GetSize(), BitmapEx(aBmp) );
+            drawBitmap( rTargetArea.TopLeft(), rTargetArea.GetSize(), aGraphic.GetBitmapEx() );
         return;
     }
 
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index a9773ffbd682..8e6db507764d 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -1962,12 +1962,12 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile const & r
             case MetaActionType::BMPEX:
             {
                 const MetaBmpExAction* pAct = static_cast<const MetaBmpExAction*>(pAction);
-                const Bitmap           aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
+                const BitmapEx         aBmp( pAct->GetBitmapEx() );
 
                 rOStm.WriteInt16( GDI_BITMAP_ACTION );
                 rOStm.WriteInt32( 12 );
                 WritePair( rOStm, pAct->GetPoint() );
-                WriteDIB(aBmp, rOStm, false, true);
+                WriteDIB(aBmp, rOStm, false);
                 nCount++;
             }
             break;
@@ -1975,13 +1975,13 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile const & r
             case MetaActionType::BMPEXSCALE:
             {
                 const MetaBmpExScaleAction* pAct = static_cast<const MetaBmpExScaleAction*>(pAction);
-                const Bitmap                aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
+                const BitmapEx         aBmp( pAct->GetBitmapEx() );
 
                 rOStm.WriteInt16( GDI_BITMAPSCALE_ACTION );
                 rOStm.WriteInt32( 20 );
                 WritePair( rOStm, pAct->GetPoint() );
                 WritePair( rOStm, pAct->GetSize() );
-                WriteDIB(aBmp, rOStm, false, true);
+                WriteDIB(aBmp, rOStm, false);
                 nCount++;
             }
             break;
@@ -1989,7 +1989,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile const & r
             case MetaActionType::BMPEXSCALEPART:
             {
                 const MetaBmpExScalePartAction* pAct = static_cast<const MetaBmpExScalePartAction*>(pAction);
-                const Bitmap                    aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
+                const BitmapEx                  aBmp( pAct->GetBitmapEx() );
 
                 rOStm.WriteInt16( GDI_BITMAPSCALEPART_ACTION );
                 rOStm.WriteInt32( 36 );
@@ -1997,7 +1997,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile const & r
                 WritePair( rOStm, pAct->GetDestSize() );
                 WritePair( rOStm, pAct->GetSrcPoint() );
                 WritePair( rOStm, pAct->GetSrcSize() );
-                WriteDIB(aBmp, rOStm, false, true);
+                WriteDIB(aBmp, rOStm, false);
                 nCount++;
             }
             break;
diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx
index 3576213fd9b2..4ecb6eedb2db 100644
--- a/vcl/source/graphic/UnoGraphicProvider.cxx
+++ b/vcl/source/graphic/UnoGraphicProvider.cxx
@@ -681,12 +681,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal
                         ImplApplyBitmapResolution( aGraphic, nImageResolution,
                             aGraphic.GetSizePixel(), awt::Size( aSize100thmm2.Width(), aSize100thmm2.Height() ) );
 
-                        rtl::Reference<MetaAction> pNewAction;
-                        if ( pAction->GetType() == MetaActionType::BMPSCALE )
-                            pNewAction = new MetaBmpScaleAction ( aPos, aSize, aGraphic.GetBitmap() );
-                        else
-                            pNewAction = new MetaBmpExScaleAction( aPos, aSize, aGraphic.GetBitmapEx() );
-
+                        rtl::Reference<MetaAction> pNewAction = new MetaBmpExScaleAction( aPos, aSize, aGraphic.GetBitmapEx() );
                         aMtf.ReplaceAction( pNewAction, i );
                         break;
                     }
diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx
index eac9f8c8d59e..35ea9510d442 100644
--- a/vcl/workben/icontest.cxx
+++ b/vcl/workben/icontest.cxx
@@ -115,7 +115,7 @@ void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan
     BitmapEx aEmpty;
     mpFixedBitmap->SetBitmap( aEmpty );
     GraphicConversionParameters aConv( aSize );
-    mpBitmap = new BitmapEx( maGraphic.GetBitmap( aConv ) );
+    mpBitmap = new BitmapEx(maGraphic.GetBitmapEx( aConv ));
     mpFixedBitmap->SetBitmap( *mpBitmap );
     mpFixedBitmap->SetSizePixel( aSize );
 
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 8763ab398636..c84919cb59aa 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -266,14 +266,14 @@ IMPL_LINK_NOARG( MyWin, SelectHdl, ListBox&, void)
     GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
     rFilter.ImportGraphic( aGraphicResult, OUString("import"), aStream );
 
-    Bitmap aBitmap = aGraphicResult.GetBitmap();
+    BitmapEx aBitmap = aGraphicResult.GetBitmapEx();
 
     SAL_INFO("vcl", "got bitmap of size " << aBitmap.GetSizePixel().Width() << "x" << aBitmap.GetSizePixel().Height());
     Size aFixedSize( aBitmap.GetSizePixel() );
     aFixedSize.AdjustWidth(10 );
     aFixedSize.AdjustHeight(10 );
     m_aImage->SetSizePixel( aFixedSize );
-    m_aImage->SetImage( Image( BitmapEx( aBitmap ) ) );
+    m_aImage->SetImage( Image( aBitmap ) );
 
 }
 


More information about the Libreoffice-commits mailing list