diff options
author | Eike Rathke <erack@redhat.com> | 2014-03-06 01:23:37 +0100 |
---|---|---|
committer | Kohei Yoshida <libreoffice@kohei.us> | 2014-03-06 21:45:10 -0600 |
commit | 3ce626c81ac4a9b4b70c61d9fa576f6ae2c85c8f (patch) | |
tree | f11d2232c5549617f7294e06321194971593e52e /sc | |
parent | 016a231ef0a6bfb3c4b74a0e6d6d7431f42755c1 (diff) |
resolved fdo#61520 do not add multiple empty strings to the validation list
(cherry picked from commit 7122ef19847b26529ed1d5bad40df869e91a8495)
Backported.
Change-Id: I4f6180b2f8c914a965965ca362e1670e8b434d37
Reviewed-on: https://gerrit.libreoffice.org/8470
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/validat.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index 56902f818b32..b9d426065bdb 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -710,6 +710,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 @@ -730,6 +732,16 @@ bool ScValidationData::GetSelectionFromFormula( { aValStr = nMatVal.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.Len()) + { + if (bHaveEmpty) + continue; + bHaveEmpty = true; + } + if( NULL != pStrings ) pEntry = new ScTypedStrData( aValStr, 0.0, ScTypedStrData::Standard); |