From c7483d48df1b9ae70335346846d02a4fc53b4558 Mon Sep 17 00:00:00 2001 From: Noel Date: Fri, 26 Mar 2021 16:15:11 +0200 Subject: drop operator bool and operator! from Bitmap and BitmapEx IRC chat: noelgrandin: doesn't adding operator bool to Bitmap has the same problem as Graphic and the reason why you dropped that commit 7334034ae93b49fc93b5859a3c047a319d138282 "drop Graphic::operator bool" quikee[m], hmmm, good point maybe I should just drop both operator bool and operator! in favor of IsEmpty noelgrandin: I don't remember what the problem is I just remembered we dropped it Graphic :) sure, dropping everything for IsEmpty is probably the best Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163 Tested-by: Jenkins Reviewed-by: Noel Grandin --- framework/source/fwe/classes/addonsoptions.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'framework') diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 49eab738c1cc..ec604325139c 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -612,29 +612,29 @@ BitmapEx AddonsOptions_Impl::GetImageFromURL( const OUString& aURL, bool bBig, b OneImageEntry& rSizeEntry = pIter->second.aSizeEntry[nIdx]; OneImageEntry& rOtherEntry = pIter->second.aSizeEntry[nOtherIdx]; // actually read the image ... - if (!rSizeEntry.aImage) + if (rSizeEntry.aImage.IsEmpty()) rSizeEntry.aImage = ReadImageFromURL(rSizeEntry.aURL); - if (!rSizeEntry.aImage) + if (rSizeEntry.aImage.IsEmpty()) { // try the other size and scale it aImage = ScaleImage(ReadImageFromURL(rOtherEntry.aURL), bBig); rSizeEntry.aImage = aImage; - if (!rSizeEntry.aImage) + if (rSizeEntry.aImage.IsEmpty()) SAL_WARN("fwk", "failed to load addons image " << aURL); } // FIXME: bNoScale is not terribly meaningful or useful - if (!aImage && bNoScale) + if (aImage.IsEmpty() && bNoScale) aImage = rSizeEntry.aImage; - if (!aImage && !!rSizeEntry.aScaled) + if (aImage.IsEmpty() && !rSizeEntry.aScaled.IsEmpty()) aImage = rSizeEntry.aScaled; else // scale to the correct size for the theme / toolbox { aImage = rSizeEntry.aImage; - if (!aImage) // use and scale the other if one size is missing + if (aImage.IsEmpty()) // use and scale the other if one size is missing aImage = rOtherEntry.aImage; aImage = ScaleImage(aImage, bBig); -- cgit