From a214ac677481883d31800bc2b67fd3a9c504319d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 4 Dec 2023 11:17:23 +0200 Subject: 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 --- emfio/source/reader/wmfreader.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'emfio') diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx index 1b5739b3b190..4c74229fc8c8 100644 --- a/emfio/source/reader/wmfreader.cxx +++ b/emfio/source/reader/wmfreader.cxx @@ -1003,7 +1003,7 @@ namespace emfio SAL_WARN( "emfio", "\tTODO Read DIB failed. Interrupting processing whole image. Please report bug report." ); if ( !aBmp.IsEmpty() ) { - Bitmap::ScopedReadAccess pBmp(aBmp); + BitmapScopedReadAccess pBmp(aBmp); for ( tools::Long y = 0; y < pBmp->Height(); y++ ) { for ( tools::Long x = 0; x < pBmp->Width(); x++ ) -- cgit