toolkit/inc/awt/vclxbitmap.hxx | 10 +++++----- toolkit/source/awt/vclxbitmap.cxx | 4 ++-- toolkit/source/awt/vclxdevice.cxx | 4 ++-- toolkit/source/helper/vclunohelper.cxx | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit 2ff6d0a32bdb1750ea1e316ad2b6c7bdd2e9b3f3 Author: Noel Grandin <[email protected]> AuthorDate: Tue Aug 5 19:50:42 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Aug 5 22:23:31 2025 +0200 BitmapEx->Bitmap in VCLXBitmap now that Bitmap can handle transparency Change-Id: Ib210be6432741b20659aba63d081715cb9110924 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188970 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/toolkit/inc/awt/vclxbitmap.hxx b/toolkit/inc/awt/vclxbitmap.hxx index 9edf562c1db8..e09a240c435a 100644 --- a/toolkit/inc/awt/vclxbitmap.hxx +++ b/toolkit/inc/awt/vclxbitmap.hxx @@ -25,7 +25,7 @@ #include <comphelper/servicehelper.hxx> #include <cppuhelper/implbase.hxx> #include <mutex> -#include <vcl/bitmapex.hxx> +#include <vcl/bitmap.hxx> @@ -36,7 +36,7 @@ class VCLXBitmap final : public cppu::WeakImplHelper< css::util::XAccounting> { std::mutex maMutex; - BitmapEx maBitmap; + Bitmap maBitmap; std::mutex& GetMutex() { return maMutex; } @@ -44,10 +44,10 @@ class VCLXBitmap final : public cppu::WeakImplHelper< public: // inline constructors VCLXBitmap() : maMutex(), maBitmap() {} - VCLXBitmap(const BitmapEx& rBitmapEx) : maMutex(), maBitmap(rBitmapEx) {} + VCLXBitmap(const Bitmap& rBitmap) : maMutex(), maBitmap(rBitmap) {} - void SetBitmap( const BitmapEx& rBmp ) { maBitmap = rBmp; } - const BitmapEx& GetBitmap() const { return maBitmap; } + void SetBitmap( const Bitmap& rBmp ) { maBitmap = rBmp; } + const Bitmap& GetBitmap() const { return maBitmap; } // css::awt::XBitmap css::awt::Size SAL_CALL getSize() override; diff --git a/toolkit/source/awt/vclxbitmap.cxx b/toolkit/source/awt/vclxbitmap.cxx index 1faedb623550..11be7610e339 100644 --- a/toolkit/source/awt/vclxbitmap.cxx +++ b/toolkit/source/awt/vclxbitmap.cxx @@ -39,7 +39,7 @@ css::uno::Sequence< sal_Int8 > VCLXBitmap::getDIB() std::scoped_lock aGuard( GetMutex() ); SvMemoryStream aMem; - WriteDIB(maBitmap.GetBitmap(), aMem, false, true); + WriteDIB(BitmapEx(maBitmap).GetBitmap(), aMem, false, true); return css::uno::Sequence<sal_Int8>( static_cast<sal_Int8 const *>(aMem.GetData()), aMem.Tell() ); } @@ -47,7 +47,7 @@ css::uno::Sequence< sal_Int8 > VCLXBitmap::getMaskDIB() { std::scoped_lock aGuard( GetMutex() ); - return vcl::bitmap::GetMaskDIB(maBitmap); + return vcl::bitmap::GetMaskDIB(BitmapEx(maBitmap)); } sal_Int64 SAL_CALL VCLXBitmap::estimateUsage() diff --git a/toolkit/source/awt/vclxdevice.cxx b/toolkit/source/awt/vclxdevice.cxx index 7648d61ab263..c8d8893db850 100644 --- a/toolkit/source/awt/vclxdevice.cxx +++ b/toolkit/source/awt/vclxdevice.cxx @@ -125,7 +125,7 @@ css::uno::Reference< css::awt::XBitmap > VCLXDevice::createBitmap( sal_Int32 nX, Bitmap aBmp = mpOutputDevice->GetBitmap( Point( nX, nY ), Size( nWidth, nHeight ) ); rtl::Reference<VCLXBitmap> pBmp = new VCLXBitmap; - pBmp->SetBitmap( BitmapEx(aBmp) ); + pBmp->SetBitmap( aBmp ); return pBmp; } @@ -135,7 +135,7 @@ css::uno::Reference< css::awt::XDisplayBitmap > VCLXDevice::createDisplayBitmap( Bitmap aBmp = VCLUnoHelper::GetBitmap( rxBitmap ); rtl::Reference<VCLXBitmap> pBmp = new VCLXBitmap; - pBmp->SetBitmap( BitmapEx(aBmp) ); + pBmp->SetBitmap( aBmp ); return pBmp; } diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 1661db820536..cf4c064b3941 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -62,7 +62,7 @@ uno::Reference< css::awt::XToolkit> VCLUnoHelper::CreateToolkit() Bitmap VCLUnoHelper::GetBitmap( const css::uno::Reference< css::awt::XBitmap>& rxBitmap ) { if (VCLXBitmap* pVCLBitmap = dynamic_cast<VCLXBitmap*>(rxBitmap.get())) - return Bitmap(pVCLBitmap->GetBitmap()); + return pVCLBitmap->GetBitmap(); return Bitmap(vcl::GetBitmap(rxBitmap)); }
