summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorDamjan Jovanovic <damjan@apache.org>2016-04-04 04:11:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-04-05 20:24:51 +0100
commit00cf864e5d317016d7224c199aa982d07bd70113 (patch)
tree9369746a0b67485dfd6aa4fd36c31886f428604c /sc/qa
parentdd46727b99d4bb5135451aa7e5e1bdb197373843 (diff)
Resolves: #i126901# CSV import: values with + or - followed by...
thousand separator and 3 digits (eg. +,123) are imported as a number Do not allow numbers parsed from CVS files when "Detect special numbers" is off, to contain thousand separators before digits, even if after a +/- sign (eg. -,123 or +,789). Treat these as strings instead. Also added unit tests for this. Patch by: me (cherry picked from commit 10458a24f4e6cc311e65fb80ce576fed39937be2) Change-Id: Ic946fc6a11326861f238157ddb651bc5a5b28edd
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/ucalc.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index fb78981ac426..f46cd76808ff 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -1815,7 +1815,9 @@ void Test::testCSV()
{ "1.0 ", European, false, 0.0 },
{ "1.000", European, true, 1000.0 },
{ "1137.999", English, true, 1137.999 },
- { "1.000.00", European, false, 0.0 }
+ { "1.000.00", European, false, 0.0 },
+ { "+,123", English, false, 0.0 },
+ { "-,123", English, false, 0.0 }
};
for (sal_uInt32 i = 0; i < SAL_N_ELEMENTS(aTests); i++) {
OUString aStr(aTests[i].pStr, strlen (aTests[i].pStr), RTL_TEXTENCODING_UTF8);