[Libreoffice-commits] core.git: fpicker/source include/vcl vcl/source vcl/workben

Noel Grandin noel.grandin at collabora.co.uk
Wed May 30 06:40:28 UTC 2018


 fpicker/source/office/iodlg.cxx |    6 +++---
 include/vcl/fixed.hxx           |    6 +++---
 vcl/source/control/fixed.cxx    |   12 +++++-------
 vcl/workben/icontest.cxx        |    6 +++---
 4 files changed, 14 insertions(+), 16 deletions(-)

New commits:
commit 86555baa2b0e7af2e1ac9f2af40781de91708375
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue May 29 21:09:54 2018 +0200

    Bitmap->BitmapEx in FixedBitmap
    
    Change-Id: I0e409beb0d046d927b6a0c1987abec42df76727d
    Reviewed-on: https://gerrit.libreoffice.org/55032
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 880e27834a82..6ccb634bf73f 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2611,17 +2611,17 @@ void SvtFileDialog::setImage( sal_Int16 /*aImageFormat*/, const Any& rImage )
 
     if ( rImage >>= aBmpSequence )
     {
-        Bitmap          aBmp;
+        BitmapEx        aBmp;
         SvMemoryStream  aData( aBmpSequence.getArray(),
                                aBmpSequence.getLength(),
                                StreamMode::READ );
-        ReadDIB(aBmp, aData, true);
+        ReadDIBBitmapEx(aBmp, aData);
 
         _pPrevBmp->SetBitmap( aBmp );
     }
     else
     {
-        Bitmap aEmpty;
+        BitmapEx aEmpty;
         _pPrevBmp->SetBitmap( aEmpty );
     }
 }
diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx
index 49fdef75ddef..d1c361567bcf 100644
--- a/include/vcl/fixed.hxx
+++ b/include/vcl/fixed.hxx
@@ -22,7 +22,7 @@
 
 #include <tools/solar.h>
 #include <vcl/dllapi.h>
-#include <vcl/bitmap.hxx>
+#include <vcl/bitmapex.hxx>
 #include <vcl/ctrl.hxx>
 #include <vcl/edit.hxx>
 #include <vcl/image.hxx>
@@ -121,7 +121,7 @@ public:
 class VCL_DLLPUBLIC FixedBitmap : public Control
 {
 private:
-    Bitmap          maBitmap;
+    BitmapEx        maBitmap;
 
     using Control::ImplInitSettings;
     using Window::ImplInit;
@@ -140,7 +140,7 @@ public:
     virtual void    StateChanged( StateChangedType nType ) override;
     virtual void    DataChanged( const DataChangedEvent& rDCEvt ) override;
 
-    void            SetBitmap( const Bitmap& rBitmap );
+    void            SetBitmap( const BitmapEx& rBitmap );
     using OutputDevice::GetBitmap;
 };
 
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index dac10a896278..2cf897c2fd82 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -692,17 +692,15 @@ FixedBitmap::FixedBitmap( vcl::Window* pParent, WinBits nStyle ) :
 
 void FixedBitmap::ImplDraw( OutputDevice* pDev, const Point& rPos, const Size& rSize )
 {
-    Bitmap* pBitmap = &maBitmap;
-
     // do we have a Bitmap?
-    if ( !(!(*pBitmap)) )
+    if ( !!maBitmap )
     {
         if ( GetStyle() & WB_SCALE )
-            pDev->DrawBitmap( rPos, rSize, *pBitmap );
+            pDev->DrawBitmapEx( rPos, rSize, maBitmap );
         else
         {
-            Point aPos = ImplCalcPos( GetStyle(), rPos, pBitmap->GetSizePixel(), rSize );
-            pDev->DrawBitmap( aPos, *pBitmap );
+            Point aPos = ImplCalcPos( GetStyle(), rPos, maBitmap.GetSizePixel(), rSize );
+            pDev->DrawBitmapEx( aPos, maBitmap );
         }
     }
 }
@@ -799,7 +797,7 @@ void FixedBitmap::DataChanged( const DataChangedEvent& rDCEvt )
     }
 }
 
-void FixedBitmap::SetBitmap( const Bitmap& rBitmap )
+void FixedBitmap::SetBitmap( const BitmapEx& rBitmap )
 {
     maBitmap = rBitmap;
     CompatStateChanged( StateChangedType::Data );
diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx
index 0806ddcaf98c..eac9f8c8d59e 100644
--- a/vcl/workben/icontest.cxx
+++ b/vcl/workben/icontest.cxx
@@ -65,7 +65,7 @@ class MyWorkWindow : public WorkWindow
 
 public:
     Graphic maGraphic;
-    Bitmap *mpBitmap;
+    BitmapEx *mpBitmap;
     VclPtr<FixedBitmap> mpFixedBitmap;
 
     MyWorkWindow( vcl::Window* pParent, WinBits nWinStyle );
@@ -112,10 +112,10 @@ void MyWorkWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan
     aSize.setWidth( aSize.Width() * (1 + (0.1*sin(mnPaintCount/60.))) );
     aSize.setHeight( aSize.Height() * (1 + (0.1*sin(mnPaintCount/50.))) );
 
-    Bitmap aEmpty;
+    BitmapEx aEmpty;
     mpFixedBitmap->SetBitmap( aEmpty );
     GraphicConversionParameters aConv( aSize );
-    mpBitmap = new Bitmap( maGraphic.GetBitmap( aConv ) );
+    mpBitmap = new BitmapEx( maGraphic.GetBitmap( aConv ) );
     mpFixedBitmap->SetBitmap( *mpBitmap );
     mpFixedBitmap->SetSizePixel( aSize );
 


More information about the Libreoffice-commits mailing list