From e6211a4b3bd74f2bf392fd5cda7dea51552cd250 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 25 Aug 2025 08:37:12 +0200 Subject: [PATCH] BitmapEx->Bitmap in various now that Bitmap supports transparency Change-Id: If946687832cf30db70db9749e5aeed38ab1490c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190149 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cui/source/dialogs/AdditionsDialog.cxx | 2 +- cui/source/dialogs/cuigrfflt.cxx | 48 +++++++++--------- cui/source/dialogs/tipofthedaydlg.cxx | 6 +-- cui/source/dialogs/uitabpage.cxx | 2 +- cui/source/tabpages/numpages.cxx | 4 +- cui/source/tabpages/tpbitmap.cxx | 8 +-- cui/source/tabpages/tpline.cxx | 2 +- filter/source/graphic/GraphicExportFilter.cxx | 2 +- filter/source/msfilter/svdfppt.cxx | 2 +- filter/source/pdf/pdfexport.cxx | 2 +- .../source/fwe/classes/addonsoptions.cxx | 10 ++-- .../uiconfiguration/imagemanagerimpl.cxx | 2 +- .../imagebuttontoolbarcontroller.cxx | 8 +-- reportdesign/qa/unit/data/roundTrip.odb | Bin 22046 -> 22234 bytes sfx2/source/control/thumbnailview.cxx | 6 +-- sfx2/source/dialog/filedlghelper.cxx | 2 +- svgio/source/svgreader/svgfeimagenode.cxx | 14 ++--- svgio/source/svgreader/svgimagenode.cxx | 18 +++---- svtools/source/filter/exportdialog.cxx | 6 +-- svx/source/core/graphichelper.cxx | 6 +-- .../sdr/primitive2d/sdrattributecreator.cxx | 2 +- svx/source/svdraw/svdfmtf.cxx | 14 ++--- toolkit/source/awt/vclxwindows.cxx | 6 +-- .../source/controls/tree/treecontrolpeer.cxx | 2 +- 24 files changed, 87 insertions(+), 87 deletions(-) diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx index f2a81c1abaef..d535c6acf910 100644 --- a/cui/source/dialogs/AdditionsDialog.cxx +++ b/cui/source/dialogs/AdditionsDialog.cxx @@ -238,7 +238,7 @@ void LoadImage(std::u16string_view rPreviewFile, std::shared_ptr // for VCL to be able to create bitmaps / do visual changes in the thread aFilter.ImportGraphic(aGraphic, aURLObj); - BitmapEx aBmp = aGraphic.GetBitmapEx(); + Bitmap aBmp = aGraphic.GetBitmap(); Size aBmpSize = aBmp.GetSizePixel(); Size aThumbSize(pCurrentItem->m_xImageScreenshot->get_size_request()); if (!aBmp.IsEmpty()) diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index fbd1360c5fe3..fb2f80ac342d 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -106,10 +106,10 @@ void CuiGraphicPreviewWindow::ScaleImageToFit() if( !mpOrigGraphic->IsAnimated() ) { - BitmapEx aBmpEx( mpOrigGraphic->GetBitmapEx() ); + Bitmap aBmp( mpOrigGraphic->GetBitmap() ); - if( aBmpEx.Scale( aGrfSize ) ) - maScaledOrig = aBmpEx; + if( aBmp.Scale( aGrfSize ) ) + maScaledOrig = aBmp; } } @@ -208,14 +208,14 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic, } else { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + Bitmap aBmp( rGraphic.GetBitmap() ); - if (BitmapFilter::Filter(aBmpEx, BitmapMosaicFilter(aSize.getWidth(), aSize.getHeight()))) + if (BitmapFilter::Filter(aBmp, BitmapMosaicFilter(aSize.getWidth(), aSize.getHeight()))) { if( IsEnhanceEdges() ) - BitmapFilter::Filter(aBmpEx, BitmapSharpenFilter()); + BitmapFilter::Filter(aBmp, BitmapSharpenFilter()); - aRet = aBmpEx; + aRet = aBmp; } } @@ -252,11 +252,11 @@ Graphic GraphicFilterSmooth::GetFilteredGraphic( const Graphic& rGraphic, double } else { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + Bitmap aBmp( rGraphic.GetBitmap() ); - if (BitmapFilter::Filter(aBmpEx, BitmapSmoothenFilter(nRadius))) + if (BitmapFilter::Filter(aBmp, BitmapSmoothenFilter(nRadius))) { - aRet = aBmpEx; + aRet = aBmp; } } @@ -305,14 +305,14 @@ Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, doub } else { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + Bitmap aBmp( rGraphic.GetBitmap() ); - if (BitmapFilter::Filter(aBmpEx, BitmapSolarizeFilter(nGreyThreshold))) + if (BitmapFilter::Filter(aBmp, BitmapSolarizeFilter(nGreyThreshold))) { if( IsInvert() ) - aBmpEx.Invert(); + aBmp.Invert(); - aRet = aBmpEx; + aRet = aBmp; } } @@ -347,10 +347,10 @@ Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic, double, } else { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + Bitmap aBmp( rGraphic.GetBitmap() ); - if (BitmapFilter::Filter(aBmpEx, BitmapSepiaFilter(nSepiaPct))) - aRet = aBmpEx; + if (BitmapFilter::Filter(aBmp, BitmapSepiaFilter(nSepiaPct))) + aRet = aBmp; } return aRet; @@ -361,7 +361,7 @@ GraphicFilterPoster::GraphicFilterPoster(weld::Window* pParent, const Graphic& r : GraphicFilterDialog(pParent, u"cui/ui/posterdialog.ui"_ustr, u"PosterDialog"_ustr, rGraphic) , mxNumPoster(m_xBuilder->weld_spin_button(u"value"_ustr)) { - mxNumPoster->set_range(2, vcl::pixelFormatBitCount(rGraphic.GetBitmapEx().getPixelFormat())); + mxNumPoster->set_range(2, vcl::pixelFormatBitCount(rGraphic.GetBitmap().getPixelFormat())); mxNumPoster->set_value(nPosterCount); mxNumPoster->connect_value_changed(LINK(this, GraphicFilterPoster, EditModifyHdl)); } @@ -385,10 +385,10 @@ Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic, double } else { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + Bitmap aBmp( rGraphic.GetBitmap() ); - if (BitmapFilter::Filter(aBmpEx, BitmapColorQuantizationFilter(nPosterCount))) - aRet = aBmpEx; + if (BitmapFilter::Filter(aBmp, BitmapColorQuantizationFilter(nPosterCount))) + aRet = aBmp; } return aRet; @@ -456,10 +456,10 @@ Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic, double } else { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + Bitmap aBmp( rGraphic.GetBitmap() ); - if (BitmapFilter::Filter(aBmpEx, BitmapEmbossGreyFilter(nAzim, nElev))) - aRet = aBmpEx; + if (BitmapFilter::Filter(aBmp, BitmapEmbossGreyFilter(nAzim, nElev))) + aRet = aBmp; } return aRet; diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index 8424b58f55dc..44e7390808fc 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -241,9 +241,9 @@ void TipOfTheDayDialog::UpdateTip() if (!aGraphic.IsAnimated()) { - BitmapEx aBmpEx(aGraphic.GetBitmapEx()); - if (aBmpEx.Scale(ThumbSize)) - aGraphic = aBmpEx; + Bitmap aBmp(aGraphic.GetBitmap()); + if (aBmp.Scale(ThumbSize)) + aGraphic = aBmp; } m_aPreview.SetPreview(aGraphic); } diff --git a/cui/source/dialogs/uitabpage.cxx b/cui/source/dialogs/uitabpage.cxx index b6bf2fb1191c..5d30f1ea427c 100644 --- a/cui/source/dialogs/uitabpage.cxx +++ b/cui/source/dialogs/uitabpage.cxx @@ -154,7 +154,7 @@ void UITabPage::UpdateImage(std::u16string_view sFileName) { ScopedVclPtr m_pVirDev = m_pImage->create_virtual_device(); m_pVirDev->SetOutputSizePixel(aGraphic.GetSizePixel()); - m_pVirDev->DrawBitmapEx(Point(0, 0), aGraphic.GetBitmapEx()); + m_pVirDev->DrawBitmapEx(Point(0, 0), aGraphic.GetBitmap()); m_pImage->set_image(m_pVirDev.get()); m_pVirDev.disposeAndClear(); } diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 7494bb858bdd..8249773eb115 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1031,7 +1031,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, weld::Button&, voi Graphic aGraphic; GraphicConverter::Import( *pIn, aGraphic ); - BitmapEx aBitmap = aGraphic.GetBitmapEx(); + Bitmap aBitmap = aGraphic.GetBitmap(); tools::Long nPixelX = aBitmap.GetSizePixel().Width(); tools::Long nPixelY = aBitmap.GetSizePixel().Height(); double ratio = nPixelY/static_cast(nPixelX); @@ -2036,7 +2036,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl, weld::Toggleable&, } if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, i, &aGraphic)) { - BitmapEx aBitmap(aGraphic.GetBitmapEx()); + Bitmap aBitmap(aGraphic.GetBitmap()); Size aSize(aBitmap.GetSizePixel()); if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 8dc676f5a23d..c9867a9dfac4 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -315,8 +315,8 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) std::unique_ptr pGraphicObject; pGraphicObject.reset( new GraphicObject(aItem.GetGraphicObject()) ); - BitmapEx aBmpEx(pGraphicObject->GetGraphic().GetBitmapEx()); - Size aTempBitmapSize = aBmpEx.GetSizePixel(); + Bitmap aBmp(pGraphicObject->GetGraphic().GetBitmap()); + Size aTempBitmapSize = aBmp.GetSizePixel(); rBitmapSize = Application::GetDefaultDevice()->PixelToLogic(aTempBitmapSize, MapMode(MapUnit::Map100thMM)); CalculateBitmapPresetSize(); @@ -541,8 +541,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, ValueSet*, void) if(pGraphicObject) { - BitmapEx aBmpEx(pGraphicObject->GetGraphic().GetBitmapEx()); - Size aTempBitmapSize = aBmpEx.GetSizePixel(); + Bitmap aBmp(pGraphicObject->GetGraphic().GetBitmap()); + Size aTempBitmapSize = aBmp.GetSizePixel(); const double fUIScale = mpView ? double(mpView->GetModel().GetUIScale()) : 1.0; Size aBitmapSize100mm = o3tl::convert(aTempBitmapSize, o3tl::Length::pt, o3tl::Length::mm100); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index f16428c2b85f..7210c9e78647 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -1410,7 +1410,7 @@ void SvxLineTabPage::PopulateMenus() if(pGraphic) { - BitmapEx aBitmap(pGraphic->GetBitmapEx()); + Bitmap aBitmap(pGraphic->GetBitmap()); Size aSize(aBitmap.GetSizePixel()); if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx index f07d7fbf80e6..b6b670de01d9 100644 --- a/filter/source/graphic/GraphicExportFilter.cxx +++ b/filter/source/graphic/GraphicExportFilter.cxx @@ -188,7 +188,7 @@ bool GraphicExportFilter::filterRenderDocument() const SvMemoryStream aMemStream; const GraphicConversionParameters aParameters(aTargetSizePixel, true, true); - const ErrCode nResult = rFilter.ExportGraphic( aGraphic.GetBitmapEx(aParameters), u"", aMemStream, + const ErrCode nResult = rFilter.ExportGraphic( aGraphic.GetBitmap(aParameters), u"", aMemStream, nFilterFormat, &maFilterDataSequence ); if ( nResult == ERRCODE_NONE ) diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 76395bb73b1f..b6b8365f50cc 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5620,7 +5620,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T Graphic aGraf; if ( rManager.GetBLIP( rManager.GetPropertyValue( DFF_Prop_fillBlip, 0 ), aGraf ) ) { - Bitmap aBmp( aGraf.GetBitmapEx().GetBitmap() ); + Bitmap aBmp( aGraf.GetBitmap().CreateColorBitmap() ); Size aSize( aBmp.GetSizePixel() ); if ( aSize.Width() && aSize.Height() ) { diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 4f7d9f740563..53b21902ba4d 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -199,7 +199,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, { Graphic aGraph(aMtf); // use antialiasing to improve how graphic objects look - BitmapEx bmp = aGraph.GetBitmapEx(GraphicConversionParameters(Size(0, 0), false, true, false)); + Bitmap bmp = aGraph.GetBitmap(GraphicConversionParameters(Size(0, 0), false, true, false)); Graphic bgraph(bmp); aMtf = bgraph.GetGDIMetaFile(); } diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 2dd3f6d33b1a..5286a5af9047 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -1569,16 +1569,16 @@ Bitmap AddonsOptions_Impl::ReadImageFromURL(const OUString& aImageURL) GraphicFilter& rGF = GraphicFilter::GetGraphicFilter(); rGF.ImportGraphic( aGraphic, u"", *pStream ); - BitmapEx aBitmapEx = aGraphic.GetBitmapEx(); + Bitmap aBitmap = aGraphic.GetBitmap(); - Size aBmpSize = aBitmapEx.GetSizePixel(); + Size aBmpSize = aBitmap.GetSizePixel(); if ( !aBmpSize.IsEmpty() ) { // Support non-transparent bitmaps to be downward compatible with OOo 1.1.x addons - if( !aBitmapEx.IsAlpha() ) - aBitmapEx = BitmapEx( aBitmapEx.GetBitmap(), COL_LIGHTMAGENTA ); + if( !aBitmap.HasAlpha() ) + aBitmap = Bitmap(BitmapEx( aBitmap.CreateColorBitmap(), COL_LIGHTMAGENTA )); - aImage = Bitmap(aBitmapEx); + aImage = aBitmap; } } diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index 86b450afd86c..ec01e66b81f1 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -231,7 +231,7 @@ static bool implts_checkAndScaleGraphic( uno::Reference< XGraphic >& rOutGraphic Graphic aImage(rInGraphic); if (BITMAP_SIZE[nImageType] != aImage.GetSizePixel()) { - BitmapEx aBitmap = aImage.GetBitmapEx(); + Bitmap aBitmap = aImage.GetBitmap(); aBitmap.Scale(BITMAP_SIZE[nImageType]); aImage = Graphic(aBitmap); rOutGraphic = aImage.GetXGraphic(); diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx index 206942d8d8de..40e3d230604e 100644 --- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx @@ -124,17 +124,17 @@ bool ImageButtonToolbarController::ReadImageFromURL( bool bBigImage, const OUStr GraphicFilter& rGF = GraphicFilter::GetGraphicFilter(); rGF.ImportGraphic( aGraphic, u"", *pStream ); - BitmapEx aBitmapEx = aGraphic.GetBitmapEx(); + Bitmap aBitmap = aGraphic.GetBitmap(); const ::Size aSize = bBigImage ? aImageSizeBig : aImageSizeSmall; // Sizes used for toolbar images - ::Size aBmpSize = aBitmapEx.GetSizePixel(); + ::Size aBmpSize = aBitmap.GetSizePixel(); if ( !aBmpSize.IsEmpty() ) { ::Size aNoScaleSize( aBmpSize.Width(), aSize.Height() ); if ( aBmpSize != aNoScaleSize ) - aBitmapEx.Scale( aNoScaleSize, BmpScaleFlag::BestQuality ); - aImage = Image( aBitmapEx ); + aBitmap.Scale( aNoScaleSize, BmpScaleFlag::BestQuality ); + aImage = Image( aBitmap ); return true; } diff --git a/reportdesign/qa/unit/data/roundTrip.odb b/reportdesign/qa/unit/data/roundTrip.odb index c3e818ec9e327c0ea960719539f11655e13bb241..5e9eb78ebb28aaa2782b70358940b2777b7c2ea5 100644 GIT binary patch delta 1361 zcmbQYhVj-~M&1B#W)=|!1`Y-WGaJc?yk5*eYGV{DBZ!`y#AsOW)F=Fkt%PIC1?Osw zcX!t;-MTqsT8t;(j`;Y8Dt@t5bIqmBo_n^msy@|UU}0m!o10}R6QAyR()3*E_8!aA zeaXkSRjbMIyB6Mf8&SH(?nYS7_nVqEl6MPOU$vBav%Ow$V8NN|Pqf79Lw@aBSmb-| z1+%4g@xKE{n_}!8mK^)@>}mbn?3_fCjegTryyvh@DW0`YvL|?cv8UwUj`FRuXP>C? z-1H=CuGr2Q(FTcy*8Z6a2LHo3PF)sweeI{*B9X}VCR`e?JuGE%xdJk0z3@Ehy>sWsU+3imyxBQQA4xC$&cML1i;;l=6gHe93>+LB z;J}HJn!K6mg%Fe*4O9dLlh-mIt!L-R2(kLR0VuQrsuiviNht#Z4^Tx)Vo73BVsWZ| zPJa63>qTZ)F7cP~26FI!;wkJcFZ^2A6JqdysnepZ?T7X6-@mHbGx9av6pPC%uqa`zU zOZ#!At!_fDy4zhYvFQ}{Xz*?dS(EEvRb)4R@;o2$`t$c16BZx*kk`SrXjPZ7f;yLN zW}&cb^okt~H~h_SCo_g>yR2DRtu3%G;(DR*f+r?r(Y&mSqPWlfYWfg0&2vBd$;{U$ zyP_N_Jb3px-dcM|`;=W&Eo1G{WoG-V9$VZfEY&rR*8{>neA_Ef41Kclz$R zuE$}OZ-0lEU#LFKYu7o`$%zo{? z%OcU+MGgL)t8MoA+H}s4*TTv$Ny~jsFx#((*&nYS$Prtl>p%0?-wGFw<)t%D22XD7 zNE1_=b@R)`FC6u(&*nLDpITu3M)w};<8rn9jJN&?k^kAH6f7zyI8{7L+%&oUgrD8t z^%2C-H(}fRRar0iKU0fAlp5 zXCQSyD_&p(M8i|nv-fN^I4G=U#TBS7!ugML!VuvCVesDKtBfoYTf z`AIm!)FGz_P!dCcMi$frhwfHce`&^dlP&#?nS@v;=lNT(h_Nv+OlAxeRRWg@D2Z19 zVJwiP!ZrD!zYS9m*W?eJQj@cTcqY3B$T7w8PX5g!Gr7iJV6p_i05?KM$K*8u&P@7( zlRpNyGWm&5ej_G5xi*w%a(tj1AZNzb$x6W?OuagjwRIrI%nz1hVl|q)KiHLV+GN%cccz1u zljAKR?gCkHX7c0^XQmRn$u~k=7^h5@4RvO6aGre638Y(#$;fN+1y7LG94fFNMUG%m bgg1b!LZ8VWL*@At7!(*1fF);&A4nDet@X`q delta 1177 zcmZ9MdrXs86u`glqlMbim0?>*L6E8y%0oIx7>Euj2ox!Wmb$>EyeSV0NC5-bg5Yq# zrt^Rk1~`W61_JUZ&1!TiipZ3=kYO?mVBBO*7)X~Dl(obN+5P9-bMMW$$?td1ecX!H zx1eM}un~@mAOr;27f1Vw%rnx5jz~Oeh!Bf%6g|gN=Zs|p)i8HYuco|PrT+St^NtUS zUj6AQZ7rpGRw4B6S{UF9jG(P3rInlg$)r2DxcC75r?TI3Vo++Cvm8&eYa#p{79 zdleqP_M|oPJ_@>U!Y0fm`B`H75rxaH1XH)EacMHMx8~`6N1$siMzxR4X^TdEqSvmv zKKF?ewNi}ys*{R69+@+q7tqZra6cbfL9hv7WOn&|ErK8#6hYR}5D)@^U|`c#gJGz-J~Jdy5|P*IcKx{@QD`&jC2eBZ zwSsfQ8|Za$h&e5F4!rG=!n3e|7oJSP+^k+3ieC(_T}u@*8;F zotFpCP8CHr-d=b~qxnV9l6?5oywMq!ms*gCcGybQeOR;j%*Voi#M=ux+Gd$P{mC!X z45D8*y>=Nt-R%T&^7*j|pmi56oMRLetG+pXxbmb*hv|4B#|pCVWwy`GMJE1~GnOdC!*${T`uwTC_kxE?YocsfGa{SSdIx$hxlZynDcq#dljr-o*DJ z8$7-92@8DpPYf$pNa;fl_2yjl6)5_+F)ANP)n1yeFT%CR%iw+hq~b^aR>sOFlz`DFl;X35hN~MDoc>cTuvNI+o-H<6bmb$gtO6L@CxT* zOWQyZeh{^Rd*S}51DFc^F?SXWvaBIp$VQJsjgX6(u%UtN00a>mqc}m6lNE&Or==XQ z`@jl3#irmIfdi$8fm*_CQ2@sEgx@?Furq><@*y;Wi)r`4x%~`ii(q5)1JHiJ5+o63 zfQcDck1yDW{V`P#@OjoSB_iy6+c;61ebF`{Ly)ClXcgPOXN%Y(Ed38O6Jpr?50jCv AegFUf diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 94cf4cd8b731..d39b80a57623 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -175,17 +175,17 @@ Bitmap ThumbnailView::readThumbnail(const OUString &msURL) } // Extract the image from the stream. - BitmapEx aThumbnail; + Bitmap aThumbnail; if (auto pStream = utl::UcbStreamHelper::CreateStream(xIStream, /*CloseStream=*/true)) { Graphic aGraphic = GraphicFilter::GetGraphicFilter().ImportUnloadedGraphic(*pStream); - aThumbnail = aGraphic.GetBitmapEx(); + aThumbnail = aGraphic.GetBitmap(); } // Note that the preview is returned without scaling it to the desired // width. This gives the caller the chance to take advantage of a // possibly larger resolution then was asked for. - return Bitmap(aThumbnail); + return aThumbnail; } ThumbnailView::ThumbnailView(std::unique_ptr xWindow, std::unique_ptr xMenu) diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 3daaab04054a..c65d8d1fefa5 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -735,7 +735,7 @@ IMPL_LINK_NOARG(FileDialogHelper_Impl, TimeOutHdl_Impl, Timer *, void) // is responsible for placing it at its // proper position and painting a frame - BitmapEx aBmp = maGraphic.GetBitmapEx(); + Bitmap aBmp = maGraphic.GetBitmap(); if ( !aBmp.IsEmpty() ) { // scale the bitmap to the correct size diff --git a/svgio/source/svgreader/svgfeimagenode.cxx b/svgio/source/svgreader/svgfeimagenode.cxx index 89eb5fbda669..2ae59a3511d2 100644 --- a/svgio/source/svgreader/svgfeimagenode.cxx +++ b/svgio/source/svgreader/svgfeimagenode.cxx @@ -74,7 +74,7 @@ void SvgFeImageNode::parseAttribute(SVGToken aSVGToken, const OUString& aContent void SvgFeImageNode::apply(drawinglayer::primitive2d::Primitive2DContainer& rTarget, const SvgFilterNode* pParent) const { - BitmapEx aBitmapEx; + Bitmap aBitmap; if (!maData.isEmpty()) { @@ -90,7 +90,7 @@ void SvgFeImageNode::apply(drawinglayer::primitive2d::Primitive2DContainer& rTar if (ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, u"", aStream)) { - aBitmapEx = aGraphic.GetBitmapEx(); + aBitmap = aGraphic.GetBitmap(); } } } @@ -115,20 +115,20 @@ void SvgFeImageNode::apply(drawinglayer::primitive2d::Primitive2DContainer& rTar if (ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, aAbsUrl, aStream)) { - aBitmapEx = aGraphic.GetBitmapEx(); + aBitmap = aGraphic.GetBitmap(); } } } - if (!aBitmapEx.IsEmpty() && 0 != aBitmapEx.GetSizePixel().Width() - && 0 != aBitmapEx.GetSizePixel().Height()) + if (!aBitmap.IsEmpty() && 0 != aBitmap.GetSizePixel().Width() + && 0 != aBitmap.GetSizePixel().Height()) { basegfx::B2DRange aViewBox = rTarget.getB2DRange(drawinglayer::geometry::ViewInformation2D()); const drawinglayer::primitive2d::Primitive2DReference xRef( new drawinglayer::primitive2d::BitmapPrimitive2D( - Bitmap(aBitmapEx), basegfx::utils::createScaleTranslateB2DHomMatrix( - aViewBox.getRange(), aViewBox.getMinimum()))); + aBitmap, basegfx::utils::createScaleTranslateB2DHomMatrix(aViewBox.getRange(), + aViewBox.getMinimum()))); rTarget = drawinglayer::primitive2d::Primitive2DContainer{ xRef }; } diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx index 88b469553251..de5a27149ce9 100644 --- a/svgio/source/svgreader/svgimagenode.cxx +++ b/svgio/source/svgreader/svgimagenode.cxx @@ -156,7 +156,7 @@ namespace svgio::svgreader const Graphic& rGraphic, drawinglayer::primitive2d::Primitive2DContainer& rEmbedded, basegfx::B2DRange& rViewBox, - BitmapEx& rBitmapEx) + Bitmap& rBitmap) { if(GraphicType::Bitmap == rGraphic.GetType()) { @@ -171,13 +171,13 @@ namespace svgio::svgreader else { // get bitmap - rBitmapEx = rGraphic.GetBitmapEx(); + rBitmap = rGraphic.GetBitmap(); } } else { // evtl. convert to bitmap - rBitmapEx = rGraphic.GetBitmapEx(); + rBitmap = rGraphic.GetBitmap(); } } @@ -195,7 +195,7 @@ namespace svgio::svgreader if(fWidth <= 0.0 || fHeight <= 0.0) return; - BitmapEx aBitmapEx; + Bitmap aBitmap; drawinglayer::primitive2d::Primitive2DContainer aNewTarget; // prepare Target and ViewBox for evtl. AspectRatio mappings @@ -220,7 +220,7 @@ namespace svgio::svgreader u"", aStream)) { - extractFromGraphic(aGraphic, aNewTarget, aViewBox, aBitmapEx); + extractFromGraphic(aGraphic, aNewTarget, aViewBox, aBitmap); } } } @@ -247,7 +247,7 @@ namespace svgio::svgreader aAbsUrl, aStream)) { - extractFromGraphic(aGraphic, aNewTarget, aViewBox, aBitmapEx); + extractFromGraphic(aGraphic, aNewTarget, aViewBox, aBitmap); } } } @@ -266,10 +266,10 @@ namespace svgio::svgreader } } - if(!aBitmapEx.IsEmpty() && 0 != aBitmapEx.GetSizePixel().Width() && 0 != aBitmapEx.GetSizePixel().Height()) + if(!aBitmap.IsEmpty() && 0 != aBitmap.GetSizePixel().Width() && 0 != aBitmap.GetSizePixel().Height()) { // calculate centered unit size - const double fAspectRatio = static_cast(aBitmapEx.GetSizePixel().Width()) / static_cast(aBitmapEx.GetSizePixel().Height()); + const double fAspectRatio = static_cast(aBitmap.GetSizePixel().Width()) / static_cast(aBitmap.GetSizePixel().Height()); if (basegfx::fTools::equalZero(fAspectRatio)) { @@ -301,7 +301,7 @@ namespace svgio::svgreader // as transformation to map the picture data correctly aNewTarget.resize(1); aNewTarget[0] = new drawinglayer::primitive2d::BitmapPrimitive2D( - Bitmap(aBitmapEx), + aBitmap, basegfx::utils::createScaleTranslateB2DHomMatrix( aViewBox.getRange(), aViewBox.getMinimum())); diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index c876c6fa8e3c..9216c8a4004a 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -461,10 +461,10 @@ void ExportDialog::GetGraphicStream() ( ( maSize.Width != aSizePixel.Width() ) || ( maSize.Height != aSizePixel.Height() ) ) ) { - BitmapEx aBmpEx( aGraphic.GetBitmapEx() ); + Bitmap aBmp( aGraphic.GetBitmap() ); // export: use highest quality - aBmpEx.Scale( Size( maSize.Width, maSize.Height ), BmpScaleFlag::Lanczos ); - aGraphic = aBmpEx; + aBmp.Scale( Size( maSize.Width, maSize.Height ), BmpScaleFlag::Lanczos ); + aGraphic = aBmp; } } diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx index 87e1cb9f1223..cf03d23ca3b2 100644 --- a/svx/source/core/graphichelper.cxx +++ b/svx/source/core/graphichelper.cxx @@ -310,10 +310,10 @@ OUString GraphicHelper::ExportGraphic(weld::Window* pParent, const Graphic& rGra ( ( nWidth != aSizePixel.Width() ) || ( nHeight != aSizePixel.Height() ) ) ) { - BitmapEx aBmpEx( aGraphic.GetBitmapEx() ); + Bitmap aBmp( aGraphic.GetBitmap() ); // export: use highest quality - aBmpEx.Scale( Size( nWidth, nHeight ), BmpScaleFlag::Lanczos ); - aGraphic = aBmpEx; + aBmp.Scale( Size( nWidth, nHeight ), BmpScaleFlag::Lanczos ); + aGraphic = aBmp; } XOutBitmap::WriteGraphic( aGraphic, sPath, aFilter, diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 454e5e08e095..7ef72bd4abf2 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -726,7 +726,7 @@ namespace drawinglayer::primitive2d // if there is no logical size, create a size from pixel size and set MapMode accordingly if(GraphicType::Bitmap == aGraphic.GetType()) { - aGraphic.SetPrefSize(aGraphic.GetBitmapEx().GetSizePixel()); + aGraphic.SetPrefSize(aGraphic.GetBitmap().GetSizePixel()); aGraphic.SetPrefMapMode(MapMode(MapUnit::MapPixel)); aPrefSize = aGraphic.GetPrefSize(); } diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 737f9d7dbf0c..f44abd480016 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -528,11 +528,11 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj1, bool bScale) } else { - BitmapEx aBitmapEx; + Bitmap aBitmap; if(pSdrGrafObj) { - aBitmapEx = pSdrGrafObj->GetGraphic().GetBitmapEx(); + aBitmap = pSdrGrafObj->GetGraphic().GetBitmap(); } pObj.clear(); @@ -558,11 +558,11 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj1, bool bScale) pObj->SetLayer(aOldLayer); pObj->SetMergedItemSet(aOldItemSet); - if(!aBitmapEx.IsEmpty()) + if(!aBitmap.IsEmpty()) { // aNewRange is inside of aOldRange and defines which part of aBitmapEx is used - const double fScaleX(aBitmapEx.GetSizePixel().Width() / (aOldRange.getWidth() ? aOldRange.getWidth() : 1.0)); - const double fScaleY(aBitmapEx.GetSizePixel().Height() / (aOldRange.getHeight() ? aOldRange.getHeight() : 1.0)); + const double fScaleX(aBitmap.GetSizePixel().Width() / (aOldRange.getWidth() ? aOldRange.getWidth() : 1.0)); + const double fScaleY(aBitmap.GetSizePixel().Height() / (aOldRange.getHeight() ? aOldRange.getHeight() : 1.0)); basegfx::B2DRange aPixel(aNewRange); basegfx::B2DHomMatrix aTrans; @@ -570,7 +570,7 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj1, bool bScale) aTrans.scale(fScaleX, fScaleY); aPixel.transform(aTrans); - const Size aOrigSizePixel(aBitmapEx.GetSizePixel()); + const Size aOrigSizePixel(aBitmap.GetSizePixel()); const Point aClipTopLeft( basegfx::fround(floor(std::max(0.0, aPixel.getMinX()))), basegfx::fround(floor(std::max(0.0, aPixel.getMinY())))); @@ -578,7 +578,7 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj1, bool bScale) basegfx::fround(ceil(std::min(static_cast(aOrigSizePixel.Width()), aPixel.getWidth()))), basegfx::fround(ceil(std::min(static_cast(aOrigSizePixel.Height()), aPixel.getHeight())))); const BitmapEx aClippedBitmap( - aBitmapEx, + BitmapEx(aBitmap), aClipTopLeft, aClipSize); diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 740790d5279c..c67f0c40b17b 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -2325,7 +2325,7 @@ void SAL_CALL VCLXDialog::setProperty( { Graphic aImage(xGraphic); - Wallpaper aWallpaper(aImage.GetBitmapEx()); + Wallpaper aWallpaper(aImage.GetBitmap()); aWallpaper.SetStyle( WallpaperStyle::Scale ); pDialog->SetBackground( aWallpaper ); } @@ -2460,7 +2460,7 @@ void SAL_CALL VCLXMultiPage::setProperty( { Graphic aImage(xGraphic); - Wallpaper aWallpaper(aImage.GetBitmapEx()); + Wallpaper aWallpaper(aImage.GetBitmap()); aWallpaper.SetStyle( WallpaperStyle::Scale ); pTabControl->SetBackground( aWallpaper ); } @@ -2670,7 +2670,7 @@ void SAL_CALL VCLXTabPage::setProperty( { Graphic aImage(xGraphic); - Wallpaper aWallpaper(aImage.GetBitmapEx()); + Wallpaper aWallpaper(aImage.GetBitmap()); aWallpaper.SetStyle( WallpaperStyle::Scale ); pTabPage->SetBackground( aWallpaper ); } diff --git a/toolkit/source/controls/tree/treecontrolpeer.cxx b/toolkit/source/controls/tree/treecontrolpeer.cxx index ef2779f118a4..9bc4604763f1 100644 --- a/toolkit/source/controls/tree/treecontrolpeer.cxx +++ b/toolkit/source/controls/tree/treecontrolpeer.cxx @@ -1392,7 +1392,7 @@ bool TreeControlPeer::loadImage( const OUString& rURL, Image& rImage ) Reference< XGraphic > xGraphic( mxGraphicProvider->queryGraphic( aProps ) ); Graphic aGraphic( xGraphic ); - rImage = Image(aGraphic.GetBitmapEx()); + rImage = Image(aGraphic.GetBitmap()); return true; } catch( Exception& )