summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-13 14:52:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-13 18:13:37 +0200
commita5bdce555ad7e5bd480c7bd63159869b7a9bc3d3 (patch)
treef184572cb8e7551db942abb3f995cd362aba6bfc /forms
parent601e9d4badd84c3c4824090f1bc39bef3b64cbd1 (diff)
comment on suspicious code
Change-Id: I92b16c22815a755ec23503db1b8f7bb3444f89e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115560 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/xforms/model_ui.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx
index 4592fa3efe97..7f39a9f6ed99 100644
--- a/forms/source/xforms/model_ui.cxx
+++ b/forms/source/xforms/model_ui.cxx
@@ -610,6 +610,8 @@ css::uno::Reference<css::xml::dom::XNode> Model::renameNode( const css::uno::Ref
Reference<XNamedNodeMap> xMap = xNode->getAttributes();
sal_Int32 nLength = xMap.is() ? xMap->getLength() : 0;
+ // looping until nLength is suspicious wrt removeAttributeNode
+ // presumably shrinking XNamedNodeMap::getLength by 1
for( sal_Int32 n = 0; n < nLength; n++ )
{
Reference<XAttr> xAttr( xMap->item(n), UNO_QUERY );