[ooo-build-commit] Branch 'ooo-build-3-2' - patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Jan 4 17:59:50 PST 2010
patches/dev300/apply | 3
patches/dev300/calc-perf-last-rowflags-fix.diff | 81 +++++++++++++++++
patches/dev300/calc-perf-speedup-pagebreak-update.diff | 2
3 files changed, 85 insertions(+), 1 deletion(-)
New commits:
commit 0d56cd27215394ac8ced9e1b4125ef21816bdc8b
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Mon Jan 4 20:57:21 2010 -0500
Correctly query last flagged row, using all row flag containers.
Fixes n#568146.
* patches/dev300/apply: add new patch.
* patches/dev300/calc-perf-last-rowflags-fix.diff: Use manual page breaks,
hidden/filtered flags when querying for last used row.
* patches/dev300/calc-perf-speedup-pagebreak-update.diff: fixed a bug in
findLastNotOf() method.
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 216d217..476947c 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -899,6 +899,9 @@ calc-perf-page-and-manual-breaks-fwd-iterator.diff, n#503482, kohei
# Refactor row height storage to speed up page break updates.
calc-perf-speedup-pagebreak-update.diff, n#554955, kohei
+# Use manual breaks hidden/filtered flags when querying for last flagged row.
+calc-perf-last-rowflags-fix.diff, n#568146, kohei
+
[ LinuxOnly ]
# accelerate linking, by extreme cunning i#63927
# this is an increasingly marginal win ...
diff --git a/patches/dev300/calc-perf-last-rowflags-fix.diff b/patches/dev300/calc-perf-last-rowflags-fix.diff
new file mode 100644
index 0000000..14ee14d
--- /dev/null
+++ b/patches/dev300/calc-perf-last-rowflags-fix.diff
@@ -0,0 +1,81 @@
+diff --git sc/inc/segmenttree.hxx sc/inc/segmenttree.hxx
+index 3199f7d..3522d9b 100644
+--- sc/inc/segmenttree.hxx
++++ sc/inc/segmenttree.hxx
+@@ -83,6 +83,8 @@ public:
+ void removeSegment(SCROW nRow1, SCROW nRow2);
+ void insertSegment(SCROW nRow, SCROW nSize, bool bSkipStartBoundary);
+
++ SCROW findLastNotOf(bool bValue) const;
++
+ private:
+ ::std::auto_ptr<ScFlatBoolSegmentsImpl> mpImpl;
+ };
+diff --git sc/source/core/data/segmenttree.cxx sc/source/core/data/segmenttree.cxx
+index e852efd..7097157 100644
+--- sc/source/core/data/segmenttree.cxx
++++ sc/source/core/data/segmenttree.cxx
+@@ -352,6 +352,11 @@ void ScFlatBoolRowSegments::insertSegment(SCROW nRow, SCROW nSize, bool bSkipSta
+ mpImpl->insertSegment(static_cast<SCCOLROW>(nRow), static_cast<SCCOLROW>(nSize), bSkipStartBoundary);
+ }
+
++SCROW ScFlatBoolRowSegments::findLastNotOf(bool bValue) const
++{
++ return static_cast<SCROW>(mpImpl->findLastNotOf(bValue));
++}
++
+ // ============================================================================
+
+ ScFlatBoolColSegments::ScFlatBoolColSegments() :
+diff --git sc/source/core/data/table2.cxx sc/source/core/data/table2.cxx
+index f0a0815..35c126d 100644
+--- sc/source/core/data/table2.cxx
++++ sc/source/core/data/table2.cxx
+@@ -2689,11 +2689,32 @@ BYTE ScTable::GetRowFlags( SCROW nRow ) const
+
+ SCROW ScTable::GetLastFlaggedRow() const
+ {
+- if ( !pRowFlags )
+- return 0;
++ SCROW nLastFound = 0;
++ if (pRowFlags)
++ {
++ SCROW nRow = pRowFlags->GetLastAnyBitAccess( 0, sal::static_int_cast<BYTE>(CR_ALL) );
++ if (ValidRow(nRow))
++ nLastFound = nRow;
++ }
+
+- SCROW nLastFound = pRowFlags->GetLastAnyBitAccess( 0, sal::static_int_cast<BYTE>(CR_ALL) );
+- return ValidRow(nLastFound) ? nLastFound : 0;
++ if (!maRowManualBreaks.empty())
++ nLastFound = ::std::max(nLastFound, *maRowManualBreaks.rbegin());
++
++ if (mpHiddenRows)
++ {
++ SCROW nRow = mpHiddenRows->findLastNotOf(false);
++ if (ValidRow(nRow))
++ nLastFound = ::std::max(nLastFound, nRow);
++ }
++
++ if (mpFilteredRows)
++ {
++ SCROW nRow = mpFilteredRows->findLastNotOf(false);
++ if (ValidRow(nRow))
++ nLastFound = ::std::max(nLastFound, nRow);
++ }
++
++ return nLastFound;
+ }
+
+
+@@ -2716,9 +2737,7 @@ SCROW ScTable::GetLastChangedRow() const
+ if ( !pRowFlags )
+ return 0;
+
+- SCROW nLastFlags = pRowFlags->GetLastAnyBitAccess( 0, sal::static_int_cast<BYTE>(CR_ALL) );
+- if (!ValidRow(nLastFlags))
+- nLastFlags = 0;
++ SCROW nLastFlags = GetLastFlaggedRow();
+
+ // Find the last row position where the height is NOT the standard row
+ // height.
diff --git a/patches/dev300/calc-perf-speedup-pagebreak-update.diff b/patches/dev300/calc-perf-speedup-pagebreak-update.diff
index 4bad9b2..fddffec 100644
--- a/patches/dev300/calc-perf-speedup-pagebreak-update.diff
+++ b/patches/dev300/calc-perf-speedup-pagebreak-update.diff
@@ -472,7 +472,7 @@ index 0ee889b..98c5032 100644
+ {
+ if (itr->second != nValue)
+ {
-+ nPos = (--itr)->second - 1;
++ nPos = (--itr)->first - 1;
+ break;
+ }
+ }
More information about the ooo-build-commit
mailing list