From 00cf864e5d317016d7224c199aa982d07bd70113 Mon Sep 17 00:00:00 2001 From: Damjan Jovanovic Date: Mon, 4 Apr 2016 04:11:07 +0000 Subject: 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 --- sc/qa/unit/ucalc.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sc/qa') 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); -- cgit