diff options
Diffstat (limited to 'desktop/source/deployment/registry/component/dp_component.cxx')
-rw-r--r-- | desktop/source/deployment/registry/component/dp_component.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index cdc840762068..8cb39ce476bd 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -1105,30 +1105,30 @@ void extractComponentData( if (!registryName.endsWith("/")) { prefix += RTL_CONSTASCII_LENGTH("/"); } - css::uno::Sequence< css::uno::Reference< css::registry::XRegistryKey > > + const css::uno::Sequence< css::uno::Reference< css::registry::XRegistryKey > > keys(registry->openKeys()); css::uno::Reference< css::lang::XMultiComponentFactory > smgr( context->getServiceManager(), css::uno::UNO_SET_THROW); - for (sal_Int32 i = 0; i < keys.getLength(); ++i) { - OUString name(keys[i]->getKeyName().copy(prefix)); + for (css::uno::Reference< css::registry::XRegistryKey > const & key : keys) { + OUString name(key->getKeyName().copy(prefix)); data->implementationNames.push_back(name); css::uno::Reference< css::registry::XRegistryKey > singletons( - keys[i]->openKey("UNO/SINGLETONS")); + key->openKey("UNO/SINGLETONS")); if (singletons.is()) { - sal_Int32 prefix2 = keys[i]->getKeyName().getLength() + + sal_Int32 prefix2 = key->getKeyName().getLength() + RTL_CONSTASCII_LENGTH("/UNO/SINGLETONS/"); - css::uno::Sequence< + const css::uno::Sequence< css::uno::Reference< css::registry::XRegistryKey > > singletonKeys(singletons->openKeys()); - for (sal_Int32 j = 0; j < singletonKeys.getLength(); ++j) { + for (css::uno::Reference< css::registry::XRegistryKey > const & singletonKey : singletonKeys) { data->singletons.emplace_back( - singletonKeys[j]->getKeyName().copy(prefix2), name); + singletonKey->getKeyName().copy(prefix2), name); } } if (factories != nullptr) { factories->push_back( componentLoader->activate( - name, OUString(), componentUrl, keys[i])); + name, OUString(), componentUrl, key)); } } } |