diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-28 13:55:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-29 08:57:08 +0200 |
commit | 7cdbde4867b14ae382262dc394ba83e609a8eecf (patch) | |
tree | 5fa180d35a8423a7857b0d57355f74a6d26b5bec /desktop | |
parent | ab20a5888d3a7f964ef2fb3afe2477825da6037e (diff) |
Initialize Sequence<beans::NamedValue> from initializer_lists
Change-Id: I216dcbd983dcf3df79df9fda371b93114540a9d8
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/sofficemain.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/registry/component/dp_component.cxx | 14 |
2 files changed, 7 insertions, 11 deletions
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index b567cc9dfe40..17586066f488 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -117,9 +117,7 @@ extern "C" void PtylTestEncryptionAndExport(const char *pathname) utl::MediaDescriptor media; media[utl::MediaDescriptor::PROP_FILTERNAME()] <<= OUString("MS Word 2007 XML"); OUString password("myPassword"); - css::uno::Sequence<css::beans::NamedValue> encryptionData(1); - encryptionData[0].Name = "OOXPassword"; - encryptionData[0].Value = css::uno::makeAny(password); + css::uno::Sequence<css::beans::NamedValue> encryptionData { { "OOXPassword", css::uno::makeAny(password) } }; media[utl::MediaDescriptor::PROP_ENCRYPTIONDATA()] <<= encryptionData; css::uno::Reference<css::frame::XModel> model(component, css::uno::UNO_QUERY); diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index 35b0205e5394..cf996068fdd8 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -1712,11 +1712,11 @@ void BackendImpl::ComponentsPackageImpl::processPackage_( } // This relies on the root component context's service manager // supporting the extended XSet semantics: - css::uno::Sequence< css::beans::NamedValue > args(2); - args[0].Name = "uri"; - args[0].Value <<= expandUnoRcUrl(url); - args[1].Name = "component-context"; - args[1].Value <<= context; + css::uno::Sequence< css::beans::NamedValue > args + { + { "uri", css::uno::makeAny(expandUnoRcUrl(url)) }, + { "component-context", css::uno::makeAny(context) } + }; css::uno::Reference< css::container::XSet > smgr( that->getRootContext()->getServiceManager(), css::uno::UNO_QUERY_THROW); @@ -1728,9 +1728,7 @@ void BackendImpl::ComponentsPackageImpl::processPackage_( if (!startup) { // This relies on the root component context's service manager // supporting the extended XSet semantics: - css::uno::Sequence< css::beans::NamedValue > args(1); - args[0].Name = "uri"; - args[0].Value <<= expandUnoRcUrl(url); + css::uno::Sequence< css::beans::NamedValue > args { { "uri", css::uno::makeAny(expandUnoRcUrl(url)) } }; css::uno::Reference< css::container::XSet > smgr( that->getRootContext()->getServiceManager(), css::uno::UNO_QUERY_THROW); |