diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-07 14:17:38 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-03-10 19:22:01 +0100 |
commit | 6529cd54c29c5800340530a1b8182c341fbeeafb (patch) | |
tree | 2b09ee9429a0759b8104575aa97e1f4aeadd443e /sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx | |
parent | 4ea605cb5c31fe4c7d3931a656782a652b4d96fc (diff) |
don't use heap for elements in ScRangeList
no need to store small objects like this out of line.
Also
- add move constructor and move assignment operator
- drop Assign method since it now has the same
signature as push_back
Change-Id: I9a8647d3a11f24166a83d399a358a2bce3b2cb79
Reviewed-on: https://gerrit.libreoffice.org/50899
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx')
-rw-r--r-- | sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx index 7cb152023474..f6613f63d2e2 100644 --- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx @@ -66,7 +66,7 @@ OUString lclCreateMultiParameterFormula( OUString aResult; for (size_t i = 0; i < aRangeList.size(); i++) { - OUString aRangeString(aRangeList[i]->Format(ScRefFlags::RANGE_ABS, pDocument, aAddressDetails)); + OUString aRangeString(aRangeList[i].Format(ScRefFlags::RANGE_ABS, pDocument, aAddressDetails)); OUString aFormulaString = aFormulaTemplate.replaceAll(aWildcard, aRangeString); aResult += aFormulaString; if(i != aRangeList.size() - 1) // Not Last @@ -86,7 +86,7 @@ void lclMakeSubRangesList(ScRangeList& rRangeList, const ScRange& rInputRange, S for( ; pIterator->hasNext(); pIterator->next() ) { ScRange aRange = pIterator->get(); - rRangeList.Append(aRange); + rRangeList.push_back(aRange); } } @@ -170,9 +170,9 @@ void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalke { for (size_t i = 0; i < rRangeList.size(); i++) { - ScRange* pRange = rRangeList[i]; + ScRange const & rRange = rRangeList[i]; aTemplate.setTemplate(sFormula); - aTemplate.applyRange(strWildcardRange, *pRange); + aTemplate.applyRange(strWildcardRange, rRange); aOutput.writeFormula(aTemplate.getTemplate()); if (pResultRange != nullptr) pResultRange->aEnd = aOutput.current(); @@ -249,7 +249,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, } output.nextRow(); - aTemplate.autoReplaceRange("%FIRST_COLUMN%", *aRangeList[0]); + aTemplate.autoReplaceRange("%FIRST_COLUMN%", aRangeList[0]); // Between Groups { @@ -416,8 +416,8 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For // Setup auto-replace strings aTemplate.autoReplaceRange(strWildcardRange, mInputRange); - aTemplate.autoReplaceRange("%FIRST_COLUMN%", *aColumnRangeList[0]); - aTemplate.autoReplaceRange("%FIRST_ROW%", *aRowRangeList[0]); + aTemplate.autoReplaceRange("%FIRST_COLUMN%", aColumnRangeList[0]); + aTemplate.autoReplaceRange("%FIRST_ROW%", aRowRangeList[0]); // Rows { |