[ooo-build-commit] patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Oct 19 21:16:06 PDT 2009


 patches/dev300/calc-perf-copy-table-flags.diff |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 33e2a9488d8b2256a9acf3643b32a968d2e4952e
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Oct 20 00:15:27 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 40b728c..26a53df 100644
--- a/patches/dev300/calc-perf-copy-table-flags.diff
+++ b/patches/dev300/calc-perf-copy-table-flags.diff
@@ -34,7 +34,7 @@ index 889510f..0857312 100644
                      }
  
                  if (bHeight)
-@@ -692,28 +694,45 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+@@ -692,28 +694,58 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
  					bool bChange = pDestTab->pRowHeight->SumValues(nRow1, nRow2) != pRowHeight->SumValues(nRow1, nRow2);
  
  					if (bChange)
@@ -58,11 +58,12 @@ index 889510f..0857312 100644
  
 -						if (bHiddenChange)
 -							pDestTab->InvalidatePageBreaks();
++                    // Hidden flags.
 +                    for (SCROW i = nRow1; i <= nRow2; ++i)
 +                    {
 +                        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);
@@ -85,6 +86,18 @@ index 889510f..0857312 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;
++                    }
                  }
                  pDestTab->DecRecalcLevel();
              }


More information about the ooo-build-commit mailing list