summaryrefslogtreecommitdiff
path: root/vcl/source/image
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-06 14:33:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-06 17:16:34 +0200
commitbce47223099bb3349d96af9d6b1fe88bcdd539df (patch)
tree21e71197cf83f80657914bb529c459208a01547a /vcl/source/image
parentf4d4b100ffd18993d4eab1bcd52fe12b7f8f3e32 (diff)
clang-tidy bugprone-use-after-move in BitmapFilter::Filter
which necesitated changing the API and hence the call sites Change-Id: Id417a235bf9b2bf1a3d152dc6600c0635486cafa Reviewed-on: https://gerrit.libreoffice.org/60086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/image')
-rw-r--r--vcl/source/image/Image.cxx6
-rw-r--r--vcl/source/image/ImplImageTree.cxx8
2 files changed, 10 insertions, 4 deletions
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index 049e3bef5d0d..0cb69d6affb8 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -138,7 +138,8 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle
if (mpImplData->maBitmapChecksum != aChecksum)
{
BitmapEx aDisabledBmpEx(mpImplData->maBitmapEx);
- BitmapFilter::Filter(aDisabledBmpEx, BitmapDisabledImageFilter());
+ BitmapDisabledImageFilter filter;
+ BitmapFilter::Filter(aDisabledBmpEx, filter);
mpImplData->maBitmapChecksum = aChecksum;
mpImplData->maDisabledBitmapEx = aDisabledBmpEx;
@@ -161,7 +162,8 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle
else
aColor = rSettings.GetDeactiveColor();
- BitmapFilter::Filter(aTempBitmapEx, BitmapColorizeFilter(aColor));
+ BitmapColorizeFilter filter(aColor);
+ BitmapFilter::Filter(aTempBitmapEx, filter);
}
if (nStyle & DrawImageFlags::SemiTransparent)
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index fd1025dec240..1ee8d7b513e2 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -163,7 +163,10 @@ void loadImageFromStream(std::shared_ptr<SvStream> const & xStream, OUString con
vcl::bitmap::loadFromSvg(*xStream.get(), rPath, rParameters.mrBitmap, aScalePercentage / 100.0);
if (bConvertToDarkTheme)
- BitmapFilter::Filter(rParameters.mrBitmap, BitmapLightenFilter());
+ {
+ BitmapLightenFilter filter;
+ BitmapFilter::Filter(rParameters.mrBitmap, filter);
+ }
return;
}
@@ -175,7 +178,8 @@ void loadImageFromStream(std::shared_ptr<SvStream> const & xStream, OUString con
if (bConvertToDarkTheme)
{
rParameters.mbWriteImageToCache = true; // Cache the dark variant
- BitmapFilter::Filter(rParameters.mrBitmap, BitmapLightenFilter());
+ BitmapLightenFilter filter;
+ BitmapFilter::Filter(rParameters.mrBitmap, filter);
}
if (aScalePercentage > 100)