sfx2/source/sidebar/Tools.cxx | 8 +++----- vcl/source/image/Image.cxx | 5 ++--- 2 files changed, 5 insertions(+), 8 deletions(-)
New commits: commit c876f11689859243ba0945ba5c610ffd3ce3c6d3 Author: Tomaž Vajngerl <[email protected]> AuthorDate: Wed Aug 15 14:19:53 2018 +0200 Commit: Katarina Behrens <[email protected]> CommitDate: Thu Aug 16 12:58:16 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 <[email protected]> (cherry picked from commit 43b7aa5133ce3bfb44c5203aea37fa4474bc3a61) Reviewed-on: https://gerrit.libreoffice.org/59144 Reviewed-by: Katarina Behrens <[email protected]> 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()); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
