diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-07 14:25:36 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2018-12-08 13:37:08 +0100 |
commit | 408d190f399724b4928624acc7beda50191269fd (patch) | |
tree | 5bf66cc6f769a1aa4c8bf4dd8c298ec7699b8421 /vcl | |
parent | dacb97ecdd623d033fdd475131e3c7dc87c17f52 (diff) |
utility constructor for Image "private:graphicrepository" urls
Change-Id: I118039f4e47818a43da9302ce3550ea800522675
Reviewed-on: https://gerrit.libreoffice.org/64765
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/64803
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/fixed.cxx | 2 | ||||
-rw-r--r-- | vcl/source/image/Image.cxx | 5 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/msgbox.cxx | 8 |
4 files changed, 11 insertions, 6 deletions
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index e990752ebc22..3a459298936a 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -967,7 +967,7 @@ bool FixedImage::SetModeImage( const Image& rImage ) Image FixedImage::loadThemeImage(const OUString &rFileName) { - return Image("private:graphicrepository/" + rFileName); + return Image(StockImage::Yes, rFileName); } bool FixedImage::set_property(const OString &rKey, const OUString &rValue) diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index 106e9e21ec4d..9dd585081206 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -76,6 +76,11 @@ Image::Image(const OUString & rFileUrl) } } +Image::Image(StockImage, const OUString & rFileUrl) + : mpImplData(new ImplImage(rFileUrl)) +{ +} + void Image::ImplInit(const BitmapEx& rBitmapEx) { if (!rBitmapEx.IsEmpty()) diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 60e968771d78..f40ac4696481 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -365,7 +365,7 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr SAL_WARN_IF(eType != SymbolType::IMAGE, "vcl.layout", "inimplemented symbol type for radiobuttons"); if (eType == SymbolType::IMAGE) { - Image const aImage("private:graphicrepository/" + + Image const aImage(StockImage::Yes, mapStockToImageResource(rImageInfo.m_sStock)); if (!aI->m_bRadio) pTargetButton->SetModeImage(aImage); diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 40a120e0508a..635147b2e906 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -40,10 +40,10 @@ static void ImplInitMsgBoxImageList() std::vector<Image> &rImages = pSVData->maWinData.maMsgBoxImgList; if (rImages.empty()) { - rImages.emplace_back(Image("private:graphicrepository/" SV_RESID_BITMAP_ERRORBOX)); - rImages.emplace_back(Image("private:graphicrepository/" SV_RESID_BITMAP_QUERYBOX)); - rImages.emplace_back(Image("private:graphicrepository/" SV_RESID_BITMAP_WARNINGBOX)); - rImages.emplace_back(Image("private:graphicrepository/" SV_RESID_BITMAP_INFOBOX)); + rImages.emplace_back(Image(StockImage::Yes, SV_RESID_BITMAP_ERRORBOX)); + rImages.emplace_back(Image(StockImage::Yes, SV_RESID_BITMAP_QUERYBOX)); + rImages.emplace_back(Image(StockImage::Yes, SV_RESID_BITMAP_WARNINGBOX)); + rImages.emplace_back(Image(StockImage::Yes, SV_RESID_BITMAP_INFOBOX)); } } |