summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-26 16:15:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-28 10:26:06 +0200
commitc7483d48df1b9ae70335346846d02a4fc53b4558 (patch)
tree6cca794ebcdd0b9a81733836fa154658d083f173 /framework
parent2ac95bccba859b7dd117e135d7c4f7a35017d9f9 (diff)
drop operator bool and operator! from Bitmap and BitmapEx
IRC chat: <quikee[m]> 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" <noelgrandin> quikee[m], hmmm, good point <noelgrandin> maybe I should just drop both operator bool and operator! in favor of IsEmpty <quikee[m]> 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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx12
1 files changed, 6 insertions, 6 deletions
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);