[Libreoffice-commits] core.git: sfx2/source vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 15 18:58:52 UTC 2018
sfx2/source/sidebar/Tools.cxx | 8 +++-----
vcl/source/image/Image.cxx | 5 ++---
2 files changed, 5 insertions(+), 8 deletions(-)
New commits:
commit 43b7aa5133ce3bfb44c5203aea37fa4474bc3a61
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Aug 15 14:19:53 2018 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Aug 15 20:58:28 2018 +0200
tdf#119276 Fix loading of images with internal LO URLs
Change-Id: I30556aba4490bef7f4a6e6b3899cc05f4b6a06d4
Reviewed-on: https://gerrit.libreoffice.org/59104
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/sfx2/source/sidebar/Tools.cxx b/sfx2/source/sidebar/Tools.cxx
index 8571ec09d450..a21b7414c61a 100644
--- a/sfx2/source/sidebar/Tools.cxx
+++ b/sfx2/source/sidebar/Tools.cxx
@@ -55,13 +55,11 @@ Image Tools::GetImage (
{
if (rsURL.startsWith(".uno:"))
{
- const Image aPanelImage(vcl::CommandInfoProvider::GetImageForCommand(rsURL, rxFrame));
- return aPanelImage;
+ return vcl::CommandInfoProvider::GetImageForCommand(rsURL, rxFrame);
}
- else if (rsURL.startsWith("private:graphicrepository"))
+ else
{
- const Image aPanelImage(rsURL);
- return aPanelImage;
+ return Image(rsURL);
}
}
return Image();
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index 7be04691603d..049e3bef5d0d 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -67,10 +67,9 @@ Image::Image(const OUString & rFileUrl)
}
else
{
- OUString aPath;
- osl::FileBase::getSystemPathFromFileURL(rFileUrl, aPath);
Graphic aGraphic;
- if (ERRCODE_NONE == GraphicFilter::LoadGraphic(aPath, IMP_PNG, aGraphic))
+
+ if (ERRCODE_NONE == GraphicFilter::LoadGraphic(rFileUrl, IMP_PNG, aGraphic))
{
ImplInit(aGraphic.GetBitmapEx());
}
More information about the Libreoffice-commits
mailing list