summaryrefslogtreecommitdiff
path: root/cui/source/customize/CommandCategoryListBox.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 11:05:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-15 11:59:02 +0200
commitfe00a724a918606e5c8c2c32b155bc50b33d56bd (patch)
treec638ef9b9ca8d354a911feb82d6905f10861f0bc /cui/source/customize/CommandCategoryListBox.cxx
parent5827e30109b683cb74efa21d154e5219fe9e2a0c (diff)
loplugin:sequenceloop in basic..cui
Change-Id: I15d825de3201808d188b461415f78a4d81b64127 Reviewed-on: https://gerrit.libreoffice.org/77494 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/customize/CommandCategoryListBox.cxx')
-rw-r--r--cui/source/customize/CommandCategoryListBox.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/cui/source/customize/CommandCategoryListBox.cxx b/cui/source/customize/CommandCategoryListBox.cxx
index 3335836afe3a..e361388943c4 100644
--- a/cui/source/customize/CommandCategoryListBox.cxx
+++ b/cui/source/customize/CommandCategoryListBox.cxx
@@ -351,7 +351,8 @@ void CommandCategoryListBox::categorySelected(CuiConfigFunctionListBox* pFunctio
SfxCfgKind::GROUP_SCRIPTCONTAINER, 0, static_cast<void *>(rootNode.get()) ) );
// Add main macro groups
- for ( auto const & childGroup : rootNode->getChildNodes() )
+ const css::uno::Sequence<css::uno::Reference<css::script::browse::XBrowseNode>> aChildNodes = rootNode->getChildNodes();
+ for ( auto const & childGroup : aChildNodes )
{
OUString sUIName;
childGroup->acquire();
@@ -490,7 +491,8 @@ void CommandCategoryListBox::addChildren(
m_searchOptions.searchString = filterTerm;
utl::TextSearch textSearch( m_searchOptions );
- for (auto const & child : parentNode->getChildNodes())
+ const css::uno::Sequence<css::uno::Reference<css::script::browse::XBrowseNode>> aChildNodes = parentNode->getChildNodes();
+ for (auto const & child : aChildNodes)
{
// Acquire to prevent auto-destruction
child->acquire();