summaryrefslogtreecommitdiff
path: root/uui/source/iahndl.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-06-23 15:42:31 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-06-25 21:39:40 +0200
commit75957a96c43b83418d387e9174415b6d90cf9c63 (patch)
tree8029707fcc2c86fb3b638c4664605bc40e539b5a /uui/source/iahndl.cxx
parent2cebba0e4042ca2cab37cf38874c2576c2ac6a6f (diff)
Simplify Sequence iterations in uui
Use range-based loops or replace with STL functions Change-Id: I36ca6016d23360d121935d9f25e8cc8d2dad08c3 Reviewed-on: https://gerrit.libreoffice.org/74625 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'uui/source/iahndl.cxx')
-rw-r--r--uui/source/iahndl.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index f0c6cdb67016..4b074d151984 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -884,20 +884,18 @@ UUIInteractionHelper::getInteractionHandlerList(
uno::Reference< container::XNameAccess > xNameAccess(
xInterface, uno::UNO_QUERY_THROW );
uno::Sequence< OUString > aElems = xNameAccess->getElementNames();
- const OUString* pElems = aElems.getConstArray();
- sal_Int32 nCount = aElems.getLength();
- if ( nCount > 0 )
+ if ( aElems.hasElements() )
{
uno::Reference< container::XHierarchicalNameAccess >
xHierNameAccess( xInterface, uno::UNO_QUERY_THROW );
// Iterate over children.
- for ( sal_Int32 n = 0; n < nCount; ++n )
+ for ( const auto& rElem : aElems )
{
OUStringBuffer aElemBuffer;
aElemBuffer.append( "['" );
- aElemBuffer.append( pElems[ n ] );
+ aElemBuffer.append( rElem );
try
{