vcl/qa/cppunit/drawmode.cxx |    3 +--
 vcl/qa/cppunit/outdev.cxx   |    8 ++------
 2 files changed, 3 insertions(+), 8 deletions(-)

New commits:
commit 5f909fb33210f98905d5ef37d9176fecf4ba5c29
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Sun Oct 31 11:50:19 2021 +0100
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Sun Oct 31 13:35:43 2021 +0100

    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.lu...@collabora.com>

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
     {

Reply via email to