[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 14 08:04:05 UTC 2020
sc/source/core/data/formulacell.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 93e29317709400e27e1d865f6ab456e92e534736
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 13 20:37:49 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 14 10:03:17 2020 +0200
lcl_refListFormsOneRange always dereferences their ScDocument* arg
Change-Id: Iaf9557cdca09efa3b5a14238b79309b76f3c5cc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102620
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 16673eebf752..c9cdd3316376 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -377,20 +377,20 @@ lcl_fillRangeFromRefList(
bool
lcl_refListFormsOneRange(
- const ScDocument* pDoc,
+ const ScDocument& rDoc,
const ScAddress& rPos, std::vector<formula::FormulaToken*>& rReferences,
ScRange& rRange)
{
if (rReferences.size() == 1)
{
- lcl_fillRangeFromRefList(*pDoc, rPos, rReferences, rRange);
+ lcl_fillRangeFromRefList(rDoc, rPos, rReferences, rRange);
return true;
}
bool bCell(false);
bool bRow(false);
bool bTab(false);
- if (lcl_checkRangeDimensions(*pDoc, rPos, rReferences.begin(), rReferences.end(), bCell, bRow, bTab))
+ if (lcl_checkRangeDimensions(rDoc, rPos, rReferences.begin(), rReferences.end(), bCell, bRow, bTab))
{
DimensionSelector aWhich;
if (bCell)
@@ -412,10 +412,10 @@ lcl_refListFormsOneRange(
}
// Sort the references by start of range
- std::sort(rReferences.begin(), rReferences.end(), LessByReference(*pDoc, rPos, aWhich));
- if (lcl_checkIfAdjacent(*pDoc, rPos, rReferences, aWhich))
+ std::sort(rReferences.begin(), rReferences.end(), LessByReference(rDoc, rPos, aWhich));
+ if (lcl_checkIfAdjacent(rDoc, rPos, rReferences, aWhich))
{
- lcl_fillRangeFromRefList(*pDoc, rPos, rReferences, rRange);
+ lcl_fillRangeFromRefList(rDoc, rPos, rReferences, rRange);
return true;
}
}
@@ -3086,7 +3086,7 @@ ScFormulaCell::HasRefListExpressibleAsOneReference(ScRange& rRange) const
if (pFunction && !aIter.GetNextReferenceRPN()
&& (pFunction->GetParamCount() == aReferences.size()))
{
- return lcl_refListFormsOneRange(pDocument, aPos, aReferences, rRange);
+ return lcl_refListFormsOneRange(*pDocument, aPos, aReferences, rRange);
}
}
return false;
More information about the Libreoffice-commits
mailing list