summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-02-08 15:13:18 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-02-08 15:15:19 -0500
commit1556dbc451f067d8744378fb9bac0eaa7ef8f5ac (patch)
treee4ff16b9ddcf44cca94c247cd3a7249ff27a8669
parentac5682aa3013550e3643026c571b5d851b9e7b67 (diff)
fdo#74453: Only adjust tokens for top formula cells of formula group.
Change-Id: Id04387dffac271b3d617da0fbc19c862c929d60a
-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 a1e9ec170d62..88ca441d83ef 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3023,6 +3023,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)
@@ -3045,6 +3049,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());