[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source

Eike Rathke erack at redhat.com
Thu Mar 6 19:38:17 PST 2014


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

New commits:
commit b1119c7b80b70672f86c3415725bc0806be14981
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Mar 6 01:23:37 2014 +0100

    resolved fdo#61520 do not add multiple empty strings to the validation list
    
    Change-Id: I4f6180b2f8c914a965965ca362e1670e8b434d37
    (cherry picked from commit 7122ef19847b26529ed1d5bad40df869e91a8495)
    Reviewed-on: https://gerrit.libreoffice.org/8469
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index b7e51ba..cbd3a94 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -713,6 +713,8 @@ bool ScValidationData::GetSelectionFromFormula(
         }
     }
 
+    bool bHaveEmpty = false;
+
     /* XL artificially limits things to a single col or row in the UI but does
      * not list the constraint in MOOXml. If a defined name or INDIRECT
      * resulting in 1D is entered in the UI and the definition later modified
@@ -733,6 +735,16 @@ bool ScValidationData::GetSelectionFromFormula(
             {
                 aValStr = nMatVal.GetString().getString();
 
+                // Do not add multiple empty strings to the validation list,
+                // especially not if they'd bloat the tail with a million empty
+                // entries for a column range, fdo#61520
+                if (aValStr.isEmpty())
+                {
+                    if (bHaveEmpty)
+                        continue;
+                    bHaveEmpty = true;
+                }
+
                 if( NULL != pStrings )
                     pEntry = new ScTypedStrData( aValStr, 0.0, ScTypedStrData::Standard);
 


More information about the Libreoffice-commits mailing list