summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2023-12-04 11:17:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-12-07 09:32:14 +0100
commita214ac677481883d31800bc2b67fd3a9c504319d (patch)
tree97598a97a7b0745acaf4dc4e7587871794011227 /cppcanvas
parent7101c620857cb885076b85cd1447e50d30cab528 (diff)
simplify and modernise ScopedBitmapAccess
(*) Make all of it use a "Scoped" paradigm (*) pass by value, no need to allocate on heap (*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods. (*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places. Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/inc/pch/precompiled_cppcanvas.hxx1
-rw-r--r--cppcanvas/qa/extras/emfplus/emfplus.cxx2
2 files changed, 1 insertions, 2 deletions
diff --git a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
index 44c0bb3db4c4..408286c2ac96 100644
--- a/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
+++ b/cppcanvas/inc/pch/precompiled_cppcanvas.hxx
@@ -77,7 +77,6 @@
#include <vcl/dllapi.h>
#include <vcl/mapmod.hxx>
#include <vcl/region.hxx>
-#include <vcl/scopedbitmapaccess.hxx>
#include <vcl/vclenum.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
diff --git a/cppcanvas/qa/extras/emfplus/emfplus.cxx b/cppcanvas/qa/extras/emfplus/emfplus.cxx
index e19508b202d7..21cb7c219e19 100644
--- a/cppcanvas/qa/extras/emfplus/emfplus.cxx
+++ b/cppcanvas/qa/extras/emfplus/emfplus.cxx
@@ -51,7 +51,7 @@ public:
CPPUNIT_TEST_FIXTURE(Test, testFdo77229)
{
Bitmap aBitmap = load("fdo77229.emf");
- Bitmap::ScopedReadAccess pAccess(aBitmap);
+ BitmapScopedReadAccess pAccess(aBitmap);
// The green star was missing.
Color aColor(pAccess->GetPixel(284, 280));
CPPUNIT_ASSERT_EQUAL(sal_uInt8(0), aColor.GetRed());