diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-29 09:34:44 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-30 00:30:58 +0200 |
commit | e3d1fb97fcdff75424d4a116f29e8550f94f8a42 (patch) | |
tree | 5e9b2c8f25f9c0ac91b23d717da652b4c6e6057d /embeddedobj/source/msole/xdialogcreator.cxx | |
parent | 5823c27d7fbce3e65ff8684f0a5f21d14a97ab77 (diff) |
Prepare for removal of non-const operator[] from Sequence in embeddedobj
Change-Id: I19432a1e506526fdc1cd98625d9cfff12ea2f973
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124361
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'embeddedobj/source/msole/xdialogcreator.cxx')
-rw-r--r-- | embeddedobj/source/msole/xdialogcreator.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index b6bae52f1e49..7e4e99156291 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -39,6 +39,7 @@ #include "platform.h" #include <comphelper/mimeconfighelper.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/propertyvalue.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/weak.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -201,9 +202,8 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia if ( osl::FileBase::getFileURLFromSystemPath( aFileName, aFileURL ) != osl::FileBase::E_None ) throw uno::RuntimeException(); - uno::Sequence< beans::PropertyValue > aMediaDescr( 1 ); - aMediaDescr[0].Name = "URL"; - aMediaDescr[0].Value <<= aFileURL; + uno::Sequence< beans::PropertyValue > aMediaDescr{ comphelper::makePropertyValue("URL", + aFileURL) }; // TODO: use config helper for type detection uno::Reference< embed::XEmbeddedObjectCreator > xEmbCreator; @@ -266,11 +266,8 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia "Image WMF", cppu::UnoType<uno::Sequence< sal_Int8 >>::get() ); - aObjectInfo.Options.realloc( 2 ); - aObjectInfo.Options[0].Name = "Icon"; - aObjectInfo.Options[0].Value <<= aMetafile; - aObjectInfo.Options[1].Name = "IconFormat"; - aObjectInfo.Options[1].Value <<= aFlavor; + aObjectInfo.Options = { { "Icon", css::uno::Any(aMetafile) }, + { "IconFormat", css::uno::Any(aFlavor) } }; } GlobalUnlock( io.hMetaPict ); |