summaryrefslogtreecommitdiff
path: root/sc
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:55:54 -0500
commit52781a55441cb270ffecc2522d1e069141a21607 (patch)
tree21ff12e560af727f1a55f2fcc1a8c8829f100f9d /sc
parent842848cb6d6c88fcf2c2b17d5e933458fa5d2ece (diff)
fdo#86572: Increment row position *only when* the row ref is relative.
This is just a simple oversight. Change-Id: I024777c46641cce3410a20f40c48f47ad6a5dade
Diffstat (limited to 'sc')
-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;