summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-12-11 20:52:53 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-12-11 20:56:42 -0500
commit38e2a276859792f0b7f5d1667555217b3b451544 (patch)
tree8ace38b46efe00a4ebc096fe52aaaef56d2a221c
parentAdd undo operation for deleting a bookmark + unit test, related fdo#51741 (diff)
downloadcore-38e2a276859792f0b7f5d1667555217b3b451544.tar.gz
core-38e2a276859792f0b7f5d1667555217b3b451544.zip
fdo#86572: Increment row position *only when* the row ref is relative.
This is just a simple oversight. Change-Id: I024777c46641cce3410a20f40c48f47ad6a5dade (cherry picked from commit 52781a55441cb270ffecc2522d1e069141a21607)
-rw-r--r--sc/source/core/tool/sharedformula.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/core/tool/sharedformula.cxx b/sc/source/core/tool/sharedformula.cxx
index 67a40c27e79c..b1cd80d1fe7c 100644
--- a/sc/source/core/tool/sharedformula.cxx
+++ b/sc/source/core/tool/sharedformula.cxx
@@ -362,15 +362,18 @@ void SharedFormulaUtil::startListeningAsGroup( sc::StartListeningContext& rCxt,
{
case formula::svSingleRef:
{
- ScAddress aPos = t->GetSingleRef()->toAbs(rTopCell.aPos);
+ const ScSingleRefData* pRef = t->GetSingleRef();
+ ScAddress aPos = pRef->toAbs(rTopCell.aPos);
ScFormulaCell** pp = ppSharedTop;
ScFormulaCell** ppEnd = ppSharedTop + xGroup->mnLength;
- for (; pp != ppEnd; ++pp, aPos.IncRow())
+ for (; pp != ppEnd; ++pp)
{
if (!aPos.IsValid())
break;
rDoc.StartListeningCell(rCxt, aPos, **pp);
+ if (pRef->IsRowRel())
+ aPos.IncRow();
}
}
break;