diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-29 01:31:19 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-30 06:20:50 +0200 |
commit | ea9367037232054a576f1e6aabffeb3a62ffa44b (patch) | |
tree | ea5c755830b87fc140e9c3ce027b4957956fae48 /desktop | |
parent | e82c9633e4f9bc4590bd6cd8d2a82a974ddaf00f (diff) |
Drop some uses of css::uno::Sequence::getConstArray ...
where it was obsoleted by commits 2484de6728bd11bb7949003d112f1ece2223c7a1
(Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and
fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[]
in internal code 2021-11-05).
Change-Id: I4ccc647bb794515c8c11f8dfd9a26563f4aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166819
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/manager/dp_commandenvironments.cxx | 21 | ||||
-rw-r--r-- | desktop/source/deployment/registry/component/dp_component.cxx | 4 |
2 files changed, 8 insertions, 17 deletions
diff --git a/desktop/source/deployment/manager/dp_commandenvironments.cxx b/desktop/source/deployment/manager/dp_commandenvironments.cxx index 2b98ff971908..4a0a88f42432 100644 --- a/desktop/source/deployment/manager/dp_commandenvironments.cxx +++ b/desktop/source/deployment/manager/dp_commandenvironments.cxx @@ -82,21 +82,14 @@ void BaseCommandEnv::handle_(bool approve, else { // select: - uno::Sequence< Reference< task::XInteractionContinuation > > conts( - xRequest->getContinuations() ); - Reference< task::XInteractionContinuation > const * pConts = - conts.getConstArray(); - sal_Int32 len = conts.getLength(); - for ( sal_Int32 pos = 0; pos < len; ++pos ) + for (auto& xContinuation : xRequest->getContinuations()) { - if (approve) { - Reference< task::XInteractionApprove > xInteractionApprove( - pConts[ pos ], uno::UNO_QUERY ); - if (xInteractionApprove.is()) { - xInteractionApprove->select(); - // don't query again for ongoing continuations: - approve = false; - } + Reference<task::XInteractionApprove> xInteractionApprove(xContinuation, uno::UNO_QUERY); + if (xInteractionApprove.is()) + { + xInteractionApprove->select(); + // don't query again for ongoing continuations: + break; } } } diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index 7a692ec8c6c5..7efa1ba854e6 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -1279,13 +1279,11 @@ BackendImpl::ComponentPackageImpl::isRegistered_( Sequence<OUString> implNames; if (xImplKey.is() && xImplKey->isValid()) implNames = xImplKey->getKeyNames(); - OUString const * pImplNames = implNames.getConstArray(); sal_Int32 pos = implNames.getLength(); for ( ; pos--; ) { checkAborted( abortChannel ); - const OUString key( - pImplNames[ pos ] + "/UNO/LOCATION" ); + const OUString key(implNames[pos] + "/UNO/LOCATION"); const Reference<registry::XRegistryKey> xKey( xRootKey->openKey(key) ); if (xKey.is() && xKey->isValid()) |