summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-03-19 15:52:07 +0000
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-03-19 13:40:26 -0400
commit244033d7148e0badbf5915e21b7f2d67e41bf4eb (patch)
treef1082a105d218f94617a72387368f1f3574bbee4 /sc
parent290d192a9e7f1877b08537da379d09a8a557c94f (diff)
get row offset calculation right for groups.
Change-Id: Id65174bbb70a4387cddb985d0556a3bcd692d671
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/column3.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index f702b25213a8..fb6c2122c41b 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2028,6 +2028,7 @@ void ScColumn::RebuildFormulaGroups()
if ( rCur.pCell && rCur.pCell->GetCellType() == CELLTYPE_FORMULA )
static_cast<ScFormulaCell *>( rCur.pCell )->SetCellGroup( xNone );
}
+ maFnGroups.clear();
// re-build groups
ColDoubleEntry *pLastDouble = NULL;
@@ -2049,7 +2050,7 @@ void ScColumn::RebuildFormulaGroups()
if ( !pLastDouble )
{
pLastDouble = new ColDoubleEntry();
- pLastDouble->mnStart = i - 1;
+ pLastDouble->mnStart = rPrev.nRow;
pLastDouble->maData.push_back(
static_cast< ScValueCell * >( rPrev.pCell )->GetValue() );
maDoubles.push_back( pLastDouble );
@@ -2081,7 +2082,7 @@ void ScColumn::RebuildFormulaGroups()
// create a new group ...
ScFormulaCellGroup *pGroup = new ScFormulaCellGroup();
pGroup->mpDelta = pDelta;
- pGroup->mnStart = i - 1;
+ pGroup->mnStart = rPrev.nRow;
pGroup->mnLength = 2;
xGroup.reset( pGroup );