[ooo-build-commit] patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Jun 30 10:10:14 PDT 2009
patches/dev300/calc-perf-flat-segment-tree.diff | 22 ++++++++++++++++++++--
patches/dev300/calc-perf-table-hidden-flags.diff | 10 ++++++++++
2 files changed, 30 insertions(+), 2 deletions(-)
New commits:
commit f1f962d0abd586721bf83acb4ab97cfe17cacb56
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Jun 30 13:08:24 2009 -0400
Shift row flags upward when rows are deleted.
This fixes the problem of row flag going out-of-sync when rows
are deleted. But this is still a partial fix, as I also need to
take care of row insertions. (n#516406)
* patches/dev300/calc-perf-flat-segment-tree.diff:
* patches/dev300/calc-perf-table-hidden-flags.diff:
diff --git a/patches/dev300/calc-perf-flat-segment-tree.diff b/patches/dev300/calc-perf-flat-segment-tree.diff
index 8871733..caf2dc8 100644
--- a/patches/dev300/calc-perf-flat-segment-tree.diff
+++ b/patches/dev300/calc-perf-flat-segment-tree.diff
@@ -984,7 +984,7 @@ new file mode 100644
index 0000000..f414002
--- /dev/null
+++ sc/inc/segmenttree.hxx
-@@ -0,0 +1,85 @@
+@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1040,6 +1040,7 @@ index 0000000..f414002
+ void setFalse(SCROW nRow1, SCROW nRow2);
+ bool getValue(SCROW nRow);
+ bool getRangeData(SCROW nRow, RangeData& rData);
++ void removeSegment(SCROW nRow1, SCROW nRow2);
+
+private:
+ ::std::auto_ptr<ScFlatBoolSegmentsImpl> mpImpl;
@@ -1063,6 +1064,7 @@ index 0000000..f414002
+ void setFalse(SCCOL nCol1, SCCOL nCol2);
+ bool getValue(SCCOL nCol);
+ bool getRangeData(SCCOL nCol, RangeData& rData);
++ void removeSegment(SCCOL nCol1, SCCOL nCol2);
+
+private:
+ ::std::auto_ptr<ScFlatBoolSegmentsImpl> mpImpl;
@@ -1097,7 +1099,7 @@ new file mode 100644
index 0000000..b534de1
--- /dev/null
+++ sc/source/core/data/segmenttree.cxx
-@@ -0,0 +1,193 @@
+@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1152,6 +1154,7 @@ index 0000000..b534de1
+ void setFalse(SCCOLROW nPos1, SCCOLROW nPos2);
+ bool getValue(SCCOLROW nPos);
+ bool getRangeData(SCCOLROW nPos, RangeData& rData);
++ void removeSegment(SCCOLROW nPos1, SCCOLROW nPos2);
+
+private:
+ ScFlatBoolSegmentsImpl();
@@ -1216,6 +1219,11 @@ index 0000000..b534de1
+ return true;
+}
+
++void ScFlatBoolSegmentsImpl::removeSegment(SCCOLROW nPos1, SCCOLROW nPos2)
++{
++ maSegments.shift_segment_left(nPos1, nPos2);
++}
++
+// ============================================================================
+
+ScFlatBoolRowSegments::ScFlatBoolRowSegments() :
@@ -1254,6 +1262,11 @@ index 0000000..b534de1
+ return true;
+}
+
++void ScFlatBoolRowSegments::removeSegment(SCROW nRow1, SCROW nRow2)
++{
++ mpImpl->removeSegment(static_cast<SCCOLROW>(nRow1), static_cast<SCCOLROW>(nRow2));
++}
++
+// ============================================================================
+
+ScFlatBoolColSegments::ScFlatBoolColSegments() :
@@ -1291,3 +1304,8 @@ index 0000000..b534de1
+ rData.mnCol2 = static_cast<SCCOL>(aData.mnPos2);
+ return true;
+}
++
++void ScFlatBoolColSegments::removeSegment(SCCOL nCol1, SCCOL nCol2)
++{
++ mpImpl->removeSegment(static_cast<SCCOLROW>(nCol1), static_cast<SCCOLROW>(nCol1));
++}
diff --git a/patches/dev300/calc-perf-table-hidden-flags.diff b/patches/dev300/calc-perf-table-hidden-flags.diff
index f4a4e88..5bfd8f4 100644
--- a/patches/dev300/calc-perf-table-hidden-flags.diff
+++ b/patches/dev300/calc-perf-table-hidden-flags.diff
@@ -1016,6 +1016,16 @@ diff --git sc/source/core/data/table2.cxx sc/source/core/data/table2.cxx
index 151e3d7..2220604 100644
--- sc/source/core/data/table2.cxx
+++ sc/source/core/data/table2.cxx
+@@ -157,6 +157,9 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
+ if (pOutlineTable->DeleteRow( nStartRow, nSize ))
+ if (pUndoOutline)
+ *pUndoOutline = TRUE;
++
++ mpFilteredRows->removeSegment(nStartRow, nStartRow+nSize);
++ mpHiddenRows->removeSegment(nStartRow, nStartRow+nSize);
+ }
+
+ { // scope for bulk broadcast
@@ -353,20 +353,21 @@ void ScTable::CopyToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
// copy widths/heights, and only "hidden", "filtered" and "manual" flags
// also for all preceding columns/rows, to have valid positions for drawing objects
More information about the ooo-build-commit
mailing list