cui/source/customize/cfg.cxx | 10 ++-- cui/source/dialogs/insdlg.cxx | 2 cui/source/tabpages/border.cxx | 2 framework/source/uiconfiguration/ImageList.cxx | 8 +-- include/vcl/bitmap/BitmapFilter.hxx | 1 include/vcl/image.hxx | 4 - include/vcl/qt/QtUtils.hxx | 2 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx | 2 sd/source/ui/presenter/SlideRenderer.cxx | 6 +- sd/source/ui/sidebar/LayoutMenu.cxx | 6 +- sd/source/ui/sidebar/MasterPageDescriptor.cxx | 4 - sd/source/ui/sidebar/MasterPagesSelector.cxx | 4 - sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx | 2 sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx | 4 - sd/source/ui/view/outlview.cxx | 2 sw/qa/extras/odfexport/odfexport.cxx | 2 toolkit/source/awt/vclxmenu.cxx | 4 - toolkit/source/awt/vclxtoolkit.cxx | 2 toolkit/source/awt/vclxwindows.cxx | 2 vcl/inc/image.h | 12 ++-- vcl/osx/salinst.cxx | 6 +- vcl/qt5/QtBuilder.cxx | 2 vcl/qt5/QtTools.cxx | 4 - vcl/skia/osx/bitmap.cxx | 6 +- vcl/source/app/salvtables.cxx | 2 vcl/source/bitmap/bitmapfilter.cxx | 9 +++ vcl/source/control/button.cxx | 4 - vcl/source/control/fixed.cxx | 2 vcl/source/gdi/graph.cxx | 2 vcl/source/graphic/UnoGraphicProvider.cxx | 8 +-- vcl/source/image/Image.cxx | 24 ++++----- vcl/source/image/ImplImage.cxx | 42 ++++++++--------- vcl/source/treelist/iconview.cxx | 2 vcl/source/treelist/svtabbx.cxx | 4 - vcl/source/window/menubarwindow.cxx | 2 vcl/source/window/toolbox2.cxx | 14 ++--- vcl/unx/gtk3/gtkinst.cxx | 14 ++--- vcl/unx/gtk3/gtksalmenu.cxx | 8 +-- vcl/win/window/salmenu.cxx | 4 - 39 files changed, 125 insertions(+), 115 deletions(-)
New commits: commit 62d1a50659bfbf472748d844fba0f58be2d11c30 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Aug 2 14:38:10 2025 +0200 Commit: Noel Grandin <noelgran...@gmail.com> CommitDate: Sat Aug 2 18:34:08 2025 +0200 BitmapEx->Bitmap in Image Now that Bitmap can handle transparency Change-Id: Ic97b5fea315edfb8a5c9c5adb306a8b4f1c97f5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188822 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index b1fb244d2060..6921bf796b95 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2852,7 +2852,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog(weld::Window *pWindow, if ( graphics.hasElements() ) { Image img(graphics[0]); - if (!img.GetBitmapEx().IsEmpty()) + if (!img.GetBitmap().IsEmpty()) { m_aGraphics.push_back(graphics[0]); m_xTbSymbol->InsertItem(m_aGraphics.size(), img, elem.first); @@ -2999,13 +2999,13 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( Image aImage( xGraphic ); if ( bOK && ((aSize.Width != m_nExpectedSize) || (aSize.Height != m_nExpectedSize)) ) { - BitmapEx aBitmap = aImage.GetBitmapEx(); + BitmapEx aBitmap(aImage.GetBitmap()); BitmapEx aBitmapex = BitmapEx::AutoScaleBitmap(aBitmap, m_nExpectedSize); aImage = Image( aBitmapex); } m_xTbSymbol->InsertItem(nId, aImage, aURL, nPos); //modify - m_aGraphics[nPos] = Graphic(aImage.GetBitmapEx()).GetXGraphic(); + m_aGraphics[nPos] = Graphic(aImage.GetBitmap()).GetXGraphic(); m_xImportedImageManager->replaceImages( SvxConfigPageHelper::GetImageType(), { aURL }, { xGraphic } ); m_xImportedImageManager->store(); @@ -3142,13 +3142,13 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) if ( bOK && ((aSize.Width != m_nExpectedSize) || (aSize.Height != m_nExpectedSize)) ) { - BitmapEx aBitmap = aImage.GetBitmapEx(); + BitmapEx aBitmap(aImage.GetBitmap()); BitmapEx aBitmapex = BitmapEx::AutoScaleBitmap(aBitmap, m_nExpectedSize); aImage = Image( aBitmapex); } if ( bOK && !!aImage ) { - m_aGraphics.push_back(Graphic(aImage.GetBitmapEx()).GetXGraphic()); + m_aGraphics.push_back(Graphic(aImage.GetBitmap()).GetXGraphic()); m_xTbSymbol->InsertItem(m_aGraphics.size(), aImage, aURL); uno::Sequence<OUString> aImportURL { aURL }; diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 41d50c17b336..34e3f54fa8f1 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -346,7 +346,7 @@ short SvInsertOleDlg::run() //the image with this icon above it Image aImage = SvFileInformationManager::GetImage(aURL, true); SvMemoryStream aTemp; - WriteDIBBitmapEx(aImage.GetBitmapEx(), aTemp); + WriteDIBBitmapEx(BitmapEx(aImage.GetBitmap()), aTemp); m_aIconMetaFile = Sequence<sal_Int8>(static_cast<const sal_Int8*>(aTemp.GetData()), aTemp.TellEnd()); m_aIconMediaType = "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\""; } diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 92a158783467..7e7d21c4819d 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -1484,7 +1484,7 @@ void SvxBorderTabPage::FillShadowIV() Bitmap SvxBorderTabPage::GetPreviewAsBitmap(const Image& rImage) { - Bitmap aPreviewBitmap(rImage.GetBitmapEx()); + Bitmap aPreviewBitmap(rImage.GetBitmap()); ScopedVclPtr<VirtualDevice> pVDev = VclPtr<VirtualDevice>::Create(); if (pVDev->GetDPIScaleFactor() > 1) aPreviewBitmap.Scale(pVDev->GetDPIScaleFactor(), pVDev->GetDPIScaleFactor()); diff --git a/framework/source/uiconfiguration/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx index f224ebcedc03..635688d24903 100644 --- a/framework/source/uiconfiguration/ImageList.cxx +++ b/framework/source/uiconfiguration/ImageList.cxx @@ -45,18 +45,18 @@ BitmapEx ImageList::GetAsHorizontalStrip() const if( !nCount ) return BitmapEx(); - BitmapEx aTempl = maImages[ 0 ]->maImage.GetBitmapEx(); + Bitmap aTempl = maImages[ 0 ]->maImage.GetBitmap(); Size aImageSize(aTempl.GetSizePixel()); Size aSize(aImageSize.Width() * nCount, aImageSize.Height()); - BitmapEx aResult( aTempl, Point(), aSize ); + BitmapEx aResult( BitmapEx(aTempl), Point(), aSize ); tools::Rectangle aSrcRect( Point( 0, 0 ), aImageSize ); for (sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++) { tools::Rectangle aDestRect( Point( nIdx * aImageSize.Width(), 0 ), aImageSize ); ImageAryData *pData = maImages[ nIdx ].get(); - BitmapEx aTmp = pData->maImage.GetBitmapEx(); - aResult.CopyPixel( aDestRect, aSrcRect, aTmp); + Bitmap aTmp = pData->maImage.GetBitmap(); + aResult.CopyPixel( aDestRect, aSrcRect, BitmapEx(aTmp)); } return aResult; diff --git a/include/vcl/bitmap/BitmapFilter.hxx b/include/vcl/bitmap/BitmapFilter.hxx index ae627dd14067..f846fdea7483 100644 --- a/include/vcl/bitmap/BitmapFilter.hxx +++ b/include/vcl/bitmap/BitmapFilter.hxx @@ -73,6 +73,7 @@ public: virtual BitmapEx execute(BitmapEx const& rBitmapEx) const = 0; static bool Filter(BitmapEx& rBmpEx, BitmapFilter const& rFilter); + static bool Filter(Bitmap& rBmp, BitmapFilter const& rFilter); static bool Filter(Animation& rBmpEx, BitmapFilter const& rFilter); }; diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx index 4f2d2912c3c4..515f7eae5f28 100644 --- a/include/vcl/image.hxx +++ b/include/vcl/image.hxx @@ -48,7 +48,7 @@ public: explicit Image(StockImage, OUString const & rPNGFilePath); Size GetSizePixel() const; - BitmapEx GetBitmapEx() const; + Bitmap GetBitmap() const; void SetOptional(bool bValue); bool operator!() const @@ -69,7 +69,7 @@ private: std::shared_ptr<ImplImage> mpImplData; - SAL_DLLPRIVATE void ImplInit(BitmapEx const & rBmpEx); + SAL_DLLPRIVATE void ImplInit(Bitmap const & rBmp); }; #endif // INCLUDED_VCL_IMAGE_HXX diff --git a/include/vcl/qt/QtUtils.hxx b/include/vcl/qt/QtUtils.hxx index 5bc2db9d7e98..ac8e558bb9c1 100644 --- a/include/vcl/qt/QtUtils.hxx +++ b/include/vcl/qt/QtUtils.hxx @@ -49,7 +49,7 @@ inline QPixmap toQPixmap(const BitmapEx& rBitmapEx) return aPixmap; } -inline QPixmap toQPixmap(const Image& rImage) { return toQPixmap(rImage.GetBitmapEx()); } +inline QPixmap toQPixmap(const Image& rImage) { return toQPixmap(BitmapEx(rImage.GetBitmap())); } inline QPixmap toQPixmap(const css::uno::Reference<css::graphic::XGraphic>& rImage) { diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx index e1b57ded2d89..04b62e2d52ed 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx @@ -468,7 +468,7 @@ void CellAppearancePropertyPanel::UpdateControlState() void CellAppearancePropertyPanel::UpdateCellBorder(bool bTop, bool bBot, bool bLeft, bool bRight, bool bVer, bool bHor, bool bTLBR, bool bBLTR) { - const Size aBmpSize = maIMGCellBorder.GetBitmapEx().GetSizePixel(); + const Size aBmpSize = maIMGCellBorder.GetBitmap().GetSizePixel(); if (aBmpSize.Width() == 43 && aBmpSize.Height() == 43) { diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index 69f9a7d4bd89..54d13cd0eb08 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -126,14 +126,14 @@ BitmapEx SlideRenderer::CreatePreview ( Size(aPreviewSize.Width*nFactor, aPreviewSize.Height*nFactor), true); if (nFactor == 1) - return aPreview.GetBitmapEx(); + return BitmapEx(aPreview.GetBitmap()); else { - BitmapEx aScaledPreview = aPreview.GetBitmapEx(); + Bitmap aScaledPreview = aPreview.GetBitmap(); aScaledPreview.Scale( Size(aPreviewSize.Width,aPreviewSize.Height), BmpScaleFlag::BestQuality); - return aScaledPreview; + return BitmapEx(aScaledPreview); } } diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index 23cfb5dc00bf..8a830e1462f8 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -439,7 +439,7 @@ SfxRequest LayoutMenu::CreateRequest ( VclPtr<VirtualDevice> LayoutMenu::GetVirtualDevice(Image pImage) { - BitmapEx aPreviewBitmap = pImage.GetBitmapEx(); + Bitmap aPreviewBitmap = pImage.GetBitmap(); VclPtr<VirtualDevice> pVDev = VclPtr<VirtualDevice>::Create(); const Point aNull(0, 0); if (pVDev->GetDPIScaleFactor() > 1) @@ -453,7 +453,7 @@ VclPtr<VirtualDevice> LayoutMenu::GetVirtualDevice(Image pImage) Bitmap LayoutMenu::GetPreviewAsBitmap(const Image& rImage) { - Bitmap aPreviewBitmap(rImage.GetBitmapEx()); + Bitmap aPreviewBitmap(rImage.GetBitmap()); ScopedVclPtr<VirtualDevice> pVDev = VclPtr<VirtualDevice>::Create(); if (pVDev->GetDPIScaleFactor() > 1) aPreviewBitmap.Scale(pVDev->GetDPIScaleFactor(), pVDev->GetDPIScaleFactor()); @@ -511,7 +511,7 @@ void LayoutMenu::Fill() if (bRightToLeft && (WritingMode_TB_RL != elem.meWritingMode)) { // FIXME: avoid interpolating RTL layouts. - BitmapEx aRTL = aImg.GetBitmapEx(); + Bitmap aRTL = aImg.GetBitmap(); aRTL.Mirror(BmpMirrorFlags::Horizontal); aImg = Image(aRTL); } diff --git a/sd/source/ui/sidebar/MasterPageDescriptor.cxx b/sd/source/ui/sidebar/MasterPageDescriptor.cxx index 549e6c25bd83..fc678645ac65 100644 --- a/sd/source/ui/sidebar/MasterPageDescriptor.cxx +++ b/sd/source/ui/sidebar/MasterPageDescriptor.cxx @@ -215,13 +215,13 @@ bool MasterPageDescriptor::UpdatePreview ( { // Create the small preview by scaling the large one down. maSmallPreview = rRenderer.ScaleBitmap( - maLargePreview.GetBitmapEx(), + BitmapEx(maLargePreview.GetBitmap()), rSmallSize.Width()); // The large preview may not have the desired width. Scale it // accordingly. if (maLargePreview.GetSizePixel().Width() != rLargeSize.Width()) maLargePreview = rRenderer.ScaleBitmap( - maLargePreview.GetBitmapEx(), + BitmapEx(maLargePreview.GetBitmap()), rLargeSize.Width()); bModified = true; } diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx index 51e96e57fb73..46f59a70b71d 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx @@ -471,7 +471,7 @@ void MasterPagesSelector::InvalidatePreview (const SdPage* pPage) VclPtr<VirtualDevice> MasterPagesSelector::GetVirtualDevice(const Image& rImage) { - BitmapEx aPreviewBitmap = rImage.GetBitmapEx(); + Bitmap aPreviewBitmap = rImage.GetBitmap(); VclPtr<VirtualDevice> pVDev = VclPtr<VirtualDevice>::Create(); const Point aNull(0, 0); if (pVDev->GetDPIScaleFactor() > 1) @@ -485,7 +485,7 @@ VclPtr<VirtualDevice> MasterPagesSelector::GetVirtualDevice(const Image& rImage) Bitmap MasterPagesSelector::GetPreviewAsBitmap(const Image& rImage) { - Bitmap aPreviewBitmap(rImage.GetBitmapEx()); + Bitmap aPreviewBitmap(rImage.GetBitmap()); ScopedVclPtr<VirtualDevice> pVDev = VclPtr<VirtualDevice>::Create(); if (pVDev->GetDPIScaleFactor() > 1) aPreviewBitmap.Scale(pVDev->GetDPIScaleFactor(), pVDev->GetDPIScaleFactor()); diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx index a9182c2a25e5..340895d1e6ca 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx @@ -57,7 +57,7 @@ BitmapEx BitmapFactory::CreateBitmap ( &rPage, aSize, true, - false).GetBitmapEx()); + false).GetBitmap()); if (bDoSuperSampling) { aPreview.Scale(rPixelSize, BmpScaleFlag::BestQuality); diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx index da8d45c112a8..85e65ded7598 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx @@ -277,7 +277,7 @@ void PageObjectPainter::PaintTransitionEffect ( rDevice.DrawBitmapEx( aBox.TopCenter(), - pPageObjectLayouter->GetTransitionEffectIcon().GetBitmapEx()); + pPageObjectLayouter->GetTransitionEffectIcon().GetBitmap()); } } @@ -298,7 +298,7 @@ void PageObjectPainter::PaintCustomAnimationEffect ( PageObjectLayouter::ModelCoordinateSystem)); rDevice.DrawBitmapEx( aBox.TopCenter(), - pPageObjectLayouter->GetCustomAnimationEffectIcon().GetBitmapEx()); + pPageObjectLayouter->GetCustomAnimationEffectIcon().GetBitmap()); } } diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 14c7ad84afe3..a076ffe61ada 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -1590,7 +1590,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo, void) // create BitmapPrimitive2D and add directly const drawinglayer::primitive2d::Primitive2DReference xBitmap( new drawinglayer::primitive2d::BitmapPrimitive2D( - maSlideImage.GetBitmapEx(), + BitmapEx(maSlideImage.GetBitmap()), basegfx::utils::createScaleTranslateB2DHomMatrix( aImageSize.Width(), aImageSize.Height(), aImagePos.X(), aImagePos.Y()))); diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 9716a974b764..2d176ca6406f 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -1458,7 +1458,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf60700_images) Image aImage(m_directories.getURLFromSrc(u"/sw/qa/extras/odfexport/data/libreoffice.png")); CPPUNIT_ASSERT(!!aImage); - uno::Reference<graphic::XGraphic> xGraphic = Graphic(aImage.GetBitmapEx()).GetXGraphic(); + uno::Reference<graphic::XGraphic> xGraphic = Graphic(aImage.GetBitmap()).GetXGraphic(); CPPUNIT_ASSERT(xGraphic.is()); uno::Sequence<OUString> aImportURL{ u".uno:OpenFromWriter"_ustr }; diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 10abaa0e9876..afa1164fa68b 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -583,7 +583,7 @@ namespace ::Size aNewSize( nIdealWidth, nIdealHeight ); bool bModified( false ); - BitmapEx aBitmapEx = aImage.GetBitmapEx(); + Bitmap aBitmapEx = aImage.GetBitmap(); bModified = aBitmapEx.Scale( aNewSize, BmpScaleFlag::BestQuality ); if ( bModified ) @@ -831,7 +831,7 @@ VCLXMenu::getItemImage( { Image aImage = mpMenu->GetItemImage( nItemId ); if ( !!aImage ) - rxGraphic = Graphic(aImage.GetBitmapEx()).GetXGraphic(); + rxGraphic = Graphic(aImage.GetBitmap()).GetXGraphic(); } return rxGraphic; } diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 85517b75ddc3..c35dac2bf0da 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1356,7 +1356,7 @@ void SVTXRoadmap::ImplSetNewImage() { OSL_PRECOND( GetWindow(), "SVTXRoadmap::ImplSetNewImage: window is required to be not-NULL!" ); VclPtr< ::vcl::ORoadmap > pButton = GetAs< ::vcl::ORoadmap >(); - pButton->SetRoadmapBitmap( Bitmap(GetImage().GetBitmapEx()) ); + pButton->SetRoadmapBitmap( GetImage().GetBitmap() ); } void SVTXRoadmap::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds ) diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 6284aa509dae..740790d5279c 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -296,7 +296,7 @@ css::uno::Any VCLXGraphicControl::getProperty( const OUString& PropertyName ) switch ( nPropType ) { case BASEPROPERTY_GRAPHIC: - aProp <<= Graphic(maImage.GetBitmapEx()).GetXGraphic(); + aProp <<= Graphic(maImage.GetBitmap()).GetXGraphic(); break; case BASEPROPERTY_IMAGEALIGN: { diff --git a/vcl/inc/image.h b/vcl/inc/image.h index e5b73e09644d..4fbb0c2f69ae 100644 --- a/vcl/inc/image.h +++ b/vcl/inc/image.h @@ -36,15 +36,15 @@ private: std::unique_ptr<GDIMetaFile> mxMetaFile; /// Original bitmap - or cache of a potentially scaled bitmap - BitmapEx maBitmapEx; - BitmapEx maDisabledBitmapEx; + Bitmap maBitmap; + Bitmap maDisabledBitmap; bool bOptional = false; - bool loadStockAtScale(SalGraphics* pGraphics, BitmapEx &rBitmapEx); + bool loadStockAtScale(SalGraphics* pGraphics, Bitmap &rBitmap); public: - ImplImage(const BitmapEx& rBitmapEx); + ImplImage(const Bitmap& rBitmap); ImplImage(const GDIMetaFile& rMetaFile); ImplImage(OUString aStockName); @@ -61,9 +61,9 @@ public: /// get size in co-ordinates not scaled for HiDPI Size getSizePixel(); /// Legacy - the original bitmap - BitmapEx const & getBitmapEx(bool bDisabled = false); + Bitmap const & getBitmap(bool bDisabled = false); /// Taking account of HiDPI scaling - BitmapEx const & getBitmapExForHiDPI(bool bDisabled, SalGraphics* pGraphics); + Bitmap const & getBitmapForHiDPI(bool bDisabled, SalGraphics* pGraphics); void SetOptional(bool bValue); diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 046d4c87231d..1d4c6dcba453 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -1034,8 +1034,7 @@ CGImageRef CreateCGImage( const Image& rImage ) return SkiaHelper::createCGImage( rImage ); #endif - BitmapEx aBmpEx( rImage.GetBitmapEx() ); - Bitmap aBmp( aBmpEx.GetBitmap() ); + Bitmap aBmp( rImage.GetBitmap() ); if( aBmp.IsEmpty() || ! aBmp.ImplGetSalBitmap() ) return nullptr; @@ -1047,10 +1046,11 @@ CGImageRef CreateCGImage( const Image& rImage ) return nullptr; CGImageRef xImage = nullptr; - if( !aBmpEx.IsAlpha() ) + if( !aBmp.HasAlpha() ) xImage = pSalBmp->CreateCroppedImage( 0, 0, pSalBmp->mnWidth, pSalBmp->mnHeight ); else { + BitmapEx aBmpEx(aBmp); AlphaMask aAlphaMask( aBmpEx.GetAlphaMask() ); Bitmap aMask( aAlphaMask.GetBitmap() ); QuartzSalBitmap* pMaskBmp = static_cast<QuartzSalBitmap*>(aMask.ImplGetSalBitmap().get()); diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index e4872ae33abc..cda06da766a1 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -258,7 +258,7 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: if (!sIconName.isEmpty()) { const Image aImage = loadThemeImage(sIconName); - if (!aImage.GetBitmapEx().IsEmpty()) + if (!aImage.GetBitmap().IsEmpty()) { pLabel->setPixmap(toQPixmap(aImage)); } diff --git a/vcl/qt5/QtTools.cxx b/vcl/qt5/QtTools.cxx index bb69d490baa4..6d700a2716bf 100644 --- a/vcl/qt5/QtTools.cxx +++ b/vcl/qt5/QtTools.cxx @@ -270,9 +270,9 @@ QImage toQImage(const Image& rImage) if (!!rImage) { SvMemoryStream aMemStm; - auto rBitmapEx = rImage.GetBitmapEx(); + auto rBitmap = rImage.GetBitmap(); vcl::PngImageWriter aWriter(aMemStm); - aWriter.write(rBitmapEx); + aWriter.write(rBitmap); aImage.loadFromData(static_cast<const uchar*>(aMemStm.GetData()), aMemStm.TellEnd()); } diff --git a/vcl/skia/osx/bitmap.cxx b/vcl/skia/osx/bitmap.cxx index edb339ce5292..1cb171485ace 100644 --- a/vcl/skia/osx/bitmap.cxx +++ b/vcl/skia/osx/bitmap.cxx @@ -34,8 +34,7 @@ namespace SkiaHelper { CGImageRef createCGImage(const Image& rImage) { - BitmapEx bitmapEx(rImage.GetBitmapEx()); - Bitmap bitmap(bitmapEx.GetBitmap()); + Bitmap bitmap(rImage.GetBitmap()); if (bitmap.IsEmpty() || !bitmap.ImplGetSalBitmap()) return nullptr; @@ -54,7 +53,7 @@ CGImageRef createCGImage(const Image& rImage) matrix.preTranslate(0, targetBitmap.height()); matrix.setConcat(matrix, SkMatrix::Scale(1, -1)); - if (!bitmapEx.IsAlpha()) + if (!bitmap.HasAlpha()) { SkCanvas canvas(targetBitmap); canvas.concat(matrix); @@ -62,6 +61,7 @@ CGImageRef createCGImage(const Image& rImage) } else { + BitmapEx bitmapEx(bitmap); AlphaMask alpha(bitmapEx.GetAlphaMask()); // tdf#156854 invert alpha mask for macOS native menu item images // At the time of this change, only the AquaSalMenu class calls this diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index f35e44d5bef4..47fd410b0a16 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2220,7 +2220,7 @@ void SalInstanceAssistant::set_page_side_help_id(const OUString& rHelpId) void SalInstanceAssistant::set_page_side_image(const OUString& rImage) { - m_xWizard->SetRoadmapBitmap(Bitmap(createImage(rImage).GetBitmapEx())); + m_xWizard->SetRoadmapBitmap(createImage(rImage).GetBitmap()); } SalInstanceAssistant::~SalInstanceAssistant() diff --git a/vcl/source/bitmap/bitmapfilter.cxx b/vcl/source/bitmap/bitmapfilter.cxx index 3ca1bcae2977..f5f59cc4c114 100644 --- a/vcl/source/bitmap/bitmapfilter.cxx +++ b/vcl/source/bitmap/bitmapfilter.cxx @@ -31,6 +31,15 @@ bool BitmapFilter::Filter(BitmapEx& rBmpEx, BitmapFilter const& rFilter) return true; } +bool BitmapFilter::Filter(Bitmap& rBmp, BitmapFilter const& rFilter) +{ + BitmapEx aBitmapEx(rBmp); + bool bRet = Filter(aBitmapEx, rFilter); + if (bRet) + rBmp = Bitmap(aBitmapEx); + return bRet; +} + bool BitmapFilter::Filter(Animation& rAnimation, BitmapFilter const& rFilter) { SAL_WARN_IF(rAnimation.IsInAnimation(), "vcl", "Animation modified while it is animated"); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 4f808f3eea6b..480cb2413e45 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -628,7 +628,7 @@ void Button::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) if (HasImage()) { SvMemoryStream aOStm(6535, 6535); - if(GraphicConverter::Export(aOStm, GetModeImage().GetBitmapEx(), ConvertDataFormat::PNG) == ERRCODE_NONE) + if(GraphicConverter::Export(aOStm, GetModeImage().GetBitmap(), ConvertDataFormat::PNG) == ERRCODE_NONE) { css::uno::Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const *>(aOStm.GetData()), aOStm.Tell()); OStringBuffer aBuffer("data:image/png;base64,"); @@ -3053,7 +3053,7 @@ void RadioButton::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) if (!!maImage) { SvMemoryStream aOStm(6535, 6535); - if(GraphicConverter::Export(aOStm, maImage.GetBitmapEx(), ConvertDataFormat::PNG) == ERRCODE_NONE) + if(GraphicConverter::Export(aOStm, maImage.GetBitmap(), ConvertDataFormat::PNG) == ERRCODE_NONE) { css::uno::Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const *>(aOStm.GetData()), aOStm.Tell()); OStringBuffer aBuffer("data:image/png;base64,"); diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index d589e0a1fff1..9dc7a7939897 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -982,7 +982,7 @@ void FixedImage::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) if (!!maImage) { SvMemoryStream aOStm(6535, 6535); - if(GraphicConverter::Export(aOStm, maImage.GetBitmapEx(), ConvertDataFormat::PNG) == ERRCODE_NONE) + if(GraphicConverter::Export(aOStm, maImage.GetBitmap(), ConvertDataFormat::PNG) == ERRCODE_NONE) { css::uno::Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const *>(aOStm.GetData()), aOStm.Tell()); OStringBuffer aBuffer("data:image/png;base64,"); diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index e9e641f1524e..ff1ea312d533 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -203,7 +203,7 @@ Graphic::Graphic(const Bitmap& rBitmap) // and we need to be able to see and preserve 'stock' images too. Graphic::Graphic(const Image& rImage) // FIXME: should really defer the BitmapEx load. - : mxImpGraphic(new ImpGraphic(rImage.GetBitmapEx())) + : mxImpGraphic(new ImpGraphic(BitmapEx(rImage.GetBitmap()))) { const OUString& aStock = rImage.GetStock(); if (aStock.getLength()) diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index 77801f89d657..08873c8a40dd 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -220,19 +220,19 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadStandardImage( st { if ( sImageName == u"info" ) { - xRet = Graphic(GetStandardInfoBoxImage().GetBitmapEx()).GetXGraphic(); + xRet = Graphic(GetStandardInfoBoxImage().GetBitmap()).GetXGraphic(); } else if ( sImageName == u"warning" ) { - xRet = Graphic(GetStandardWarningBoxImage().GetBitmapEx()).GetXGraphic(); + xRet = Graphic(GetStandardWarningBoxImage().GetBitmap()).GetXGraphic(); } else if ( sImageName == u"error" ) { - xRet = Graphic(GetStandardErrorBoxImage().GetBitmapEx()).GetXGraphic(); + xRet = Graphic(GetStandardErrorBoxImage().GetBitmap()).GetXGraphic(); } else if ( sImageName == u"query" ) { - xRet = Graphic(GetStandardQueryBoxImage().GetBitmapEx()).GetXGraphic(); + xRet = Graphic(GetStandardQueryBoxImage().GetBitmap()).GetXGraphic(); } } return xRet; diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index 6340af708641..98091e7c9c9d 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -35,12 +35,12 @@ Image::Image() Image::Image(const BitmapEx& rBitmapEx) { - ImplInit(rBitmapEx); + ImplInit(Bitmap(rBitmapEx)); } Image::Image(const Bitmap& rBitmap) { - ImplInit(BitmapEx(rBitmap)); + ImplInit(rBitmap); } Image::Image(uno::Reference<graphic::XGraphic> const & rxGraphic) @@ -55,7 +55,7 @@ Image::Image(uno::Reference<graphic::XGraphic> const & rxGraphic) else if (aGraphic.GetType() == GraphicType::GdiMetafile) mpImplData = std::make_shared<ImplImage>(aGraphic.GetGDIMetaFile()); else - ImplInit(aGraphic.GetBitmapEx()); + ImplInit(Bitmap(aGraphic.GetBitmapEx())); } } @@ -68,7 +68,7 @@ Image::Image(const OUString & rFileUrl) { Graphic aGraphic; if (ERRCODE_NONE == GraphicFilter::LoadGraphic(rFileUrl, u"" IMP_PNG ""_ustr, aGraphic)) - ImplInit(aGraphic.GetBitmapEx()); + ImplInit(Bitmap(aGraphic.GetBitmapEx())); } } @@ -77,10 +77,10 @@ Image::Image(StockImage, const OUString & rFileUrl) { } -void Image::ImplInit(const BitmapEx& rBitmapEx) +void Image::ImplInit(const Bitmap& rBitmap) { - if (!rBitmapEx.IsEmpty()) - mpImplData = std::make_shared<ImplImage>(rBitmapEx); + if (!rBitmap.IsEmpty()) + mpImplData = std::make_shared<ImplImage>(rBitmap); } const OUString & Image::GetStock() const @@ -98,12 +98,12 @@ Size Image::GetSizePixel() const return Size(); } -BitmapEx Image::GetBitmapEx() const +Bitmap Image::GetBitmap() const { if (mpImplData) - return mpImplData->getBitmapEx(); + return mpImplData->getBitmap(); else - return BitmapEx(); + return Bitmap(); } void Image::SetOptional(bool bValue) @@ -135,7 +135,7 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle Size aOutSize = pSize ? *pSize : pOutDev->PixelToLogic(mpImplData->getSizePixel()); - BitmapEx aRenderBmp = mpImplData->getBitmapExForHiDPI(bool(nStyle & DrawImageFlags::Disable), pOutDev->GetGraphics()); + Bitmap aRenderBmp = mpImplData->getBitmapForHiDPI(bool(nStyle & DrawImageFlags::Disable), pOutDev->GetGraphics()); if (!(nStyle & DrawImageFlags::Disable) && (nStyle & (DrawImageFlags::ColorTransform | DrawImageFlags::Highlight | @@ -169,7 +169,7 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle aTempBitmapEx = BitmapEx(aTempBitmapEx.GetBitmap(), AlphaMask(aTempBitmapEx.GetSizePixel(), &cErase)); } } - aRenderBmp = aTempBitmapEx; + aRenderBmp = Bitmap(aTempBitmapEx); } pOutDev->DrawBitmapEx(rPos, aOutSize, aRenderBmp); diff --git a/vcl/source/image/ImplImage.cxx b/vcl/source/image/ImplImage.cxx index 4b211e4c5d21..8cc049c13004 100644 --- a/vcl/source/image/ImplImage.cxx +++ b/vcl/source/image/ImplImage.cxx @@ -35,10 +35,10 @@ #include <utility> -ImplImage::ImplImage(const BitmapEx &rBitmapEx) +ImplImage::ImplImage(const Bitmap &rBitmap) : maBitmapChecksum(0) - , maSizePixel(rBitmapEx.GetSizePixel()) - , maBitmapEx(rBitmapEx) + , maSizePixel(rBitmap.GetSizePixel()) + , maBitmap(rBitmap) { } @@ -55,7 +55,7 @@ ImplImage::ImplImage(const GDIMetaFile& rMetaFile) { } -bool ImplImage::loadStockAtScale(SalGraphics* pGraphics, BitmapEx &rBitmapEx) +bool ImplImage::loadStockAtScale(SalGraphics* pGraphics, Bitmap &rBitmap) { BitmapEx aBitmapEx; @@ -105,7 +105,7 @@ bool ImplImage::loadStockAtScale(SalGraphics* pGraphics, BitmapEx &rBitmapEx) return false; } } - rBitmapEx = aBitmapEx; + rBitmap = Bitmap(aBitmapEx); return true; } @@ -116,11 +116,11 @@ Size ImplImage::getSizePixel() aRet = maSizePixel; else if (isStock()) { - if (loadStockAtScale(nullptr, maBitmapEx)) + if (loadStockAtScale(nullptr, maBitmap)) { - assert(maDisabledBitmapEx.IsEmpty()); + assert(maDisabledBitmap.IsEmpty()); assert(maBitmapChecksum == 0); - maSizePixel = maBitmapEx.GetSizePixel(); + maSizePixel = maBitmap.GetSizePixel(); aRet = maSizePixel; } else @@ -130,24 +130,24 @@ Size ImplImage::getSizePixel() } /// non-HiDPI compatibility method. -BitmapEx const & ImplImage::getBitmapEx(bool bDisabled) +Bitmap const & ImplImage::getBitmap(bool bDisabled) { getSizePixel(); // force load, and at unity scale. if (bDisabled) { // Changed since we last generated this. - BitmapChecksum aChecksum = maBitmapEx.GetChecksum(); + BitmapChecksum aChecksum = maBitmap.GetChecksum(); if (maBitmapChecksum != aChecksum || - maDisabledBitmapEx.GetSizePixel() != maBitmapEx.GetSizePixel()) + maDisabledBitmap.GetSizePixel() != maBitmap.GetSizePixel()) { - maDisabledBitmapEx = maBitmapEx; - BitmapFilter::Filter(maDisabledBitmapEx, BitmapDisabledImageFilter()); + maDisabledBitmap = maBitmap; + BitmapFilter::Filter(maDisabledBitmap, BitmapDisabledImageFilter()); maBitmapChecksum = aChecksum; } - return maDisabledBitmapEx; + return maDisabledBitmap; } - return maBitmapEx; + return maBitmap; } void ImplImage::SetOptional(bool bValue) { bOptional = bValue; } @@ -159,10 +159,10 @@ bool ImplImage::isEqual(const ImplImage &ref) const if (isStock()) return maStockName == ref.maStockName; else - return maBitmapEx == ref.maBitmapEx; + return maBitmap == ref.maBitmap; } -BitmapEx const & ImplImage::getBitmapExForHiDPI(bool bDisabled, SalGraphics* pGraphics) +Bitmap const & ImplImage::getBitmapForHiDPI(bool bDisabled, SalGraphics* pGraphics) { if ((isStock() || mxMetaFile) && pGraphics) { // check we have the right bitmap cached. @@ -170,10 +170,10 @@ BitmapEx const & ImplImage::getBitmapExForHiDPI(bool bDisabled, SalGraphics* pGr pGraphics->ShouldDownscaleIconsAtSurface(fScale); Size aTarget(maSizePixel.Width()*fScale, maSizePixel.Height()*fScale); - if (maBitmapEx.GetSizePixel() != aTarget) + if (maBitmap.GetSizePixel() != aTarget) { if (isStock()) - loadStockAtScale(pGraphics, maBitmapEx); + loadStockAtScale(pGraphics, maBitmap); else // if (mxMetaFile) { ScopedVclPtrInstance<VirtualDevice> aVDev(DeviceFormat::WITH_ALPHA); @@ -188,11 +188,11 @@ BitmapEx const & ImplImage::getBitmapExForHiDPI(bool bDisabled, SalGraphics* pGr aVDev->SetOutputSizePixel(aTarget, true, bAlphaMaskTransparent); mxMetaFile->WindStart(); mxMetaFile->Play(*aVDev, Point(), aTarget); - maBitmapEx = aVDev->GetBitmap(Point(), aTarget); + maBitmap = aVDev->GetBitmap(Point(), aTarget); } } } - return getBitmapEx(bDisabled); + return getBitmap(bDisabled); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx index fe3e02e0acf9..ac51f7652693 100644 --- a/vcl/source/treelist/iconview.cxx +++ b/vcl/source/treelist/iconview.cxx @@ -234,7 +234,7 @@ FactoryFunction IconView::GetUITestFactory() const { return IconViewUIObject::cr static OString extractPngString(const SvLBoxContextBmp* pBmpItem) { - BitmapEx aImage = pBmpItem->GetBitmap1().GetBitmapEx(); + Bitmap aImage = pBmpItem->GetBitmap1().GetBitmap(); SvMemoryStream aOStm(65535, 65535); // Use fastest compression "1" css::uno::Sequence<css::beans::PropertyValue> aFilterData{ diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index c59bc44c1e4f..12c5c203141c 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -120,8 +120,8 @@ static void lcl_DumpEntryAndSiblings(tools::JsonWriter& rJsonWriter, // custom bitmap - send png else { - BitmapEx aCollapsedImage = pBmpItem->GetBitmap1().GetBitmapEx(); - BitmapEx aExpandedImage = pBmpItem->GetBitmap2().GetBitmapEx(); + BitmapEx aCollapsedImage(pBmpItem->GetBitmap1().GetBitmap()); + BitmapEx aExpandedImage(pBmpItem->GetBitmap2().GetBitmap()); bool bHasCollapsed = !aCollapsedImage.IsEmpty() && !aCollapsedImage.GetSizePixel().IsEmpty(); bool bHasExpanded = !aExpandedImage.IsEmpty() && !aExpandedImage.GetSizePixel().IsEmpty(); if (bHasCollapsed || bHasExpanded) diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 086664c127a1..dc9c39421a35 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -94,7 +94,7 @@ void DecoToolBox::SetImages( tools::Long nMaxHeight, bool bForce ) lastSize = nMaxHeight - border; Color aEraseColor( ColorTransparency, 255, 255, 255, 255 ); - BitmapEx aBmpExDst( maImage.GetBitmapEx() ); + BitmapEx aBmpExDst( maImage.GetBitmap() ); BitmapEx aBmpExSrc( aBmpExDst ); aEraseColor.SetAlpha( 0 ); diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 6a50c9beb656..2392257e0ec6 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -954,20 +954,20 @@ void* ToolBox::GetItemData( ToolBoxItemId nItemId ) const static Image ImplMirrorImage( const Image& rImage ) { - BitmapEx aMirrBitmapEx( rImage.GetBitmapEx() ); + Bitmap aMirrBitmap( rImage.GetBitmap() ); - aMirrBitmapEx.Mirror( BmpMirrorFlags::Horizontal ); + aMirrBitmap.Mirror( BmpMirrorFlags::Horizontal ); - return Image( aMirrBitmapEx ); + return Image( aMirrBitmap ); } static Image ImplRotImage( const Image& rImage, Degree10 nAngle10 ) { - BitmapEx aRotBitmapEx( rImage.GetBitmapEx() ); + Bitmap aRotBitmap( rImage.GetBitmap() ); - aRotBitmapEx.Rotate( nAngle10, COL_WHITE ); + aRotBitmap.Rotate( nAngle10, COL_WHITE ); - return Image( aRotBitmapEx ); + return Image( aRotBitmap ); } void ToolBox::SetItemImage( ToolBoxItemId nItemId, const Image& rImage ) @@ -1775,7 +1775,7 @@ void ToolBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) if (!!aImage) { SvMemoryStream aOStm(6535, 6535); - if (GraphicConverter::Export(aOStm, aImage.GetBitmapEx(), + if (GraphicConverter::Export(aOStm, aImage.GetBitmap(), ConvertDataFormat::PNG) == ERRCODE_NONE) { diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 650436db5299..559e010a2b87 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -4755,9 +4755,9 @@ namespace { Image mirrorImage(const Image& rImage) { - BitmapEx aMirrBitmapEx(rImage.GetBitmapEx()); - aMirrBitmapEx.Mirror(BmpMirrorFlags::Horizontal); - return Image(aMirrBitmapEx); + Bitmap aMirrBitmap(rImage.GetBitmap()); + aMirrBitmap.Mirror(BmpMirrorFlags::Horizontal); + return Image(aMirrBitmap); } GdkPixbuf* getPixbuf(const css::uno::Reference<css::graphic::XGraphic>& rImage) @@ -4773,10 +4773,10 @@ namespace // We "know" that this gets passed to zlib's deflateInit2_(). 1 means best speed. css::uno::Sequence<css::beans::PropertyValue> aFilterData{ comphelper::makePropertyValue( u"Compression"_ustr, sal_Int32(1)) }; - auto aBitmapEx = aImage.GetBitmapEx(); + auto aBitmap = aImage.GetBitmap(); vcl::PngImageWriter aWriter(aMemStm); aWriter.setParameters(aFilterData); - aWriter.write(aBitmapEx); + aWriter.write(aBitmap); return load_icon_from_stream(aMemStm); } @@ -4800,10 +4800,10 @@ namespace // We "know" that this gets passed to zlib's deflateInit2_(). 1 means best speed. css::uno::Sequence<css::beans::PropertyValue> aFilterData{ comphelper::makePropertyValue( u"Compression"_ustr, sal_Int32(1)) }; - auto aBitmapEx = aImage.GetBitmapEx(); + auto aBitmap = aImage.GetBitmap(); vcl::PngImageWriter aWriter(*pStream); aWriter.setParameters(aFilterData); - aWriter.write(aBitmapEx); + aWriter.write(aBitmap); xRet->CloseStream(); return xRet; diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx index 1500b86cf846..4ec62d42550d 100644 --- a/vcl/unx/gtk3/gtksalmenu.cxx +++ b/vcl/unx/gtk3/gtksalmenu.cxx @@ -809,9 +809,9 @@ bool GtkSalMenu::AddMenuBarButton(const SalMenuButtonItem& rNewItem) if (!!rNewItem.maImage) { SvMemoryStream* pMemStm = new SvMemoryStream; - auto aBitmapEx = rNewItem.maImage.GetBitmapEx(); + auto aBitmap = rNewItem.maImage.GetBitmap(); vcl::PngImageWriter aWriter(*pMemStm); - aWriter.write(aBitmapEx); + aWriter.write(aBitmap); GBytes *pBytes = g_bytes_new_with_free_func(pMemStm->GetData(), pMemStm->TellEnd(), @@ -1199,9 +1199,9 @@ void GtkSalMenu::NativeSetItemIcon( unsigned nSection, unsigned nItemPos, const if (!!rImage) { SvMemoryStream* pMemStm = new SvMemoryStream; - auto aBitmapEx = rImage.GetBitmapEx(); + auto aBitmap = rImage.GetBitmap(); vcl::PngImageWriter aWriter(*pMemStm); - aWriter.write(aBitmapEx); + aWriter.write(aBitmap); GBytes *pBytes = g_bytes_new_with_free_func(pMemStm->GetData(), pMemStm->TellEnd(), diff --git a/vcl/win/window/salmenu.cxx b/vcl/win/window/salmenu.cxx index afb69de605a5..fbf6b508a3a9 100644 --- a/vcl/win/window/salmenu.cxx +++ b/vcl/win/window/salmenu.cxx @@ -78,7 +78,7 @@ std::unique_ptr<SalMenuItem> WinSalInstance::CreateMenuItem( const SalItemParams // item pSalMenuItem->mText = rItemData.aText; pSalMenuItem->mpMenu = rItemData.pMenu; - pSalMenuItem->maBitmap= !!rItemData.aImage ? rItemData.aImage.GetBitmapEx().GetBitmap() : Bitmap(); + pSalMenuItem->maBitmap= !!rItemData.aImage ? rItemData.aImage.GetBitmap() : Bitmap(); pSalMenuItem->mnId = rItemData.nId; // 'translate' mnemonics @@ -248,7 +248,7 @@ void WinSalMenu::SetItemImage( unsigned /*nPos*/, SalMenuItem* pSalMenuItem, con { WinSalMenuItem* pWItem = static_cast<WinSalMenuItem*>(pSalMenuItem); if( !!rImage ) - pWItem->maBitmap = rImage.GetBitmapEx().GetBitmap(); + pWItem->maBitmap = rImage.GetBitmap(); else pWItem->maBitmap = Bitmap(); }