summaryrefslogtreecommitdiff
path: root/vcl/source/bitmap/bitmap.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-15 10:24:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-15 12:37:35 +0100
commit953a5cb1c8c750df24ed0316349a5916c384296d (patch)
tree26a76707725fad73d9e71486f0723406bae52065 /vcl/source/bitmap/bitmap.cxx
parentbca14a7126a8cea12eecd248ae84e3d07db9609b (diff)
move Bitmap::ScopedWriteAccess inside vcl
would have liked to make the AcquireWriteAccess methods DLLPRIVATE, but they are needed by the workbench and testing code Change-Id: I22497788eb68dfb84b7e542e5ef53322892a5274 Reviewed-on: https://gerrit.libreoffice.org/51310 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'vcl/source/bitmap/bitmap.cxx')
-rw-r--r--vcl/source/bitmap/bitmap.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx
index b5602327f75d..bf13e87fe68c 100644
--- a/vcl/source/bitmap/bitmap.cxx
+++ b/vcl/source/bitmap/bitmap.cxx
@@ -24,6 +24,7 @@
#include <impbmp.hxx>
#include <salbmp.hxx>
+#include <bitmapwriteaccess.hxx>
#include <algorithm>
#include <memory>
@@ -388,7 +389,7 @@ bool Bitmap::Crop( const tools::Rectangle& rRectPixel )
{
const tools::Rectangle aNewRect( Point(), aRect.GetSize() );
Bitmap aNewBmp( aNewRect.GetSize(), GetBitCount(), &pReadAcc->GetPalette() );
- ScopedWriteAccess pWriteAcc(aNewBmp);
+ BitmapScopedWriteAccess pWriteAcc(aNewBmp);
if( pWriteAcc )
{
@@ -458,7 +459,7 @@ bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst,
if( nNextIndex )
{
ScopedReadAccess pSrcAcc(*pSrc);
- ScopedWriteAccess pDstAcc(*this);
+ BitmapScopedWriteAccess pDstAcc(*this);
if( pSrcAcc && pDstAcc )
{
@@ -495,7 +496,7 @@ bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst,
if( pReadAcc )
{
- ScopedWriteAccess pWriteAcc(*this);
+ BitmapScopedWriteAccess pWriteAcc(*this);
if( pWriteAcc )
{
@@ -558,7 +559,7 @@ bool Bitmap::CopyPixel( const tools::Rectangle& rRectDst,
if( !aRectSrc.IsEmpty() && ( aRectSrc != aRectDst ) )
{
- ScopedWriteAccess pWriteAcc(*this);
+ BitmapScopedWriteAccess pWriteAcc(*this);
if( pWriteAcc )
{
@@ -651,7 +652,7 @@ bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const t
if( pReadAcc )
{
- ScopedWriteAccess pWriteAcc(*this);
+ BitmapScopedWriteAccess pWriteAcc(*this);
if( pWriteAcc )
{
@@ -685,7 +686,7 @@ bool Bitmap::CopyPixel_AlphaOptimized( const tools::Rectangle& rRectDst, const t
if( !aRectSrc.IsEmpty() && ( aRectSrc != aRectDst ) )
{
- ScopedWriteAccess pWriteAcc(*this);
+ BitmapScopedWriteAccess pWriteAcc(*this);
if( pWriteAcc )
{
@@ -768,7 +769,7 @@ bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor )
{
BitmapPalette aBmpPal( pReadAcc->GetPalette() );
Bitmap aNewBmp( aNewSize, GetBitCount(), &aBmpPal );
- ScopedWriteAccess pWriteAcc(aNewBmp);
+ BitmapScopedWriteAccess pWriteAcc(aNewBmp);
if( pWriteAcc )
{
@@ -841,7 +842,7 @@ bool Bitmap::MakeMonochrome(sal_uInt8 cThreshold)
if( pReadAcc )
{
Bitmap aNewBmp( GetSizePixel(), 1 );
- ScopedWriteAccess pWriteAcc(aNewBmp);
+ BitmapScopedWriteAccess pWriteAcc(aNewBmp);
if( pWriteAcc )
{