diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-07 15:13:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-07 18:19:57 +0200 |
commit | af1e773c19db58de55939355bf0069e35d2a7789 (patch) | |
tree | ad3b66951df8458a16c1fccb2254ca7556917f9e /vcl/source/image | |
parent | f446ebf4ad419c114cae903a04159ccf78755faa (diff) |
loplugin:constantparam
Change-Id: I83722d99fa0d5919a7e878d32311dbb6de1c6714
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102175
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.cxx | 8 | ||||
-rw-r--r-- | vcl/source/image/ImplImage.cxx | 9 |
2 files changed, 5 insertions, 12 deletions
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index 0cb7c5d44949..54799c5a60b1 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -46,7 +46,7 @@ Image::Image(uno::Reference<graphic::XGraphic> const & rxGraphic) OUString aPath; if (aGraphic.getOriginURL().startsWith("private:graphicrepository/", &aPath)) - mpImplData = std::make_shared<ImplImage>(aPath, Size()); + mpImplData = std::make_shared<ImplImage>(aPath); else ImplInit(aGraphic.GetBitmapEx()); } @@ -56,7 +56,7 @@ Image::Image(const OUString & rFileUrl) { OUString sImageName; if (rFileUrl.startsWith("private:graphicrepository/", &sImageName)) - mpImplData = std::make_shared<ImplImage>(sImageName, Size()); + mpImplData = std::make_shared<ImplImage>(sImageName); else { Graphic aGraphic; @@ -65,8 +65,8 @@ Image::Image(const OUString & rFileUrl) } } -Image::Image(StockImage, const OUString & rFileUrl, Size aSpecificSize) - : mpImplData(std::make_shared<ImplImage>(rFileUrl, aSpecificSize)) +Image::Image(StockImage, const OUString & rFileUrl) + : mpImplData(std::make_shared<ImplImage>(rFileUrl)) { } diff --git a/vcl/source/image/ImplImage.cxx b/vcl/source/image/ImplImage.cxx index 4465dd1687db..8659d8e11e50 100644 --- a/vcl/source/image/ImplImage.cxx +++ b/vcl/source/image/ImplImage.cxx @@ -31,15 +31,13 @@ ImplImage::ImplImage(const BitmapEx &rBitmapEx) : maBitmapChecksum(0) , maSizePixel(rBitmapEx.GetSizePixel()) - , maPreferedSizePixel() , maBitmapEx(rBitmapEx) { } -ImplImage::ImplImage(const OUString &aStockName, Size const & rPreferedSize) +ImplImage::ImplImage(const OUString &aStockName) : maBitmapChecksum(0) , maSizePixel() // defer size lookup - , maPreferedSizePixel(rPreferedSize) , maStockName(aStockName) { } @@ -85,11 +83,6 @@ bool ImplImage::loadStockAtScale(double fScale, BitmapEx &rBitmapEx) return false; } } - if (maPreferedSizePixel != Size()) - { - Size aScaleSize(maPreferedSizePixel.Width() * fScale, maPreferedSizePixel.Height() * fScale); - aBitmapEx.Scale(aScaleSize); - } rBitmapEx = aBitmapEx; return true; } |