summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-12 16:08:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-12 19:00:00 +0200
commit203e3099c17bf245f8fcd52c32c58d47bd241c2b (patch)
tree805b01deb02d3bc88582fb4812b4d94c94e65d03 /vcl
parentf4932d61e52d595156af1f63e9fb4bed18b63254 (diff)
make Bitmap/BitmapEx constructors explicit
and add BitmapEx::operator=(Bitmap const &) Image::Image(Bitmap const &) to lessen the fallout Change-Id: Iff5fab88d167a7be739c370c9933d36c297bc61c Reviewed-on: https://gerrit.libreoffice.org/54162 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/canvasbitmaptest.cxx2
-rw-r--r--vcl/source/bitmap/BitmapTools.cxx4
-rw-r--r--vcl/source/gdi/gdimtf.cxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/outdev/bitmap.cxx2
-rw-r--r--vcl/source/outdev/wallpaper.cxx2
6 files changed, 9 insertions, 9 deletions
diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx
index c91819a6b391..8b3c210c2f41 100644
--- a/vcl/qa/cppunit/canvasbitmaptest.cxx
+++ b/vcl/qa/cppunit/canvasbitmaptest.cxx
@@ -665,7 +665,7 @@ void CanvasBitmapTest::runTest()
}
}
- rtl::Reference<VclCanvasBitmap> xBmp( new VclCanvasBitmap(aBitmap) );
+ rtl::Reference<VclCanvasBitmap> xBmp( new VclCanvasBitmap(BitmapEx(aBitmap)) );
checkCanvasBitmap( xBmp, "single bitmap", nDepth );
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx
index c21d5fd2a369..eab36e467ac5 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -176,7 +176,7 @@ BitmapEx CreateFromData( sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 nHe
if (nBitCount == 32)
return BitmapEx(aBmp, *pAlphaMask);
else
- return aBmp;
+ return BitmapEx(aBmp);
}
/** Copy block of image data into the bitmap.
@@ -227,7 +227,7 @@ BitmapEx CreateFromData( RawBitmap&& rawBitmap )
if (nBitCount == 32)
return BitmapEx(aBmp, *pAlphaMask);
else
- return aBmp;
+ return BitmapEx(aBmp);
}
#if ENABLE_CAIRO_CANVAS
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 7955c5608b84..35f19577eb78 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -1766,7 +1766,7 @@ BitmapEx GDIMetaFile::ImplBmpMonoFnc( const BitmapEx& rBmpEx, const void* pBmpPa
else if( rBmpEx.IsTransparent() )
return BitmapEx( aBmp, rBmpEx.GetMask() );
else
- return aBmp;
+ return BitmapEx( aBmp );
}
Color GDIMetaFile::ImplColReplaceFnc( const Color& rColor, const void* pColParam )
@@ -1930,7 +1930,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
aMtf.push_back( new MetaBmpScaleAction( pAct->GetPoint(), pAct->GetSize(),
- pFncBmp( pAct->GetBitmap(), pBmpParam ).GetBitmap() ) );
+ pFncBmp( BitmapEx(pAct->GetBitmap()), pBmpParam ).GetBitmap() ) );
}
break;
@@ -1939,7 +1939,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
aMtf.push_back( new MetaBmpScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
pAct->GetSrcPoint(), pAct->GetSrcSize(),
- pFncBmp( pAct->GetBitmap(), pBmpParam ).GetBitmap() )
+ pFncBmp( BitmapEx(pAct->GetBitmap()), pBmpParam ).GetBitmap() )
);
}
break;
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 5ebdda50bace..21ca8d478e5b 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -9780,7 +9780,7 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
drawBitmap( rTargetArea.TopLeft(), rTargetArea.GetSize(), aBmpEx );
}
else
- drawBitmap( rTargetArea.TopLeft(), rTargetArea.GetSize(), aBmp );
+ drawBitmap( rTargetArea.TopLeft(), rTargetArea.GetSize(), BitmapEx(aBmp) );
return;
}
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 75d6d9120ae7..e924a1f35f58 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -493,7 +493,7 @@ BitmapEx OutputDevice::GetBitmapEx( const Point& rSrcPt, const Size& rSize ) con
return BitmapEx(GetBitmap( rSrcPt, rSize ), AlphaMask( aAlphaBitmap ) );
}
else
- return GetBitmap( rSrcPt, rSize );
+ return BitmapEx(GetBitmap( rSrcPt, rSize ));
}
void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize,
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 567c5eec24cb..71b75c6c9054 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -146,7 +146,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
aVDev->SetBackground( rWallpaper.GetColor() );
aVDev->SetOutputSizePixel( Size( nBmpWidth, nBmpHeight ) );
aVDev->DrawBitmapEx( Point(), aBmpEx );
- aBmpEx = aVDev->GetBitmap( Point(), aVDev->GetOutputSizePixel() );
+ aBmpEx = BitmapEx(aVDev->GetBitmap( Point(), aVDev->GetOutputSizePixel() ));
}
bDrawColorBackground = true;