[ooo-build-commit] .: patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Apr 28 17:50:02 PDT 2010


 patches/dev300/apply                             |    3 +++
 patches/dev300/calc-extref-trim-empty-cells.diff |   20 ++++++++++++++++++++
 2 files changed, 23 insertions(+)

New commits:
commit 25e5a1a5b231bec684eeab2b89d31fa9b8457c55
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Apr 28 20:47:56 2010 -0400

    Trim empty cells at the bottom of columns when fetching external range.
    
    See n#600667 and i#110595 for details.
    
    * patches/dev300/apply:
    * patches/dev300/calc-extref-trim-empty-cells.diff:

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 4591546..a1f8aa4 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3748,6 +3748,9 @@ calc-formula-db-function-fix.diff, n#594332, n#595713, kohei
 # Avoid exporting negative decimal places in ods format.
 calc-autodecimal-ods-fix.diff, i#110634, kohei
 
+# Trim empty cells at the bottom of columns.
+calc-extref-trim-empty-cells.diff, n#600667, i#110595, kohei
+
 [ GentooExperimental ]
 SectionOwner => hmth
 # jemalloc, FreeBSD 7 allocator
diff --git a/patches/dev300/calc-extref-trim-empty-cells.diff b/patches/dev300/calc-extref-trim-empty-cells.diff
new file mode 100644
index 0000000..9373f0e
--- /dev/null
+++ b/patches/dev300/calc-extref-trim-empty-cells.diff
@@ -0,0 +1,20 @@
+diff --git sc/source/ui/docshell/externalrefmgr.cxx sc/source/ui/docshell/externalrefmgr.cxx
+index b97fad5..330f559 100644
+--- sc/source/ui/docshell/externalrefmgr.cxx
++++ sc/source/ui/docshell/externalrefmgr.cxx
+@@ -574,6 +574,15 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData(
+             }
+         }
+ #else
++        vector<SCROW> aRows;
++        pTab->getAllRows(aRows, nDataRow1, nDataRow2);
++        if (aRows.empty())
++            // Cache is empty.
++            return TokenArrayRef();
++        else
++            // Trim the column below the last non-empty row.
++            nDataRow2 = aRows.back();
++
+         // Empty all matrix elements first, and fill only non-empty elements.
+         for (SCROW nRow = nDataRow1; nRow <= nDataRow2; ++nRow)
+         {


More information about the ooo-build-commit mailing list