diff options
-rw-r--r-- | sfx2/source/sidebar/Tools.cxx | 8 | ||||
-rw-r--r-- | vcl/source/image/Image.cxx | 5 |
2 files changed, 5 insertions, 8 deletions
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()); } |