summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-04 14:58:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-04 21:33:55 +0200
commitc3f13f0c48d3dadce89410db497e211f4ad9aedf (patch)
treec82a23114723af458a3bebf36cc1447eadef9085 /sd
parent874f2d8486e210aacec09d133013aa323084ea31 (diff)
Bitmap->BitmapEx in BitmapFactory
Change-Id: I7f88333a74f7c523030ab55b896c316b3aa73cce Reviewed-on: https://gerrit.libreoffice.org/55282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx6
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsFramePainter.cxx8
3 files changed, 5 insertions, 11 deletions
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();