[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Oct 19 20:59:59 PDT 2009
patches/dev300/calc-perf-copy-table-flags.diff | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
New commits:
commit 036b8fd60a700fd65626f36b1925e448e7975d6f
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Mon Oct 19 23:57:14 2009 -0400
Fixed filtered state corruption during undo.
* patches/dev300/calc-perf-copy-table-flags.diff: row's
filtered states were not copied over during undo. This
caused SUBTOTAL cell function to compute incorrect result
after undo. (n#545287)
diff --git a/patches/dev300/calc-perf-copy-table-flags.diff b/patches/dev300/calc-perf-copy-table-flags.diff
index 28d82b3..ce10033 100644
--- a/patches/dev300/calc-perf-copy-table-flags.diff
+++ b/patches/dev300/calc-perf-copy-table-flags.diff
@@ -10,7 +10,7 @@ index 7907caa..c719e4f 100644
if (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth)
for (SCCOL i=nCol1; i<=nCol2; i++)
{
-@@ -658,35 +659,50 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+@@ -658,35 +659,63 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
pCharts->SetRangeDirty(ScRange( i, 0, nTab, i, MAXROW, nTab ));
if (bChange)
@@ -30,6 +30,7 @@ index 7907caa..c719e4f 100644
- for (SCROW i=nRow1; i<=nRow2; i++)
+ pDestTab->pRowFlags->CopyFrom(*pRowFlags, nRow1, nRow2);
+
++ // Hidden flags.
+ for (SCROW i = nRow1; i <= nRow2; ++i)
{
- // TODO: might need some performance improvement, block
@@ -43,8 +44,8 @@ index 7907caa..c719e4f 100644
- if (bHiddenChange && pCharts)
- pCharts->SetRangeDirty(ScRange( 0, i, nTab, MAXCOL, i, nTab ));
+ SCROW nThisLastRow, nDestLastRow;
-+ bool bThisHidden = RowHidden(i, nThisLastRow);
-+ bool bDestHidden = pDestTab->RowHidden(i, nDestLastRow);
++ bool bThisHidden = RowHidden(i, NULL, &nThisLastRow);
++ bool bDestHidden = pDestTab->RowHidden(i, NULL, &nDestLastRow);
+
+ // If the segment sizes differ, we take the shorter segment of the two.
+ SCROW nLastRow = ::std::min(nThisLastRow, nDestLastRow);
@@ -69,6 +70,18 @@ index 7907caa..c719e4f 100644
+ // Jump to the last row of the identical flag segment.
+ i = nLastRow;
}
++
++ // Filtered flags.
++ for (SCROW i = nRow1; i <= nRow2; ++i)
++ {
++ SCROW nLastRow;
++ bool bFiltered = RowFiltered(i, NULL, &nLastRow);
++ if (nLastRow >= nRow2)
++ // the last row shouldn't exceed the upper bound the caller specified.
++ nLastRow = nRow2;
++ pDestTab->SetRowFiltered(i, nLastRow, bFiltered);
++ i = nLastRow;
++ }
}
+ if (bFlagChange)
More information about the ooo-build-commit
mailing list