diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-02-20 04:03:59 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-02-20 04:26:49 +0100 |
commit | 3234001d3fada2e4ba9ed890ffac548eba389f5a (patch) | |
tree | 9a450653c9441a3bf91cd4a00af02fc1c44a5641 /vcl/source/gdi/bitmap3.cxx | |
parent | e6de01365989667a693546a0786f10c81ccef85c (diff) |
prefer a Scoped[Read|Write}Access
Change-Id: I8ddad720685f3cbcc330b9d1f61fcf833a3d2472
Diffstat (limited to 'vcl/source/gdi/bitmap3.cxx')
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index a4fc4b4cdc5c..87333ee4f4a6 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -1297,9 +1297,9 @@ sal_Bool Bitmap::ImplScaleSuper( if( ( nDstW > 1L ) && ( nDstH > 1L ) ) { - BitmapReadAccess* pAcc = AcquireReadAccess(); - Bitmap aOutBmp( Size( nDstW, nDstH ), 24 ); - BitmapWriteAccess* pWAcc = aOutBmp.AcquireWriteAccess(); + Bitmap::ScopedReadAccess pAcc(*this); + Bitmap aOutBmp( Size( nDstW, nDstH ), 24 ); + Bitmap::ScopedWriteAccess pWAcc(aOutBmp); boost::scoped_array<long> pMapIX(new long[ nDstW ]); boost::scoped_array<long> pMapIY(new long[ nDstH ]); boost::scoped_array<long> pMapFX(new long[ nDstW ]); @@ -2071,14 +2071,6 @@ sal_Bool Bitmap::ImplScaleSuper( bRet = true; } - if(pAcc) - { - ReleaseAccess( pAcc ); - } - if(pWAcc) - { - aOutBmp.ReleaseAccess( pWAcc ); - } if( bRet ) { ImplAdaptBitCount(aOutBmp); |