diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-10 12:37:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-10 16:23:59 +0200 |
commit | 40110d917b26f0d0e84938df2792abfedb461c45 (patch) | |
tree | 824313be0bc660c290b610921932b4c33f2e3321 /vcl/source/image | |
parent | 8d831cc01daaed6937fc126dc5671ae58e8c027e (diff) |
No more need for extra local variables
...after 453fde35bb838febf73bfda0bd981ee270c9b12e "BitmapFilter::execute can be
const". This reverts the call-site changes of
bce47223099bb3349d96af9d6b1fe88bcdd539df "clang-tidy bugprone-use-after-move in
BitmapFilter::Filter" again.
Change-Id: I5ce4eb7ddce90fb779ddfb1c5864fd4785708175
Reviewed-on: https://gerrit.libreoffice.org/60255
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source/image')
-rw-r--r-- | vcl/source/image/Image.cxx | 6 | ||||
-rw-r--r-- | vcl/source/image/ImplImageTree.cxx | 8 |
2 files changed, 4 insertions, 10 deletions
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index 0cb69d6affb8..049e3bef5d0d 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -138,8 +138,7 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle if (mpImplData->maBitmapChecksum != aChecksum) { BitmapEx aDisabledBmpEx(mpImplData->maBitmapEx); - BitmapDisabledImageFilter filter; - BitmapFilter::Filter(aDisabledBmpEx, filter); + BitmapFilter::Filter(aDisabledBmpEx, BitmapDisabledImageFilter()); mpImplData->maBitmapChecksum = aChecksum; mpImplData->maDisabledBitmapEx = aDisabledBmpEx; @@ -162,8 +161,7 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle else aColor = rSettings.GetDeactiveColor(); - BitmapColorizeFilter filter(aColor); - BitmapFilter::Filter(aTempBitmapEx, filter); + BitmapFilter::Filter(aTempBitmapEx, BitmapColorizeFilter(aColor)); } if (nStyle & DrawImageFlags::SemiTransparent) diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index 1ee8d7b513e2..fd1025dec240 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -163,10 +163,7 @@ void loadImageFromStream(std::shared_ptr<SvStream> const & xStream, OUString con vcl::bitmap::loadFromSvg(*xStream.get(), rPath, rParameters.mrBitmap, aScalePercentage / 100.0); if (bConvertToDarkTheme) - { - BitmapLightenFilter filter; - BitmapFilter::Filter(rParameters.mrBitmap, filter); - } + BitmapFilter::Filter(rParameters.mrBitmap, BitmapLightenFilter()); return; } @@ -178,8 +175,7 @@ void loadImageFromStream(std::shared_ptr<SvStream> const & xStream, OUString con if (bConvertToDarkTheme) { rParameters.mbWriteImageToCache = true; // Cache the dark variant - BitmapLightenFilter filter; - BitmapFilter::Filter(rParameters.mrBitmap, filter); + BitmapFilter::Filter(rParameters.mrBitmap, BitmapLightenFilter()); } if (aScalePercentage > 100) |