summaryrefslogtreecommitdiff
path: root/unotools/source/config/optionsdlg.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-29 10:22:09 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-11-01 05:25:36 +0100
commit1be268f3ec7661be232b8f5dc18546d1410dfd52 (patch)
tree5b8202c3f107d47211b2b23270f2e00318adc01d /unotools/source/config/optionsdlg.cxx
parentb8d17d754830ab57099dcdfa72a96bfad404ab1a (diff)
Prepare for removal of non-const operator[] from Sequence in unotools
Change-Id: I720d1c1e4a8d32e8a7c7ac62ab9cf988bac31d01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124406 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'unotools/source/config/optionsdlg.cxx')
-rw-r--r--unotools/source/config/optionsdlg.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx
index 32e5ee0d2bf7..cc5ee7a60538 100644
--- a/unotools/source/config/optionsdlg.cxx
+++ b/unotools/source/config/optionsdlg.cxx
@@ -23,6 +23,8 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+#include <cassert>
+
using namespace com::sun::star::beans;
using namespace com::sun::star::uno;
@@ -84,10 +86,13 @@ static void ReadNode(
}
}
+ assert(nLen > 0);
+
Sequence< OUString > lResult( nLen );
- lResult[0] = sNode + "Hide";
+ auto plResult = lResult.getArray();
+ plResult[0] = sNode + "Hide";
if ( _eType != NT_Option )
- lResult[1] = sNode + sSet;
+ plResult[1] = sNode + sSet;
Sequence< Any > aValues = utl::ConfigItem::GetProperties( xHierarchyAccess, lResult, /*bAllLocales*/false );
bool bHide = false;