[Libreoffice-commits] core.git: sc/source

Michael Meeks michael.meeks at collabora.com
Mon Dec 21 06:30:38 PST 2015


 sc/source/core/data/dpfilteredcache.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 6833f382c5c8350256e97e2b342eb939a8c373ba
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Dec 18 22:37:19 2015 +0000

    tdf#96588 - avoid redundant work on large numbers of trailing rows.
    
    No need to crunch the same data repeatedly for up to 1 million rows.
    
    Change-Id: Iab70187bc7ca5fc4c6c73810d6a8b76808073433
    Reviewed-on: https://gerrit.libreoffice.org/20812
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/sc/source/core/data/dpfilteredcache.cxx b/sc/source/core/data/dpfilteredcache.cxx
index 3d93d74..5714ad2 100644
--- a/sc/source/core/data/dpfilteredcache.cxx
+++ b/sc/source/core/data/dpfilteredcache.cxx
@@ -190,6 +190,11 @@ void ScDPFilteredCache::fillTable(
             SCROW nIndex = getCache().GetItemDataId(nCol, nRow, bRepeatIfEmpty);
             SCROW nOrder = getOrder(nCol, nIndex);
             aAdded[nOrder] = nIndex;
+
+            // tdf#96588 - large numbers of trailing identical empty
+            // rows generate the same nIndex & nOrder.
+            if (nRow == nDataSize)
+                break;
         }
         for (SCROW nRow = 0; nRow < nMemCount; ++nRow)
         {


More information about the Libreoffice-commits mailing list