[Libreoffice-commits] core.git: sd/source

Noel Grandin noel.grandin at collabora.co.uk
Mon Jun 4 19:34:16 UTC 2018


 sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx |    6 +++---
 sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx |    2 +-
 sd/source/ui/slidesorter/view/SlsFramePainter.cxx   |    8 +-------
 3 files changed, 5 insertions(+), 11 deletions(-)

New commits:
commit c3f13f0c48d3dadce89410db497e211f4ad9aedf
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Jun 4 14:58:21 2018 +0200

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

diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
index 377b0932438c..7dc010050a22 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
@@ -46,7 +46,7 @@ BitmapFactory::~BitmapFactory()
 {
 }
 
-Bitmap BitmapFactory::CreateBitmap (
+BitmapEx BitmapFactory::CreateBitmap (
     const SdPage& rPage,
     const Size& rPixelSize,
     const bool bDoSuperSampling)
@@ -60,11 +60,11 @@ Bitmap BitmapFactory::CreateBitmap (
         aSize.setHeight( aSize.Height() * aSuperSamplingFactor );
     }
 
-    Bitmap aPreview (maRenderer.RenderPage (
+    BitmapEx aPreview (maRenderer.RenderPage (
         &rPage,
         aSize,
         true,
-        false).GetBitmapEx().GetBitmap());
+        false).GetBitmapEx());
     if (bDoSuperSampling)
     {
         aPreview.Scale(rPixelSize, BmpScaleFlag::BestQuality);
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
index 034ff6e4d018..8bac5da618ef 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
@@ -37,7 +37,7 @@ public:
     BitmapFactory();
     ~BitmapFactory();
 
-    Bitmap CreateBitmap (
+    BitmapEx CreateBitmap (
         const SdPage& rPage,
         const Size& rPixelSize,
         const bool bDoSuperSampling);
diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
index 07027c1d1e18..ad5e891bb970 100644
--- a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
@@ -78,13 +78,7 @@ void FramePainter::AdaptColor (
     // Get the source color.
     if (maCenter.maBitmap.IsEmpty())
         return;
-    Bitmap aBitmap = maCenter.maBitmap.GetBitmap();
-    Bitmap::ScopedReadAccess pReadAccess(aBitmap);
-    if (!pReadAccess)
-        return;
-    const BitmapColor aBmpSourceColor = pReadAccess->GetColor(0,0);
-    const Color aSourceColor = aBmpSourceColor.GetColor();
-    pReadAccess.reset();
+    const Color aSourceColor = maCenter.maBitmap.GetPixelColor(0,0);
 
     // Erase the center bitmap.
     maCenter.maBitmap.SetEmpty();


More information about the Libreoffice-commits mailing list