Kaydet (Commit) 0ce0999f authored tarafından Eike Rathke's avatar Eike Rathke

Check decimalSeparatorAlternative in GetDefaultFormulaSeparators(), tdf#81671

Change-Id: Idf413d1e9db4f63bd90888f1dfc6a5d9455e47cb
üst ca214981
......@@ -88,13 +88,19 @@ void ScFormulaOptions::GetDefaultFormulaSeparators(
sal_Unicode cDecSep = rDecSep[0];
sal_Unicode cListSep = rListSep[0];
sal_Unicode cDecSepAlt = rLocaleData.getNumDecimalSepAlt().toChar(); // usually 0 (empty)
// Excel by default uses system's list separator as the parameter
// separator, which in English locales is a comma. However, OOo's list
// separator value is set to ';' for all English locales. Because of this
// discrepancy, we will hardcode the separator value here, for now.
if (cDecSep == '.')
// Similar for decimal separator alternative.
// However, if the decimal separator alternative is '.' and the decimal
// separator is ',' this makes no sense, fall back to ';' in that case.
if (cDecSep == '.' || (cDecSepAlt == '.' && cDecSep != ','))
cListSep = ',';
else if (cDecSep == ',' && cDecSepAlt == '.')
cListSep = ';';
// Special case for de_CH locale.
if (rLocale.Language == "de" && rLocale.Country == "CH")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment