summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-02-08 15:13:18 -0500
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-02-09 17:21:05 +0000
commit5674cf16d2e053ac0590e665310683654b1036d7 (patch)
tree9e5135c997baea884b5621ff594cb3598aa3a3f0
parent0b3342e214d2f9edffbdc595de3410cfc96322d4 (diff)
fdo#74453: Only adjust tokens for top formula cells of formula group.
Change-Id: Id04387dffac271b3d617da0fbc19c862c929d60a (cherry picked from commit 1556dbc451f067d8744378fb9bac0eaa7ef8f5ac) Reviewed-on: https://gerrit.libreoffice.org/7946 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/core/data/formulacell.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 7d1dff1d58ec..0de5c8729506 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3024,6 +3024,10 @@ void ScFormulaCell::UpdateInsertTabAbs(SCTAB nTable)
if (pDocument->IsClipOrUndo())
return;
+ bool bAdjustCode = !mxGroup || mxGroup->mpTopCell == this;
+ if (!bAdjustCode)
+ return;
+
pCode->Reset();
ScToken* p = static_cast<ScToken*>(pCode->GetNextReferenceRPN());
while (p)
@@ -3046,6 +3050,10 @@ bool ScFormulaCell::TestTabRefAbs(SCTAB nTable)
if (pDocument->IsClipOrUndo())
return false;
+ bool bAdjustCode = !mxGroup || mxGroup->mpTopCell == this;
+ if (!bAdjustCode)
+ return false;
+
bool bRet = false;
pCode->Reset();
ScToken* p = static_cast<ScToken*>(pCode->GetNextReferenceRPN());