diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-29 10:03:36 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-31 06:56:49 +0100 |
commit | ce22935a8586eda71fd29d4ff969d9cd7a2ec15b (patch) | |
tree | ea0e84fe6d4b5b6e6ac5f3cc4ba1295dcf1bcdb1 /sfx2/source/doc/graphhelp.cxx | |
parent | c6af59b234e8eb8182dc7f686290524feafd6ed6 (diff) |
Prepare for removal of non-const operator[] from Sequence in sfx2
Change-Id: I0cdce64983901a6cc3b50dc9873a370ff08b9eb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124387
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2/source/doc/graphhelp.cxx')
-rw-r--r-- | sfx2/source/doc/graphhelp.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 6371d10112e4..b309625206a5 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -38,6 +38,7 @@ #include <tools/stream.hxx> #include <unotools/ucbstreamhelper.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/propertyvalue.hxx> #include <o3tl/char16_t2wchar_t.hxx> #include <o3tl/string_view.hxx> @@ -210,18 +211,16 @@ bool GraphicHelper::getThumbnailReplacement_Impl(std::u16string_view rResID, con uno::Reference< graphic::XGraphicProvider > xGraphProvider(graphic::GraphicProvider::create(xContext)); const OUString aURL{OUString::Concat("private:graphicrepository/") + rResID}; - uno::Sequence< beans::PropertyValue > aMediaProps( 1 ); - aMediaProps[0].Name = "URL"; - aMediaProps[0].Value <<= aURL; + uno::Sequence< beans::PropertyValue > aMediaProps{ comphelper::makePropertyValue("URL", + aURL) }; uno::Reference< graphic::XGraphic > xGraphic = xGraphProvider->queryGraphic( aMediaProps ); if ( xGraphic.is() ) { - uno::Sequence< beans::PropertyValue > aStoreProps( 2 ); - aStoreProps[0].Name = "OutputStream"; - aStoreProps[0].Value <<= xStream; - aStoreProps[1].Name = "MimeType"; - aStoreProps[1].Value <<= OUString("image/png"); + uno::Sequence< beans::PropertyValue > aStoreProps{ + comphelper::makePropertyValue("OutputStream", xStream), + comphelper::makePropertyValue("MimeType", OUString("image/png")) + }; xGraphProvider->storeGraphic( xGraphic, aStoreProps ); bResult = true; |