summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs/DialogModel.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-28 16:14:54 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-29 11:07:27 +0200
commit5b0ae3b59cd2cccfb72d991657366eb2a69bff49 (patch)
treecd7a4b55b70df6a09bc28d8b30d105bb0a54f405 /chart2/source/controller/dialogs/DialogModel.cxx
parent0787aeac2428bf6a2e372ed5f2eac2f079c28ba6 (diff)
Prepare for removal of non-const operator[] from Sequence in chart2
Change-Id: I71e0b458c4dd2a85e36a485e3efa72b1077b0e54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124346 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'chart2/source/controller/dialogs/DialogModel.cxx')
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 774e395e8951..ce6da753d6c4 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -265,16 +265,18 @@ Sequence< OUString > lcl_CopyExcludingValuesFirst(
Sequence< OUString > const & i_aInput )
{
Sequence< OUString > aOutput( i_aInput.getLength());
+ auto pOutput = aOutput.getArray();
int nSourceIndex, nDestIndex;
for( nSourceIndex = nDestIndex = 0; nSourceIndex < i_aInput.getLength(); nSourceIndex++ )
{
if( i_aInput[nSourceIndex] == "values-first" )
{
aOutput.realloc( aOutput.getLength() - 1 );
+ pOutput = aOutput.getArray();
}
else
{
- aOutput[nDestIndex] = i_aInput[nSourceIndex];
+ pOutput[nDestIndex] = i_aInput[nSourceIndex];
nDestIndex++;
}
}