summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-10-31 11:50:19 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-10-31 13:35:43 +0100
commit5f909fb33210f98905d5ef37d9176fecf4ba5c29 (patch)
tree736556cef9415bf2c8a75dd4a0678ae265ee759d /vcl
parent118aa4b843eff3d48ff877f2e3b63de554c70ea4 (diff)
do not mix bitmap read and write access
Change-Id: Ic479c467f2dcb85c5c786e90a0dcaf48b7d39505 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124508 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/drawmode.cxx3
-rw-r--r--vcl/qa/cppunit/outdev.cxx8
2 files changed, 3 insertions, 8 deletions
diff --git a/vcl/qa/cppunit/drawmode.cxx b/vcl/qa/cppunit/drawmode.cxx
index a9079af29227..f2b59dc8440c 100644
--- a/vcl/qa/cppunit/drawmode.cxx
+++ b/vcl/qa/cppunit/drawmode.cxx
@@ -333,8 +333,7 @@ void VclDrawModeTest::testDrawModeBitmapEx()
const StyleSettings aStyleSettings;
Bitmap aBmp(Size(1, 1), vcl::PixelFormat::N24_BPP);
- BitmapWriteAccess aBmpAccess(aBmp);
- aBmpAccess.SetPixel(0, 0, BitmapColor(COL_RED));
+ BitmapWriteAccess(aBmp).SetPixel(0, 0, BitmapColor(COL_RED));
BitmapEx aBmpEx(aBmp);
diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index 5e05a5acd48b..469a24521643 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -285,10 +285,7 @@ void VclOutdevTest::testDrawBlackBitmap()
{
ScopedVclPtrInstance<VirtualDevice> pVDev;
Bitmap aBitmap(Size(16, 16), vcl::PixelFormat::N24_BPP);
- {
- BitmapScopedWriteAccess pWriteAccess(aBitmap);
- pWriteAccess->Erase(COL_RED);
- }
+ aBitmap.Erase(COL_RED);
GDIMetaFile aMtf;
aMtf.Record(pVDev.get());
@@ -435,8 +432,7 @@ void VclOutdevTest::testDrawGrayBitmap()
{
// draw a red 1x1 bitmap
Bitmap aBmp(Size(1, 1), vcl::PixelFormat::N24_BPP);
- BitmapScopedWriteAccess pWriteAccess(aBmp);
- pWriteAccess->Erase(COL_RED);
+ aBmp.Erase(COL_RED);
// check to ensure that the bitmap is red
{