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 /framework/source/loadenv | |
parent | ab20a5888d3a7f964ef2fb3afe2477825da6037e (diff) |
Initialize Sequence<beans::NamedValue> from initializer_lists
Change-Id: I216dcbd983dcf3df79df9fda371b93114540a9d8
Diffstat (limited to 'framework/source/loadenv')
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 4ffae06bf94c..967264b743ff 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -870,17 +870,13 @@ bool LoadEnv::impl_handleContent() css::uno::Sequence< OUString > lTypeReg(1); lTypeReg[0] = sType; - css::uno::Sequence< css::beans::NamedValue > lQuery(1); - lQuery[0].Name = PROP_TYPES; - lQuery[0].Value <<= lTypeReg; - - OUString sPROP_NAME(PROP_NAME); + css::uno::Sequence< css::beans::NamedValue > lQuery { { PROP_TYPES, css::uno::makeAny(lTypeReg) } }; css::uno::Reference< css::container::XEnumeration > xSet = xLoaderFactory->createSubSetEnumerationByProperties(lQuery); while(xSet->hasMoreElements()) { ::comphelper::SequenceAsHashMap lProps (xSet->nextElement()); - OUString sHandler = lProps.getUnpackedValueOrDefault(sPROP_NAME, OUString()); + OUString sHandler = lProps.getUnpackedValueOrDefault(OUString(PROP_NAME), OUString()); css::uno::Reference< css::frame::XNotifyingDispatch > xHandler; try @@ -1163,11 +1159,7 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader() css::uno::Sequence< OUString > lTypesReg(1); lTypesReg[0] = sType; - css::uno::Sequence< css::beans::NamedValue > lQuery(1); - lQuery[0].Name = PROP_TYPES; - lQuery[0].Value <<= lTypesReg; - - OUString sPROP_NAME(PROP_NAME); + css::uno::Sequence< css::beans::NamedValue > lQuery { { PROP_TYPES, css::uno::makeAny(lTypesReg) } }; css::uno::Reference< css::container::XEnumeration > xSet = xLoaderFactory->createSubSetEnumerationByProperties(lQuery); while(xSet->hasMoreElements()) @@ -1177,7 +1169,7 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader() // try everyone ... // Ignore any loader, which makes trouble :-) ::comphelper::SequenceAsHashMap lLoaderProps(xSet->nextElement()); - OUString sLoader = lLoaderProps.getUnpackedValueOrDefault(sPROP_NAME, OUString()); + OUString sLoader = lLoaderProps.getUnpackedValueOrDefault(OUString(PROP_NAME), OUString()); css::uno::Reference< css::uno::XInterface > xLoader; xLoader = xLoaderFactory->createInstance(sLoader); |