summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-11-09 12:34:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-11-09 16:37:09 +0100
commitcb8a05bfccf77d5217f4f2e20b5898d6a24f990d (patch)
tree5ea1cc3c559b8d2705453bc9abb13da695d2c0f1 /vcl/source
parentb2cde58886c8a08fe240f74af6c4f257c15d2835 (diff)
Related: tdf#151898 set origin for implLoadRepositoryImage XGraphics
like we do when we get one from Image so we can treat these with the same shortcuts we do for Image to have the option to pass the underlying svg data to the final widget it ends up in Change-Id: I13a5aecc73821e88f1958e1e1e9e7322628cce6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142484 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/graphic/UnoGraphicProvider.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx
index 1f33a14ea1bc..f0e0d12e7895 100644
--- a/vcl/source/graphic/UnoGraphicProvider.cxx
+++ b/vcl/source/graphic/UnoGraphicProvider.cxx
@@ -143,7 +143,6 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadMemory( std::u16s
return xRet;
}
-
uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadRepositoryImage( std::u16string_view rResourceURL )
{
uno::Reference< ::graphic::XGraphic > xRet;
@@ -154,13 +153,14 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadRepositoryImage(
BitmapEx aBitmap;
if ( vcl::ImageRepository::loadImage( OUString(sPathName), aBitmap ) )
{
- xRet = Graphic(aBitmap).GetXGraphic();
+ Graphic aGraphic(aBitmap);
+ aGraphic.setOriginURL(OUString(rResourceURL));
+ xRet = aGraphic.GetXGraphic();
}
}
return xRet;
}
-
uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadStandardImage( std::u16string_view rResourceURL )
{
uno::Reference< ::graphic::XGraphic > xRet;