summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-03-06 01:23:37 +0100
committerEike Rathke <erack@redhat.com>2014-03-06 01:25:51 +0100
commit7122ef19847b26529ed1d5bad40df869e91a8495 (patch)
tree838faf2dfb96c5c9dbae8d68877e4e0d9bd888a1
parent95637452609260c97d8e5aaa7500531bb458a8bc (diff)
resolved fdo#61520 do not add multiple empty strings to the validation list
Change-Id: I4f6180b2f8c914a965965ca362e1670e8b434d37
-rw-r--r--sc/source/core/data/validat.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 78893022fc6a..abfe67d4a4d4 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -717,6 +717,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
@@ -737,6 +739,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);