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

Michael Meeks michael.meeks at collabora.com
Fri Nov 4 13:27:23 UTC 2016


 sc/source/core/data/table6.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 5946cc2f7056fc580fefe1b90795e3921bdb3969
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Nov 4 09:46:29 2016 +0000

    tdf#91260 - ReplaceAll should use a columnar direction.
    
    MDDS is columnular, so this shrinks the working set very
    significantly, and should improve performance.
    
    Change-Id: I2aff92b31bfc459e85291059d977541aa65155cf
    Reviewed-on: https://gerrit.libreoffice.org/30562
    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/table6.cxx b/sc/source/core/data/table6.cxx
index d983a55..636ca56 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -571,10 +571,14 @@ bool ScTable::ReplaceAll(
     else
         GetLastDataPos(nLastCol, nLastRow);
 
+    // tdf#92160 - columnular replace is faster, and more memory efficient.
+    SvxSearchItem aCopyItem(rSearchItem);
+    aCopyItem.SetRowDirection(false);
+
     bool bEverFound = false;
     while (true)
     {
-        bool bFound = Search(rSearchItem, nCol, nRow, nLastCol, nLastRow, rMark, rUndoStr, pUndoDoc);
+        bool bFound = Search(aCopyItem, nCol, nRow, nLastCol, nLastRow, rMark, rUndoStr, pUndoDoc);
 
         if (bFound)
         {


More information about the Libreoffice-commits mailing list