summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2018-01-21 04:48:50 +1100
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-06-16 15:55:34 -0400
commitda91ffc94ac6772e593e13257896fec52e311eb9 (patch)
tree518c11ec82012ef5bbe7fc7420005d98c2c5e1eb /sd/source/ui/slidesorter/view/SlsFramePainter.cxx
parentdcae336143f25a2fb98d4c4adee6df4e5cef4053 (diff)
vcl: remove BitmapColor Color() operator
BitmapColor has a Color() operator. However, this is confusing and tends to hide that the two classes aren't the same. I have converted this to GetColor(). Disable some tests that are failing to build due to missing << operator. Reviewed-on: https://gerrit.libreoffice.org/48245 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 01e470f0ab49e458c57b0f28636a517b2bfb1b4a) Change-Id: I0be2dcb3fc420e7be9c8d04330e7a3fe69a5412a
Diffstat (limited to 'sd/source/ui/slidesorter/view/SlsFramePainter.cxx')
-rw-r--r--sd/source/ui/slidesorter/view/SlsFramePainter.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
index bb297c922a05..1c6acece40d9 100644
--- a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
@@ -78,11 +78,13 @@ void FramePainter::AdaptColor (
// Get the source color.
if (maCenter.maBitmap.IsEmpty())
return;
- BitmapReadAccess* pReadAccess = maCenter.maBitmap.GetBitmap().AcquireReadAccess();
- if (pReadAccess == nullptr)
+ Bitmap aBitmap = maCenter.maBitmap.GetBitmap();
+ Bitmap::ScopedReadAccess pReadAccess(aBitmap);
+ if (!pReadAccess)
return;
- const Color aSourceColor = pReadAccess->GetColor(0,0);
- Bitmap::ReleaseAccess(pReadAccess);
+ const BitmapColor aBmpSourceColor = pReadAccess->GetColor(0,0);
+ const Color aSourceColor = aBmpSourceColor.GetColor();
+ pReadAccess.reset();
// Erase the center bitmap.
maCenter.maBitmap.SetEmpty();