summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2023-01-01 15:35:16 +0100
committerEike Rathke <erack@redhat.com>2023-01-01 20:26:05 +0000
commitcf8cfee9d4e64dba6a14dde16f08a7699fdff863 (patch)
tree542d652e8146c6cc9234771e95d81589c4a72154 /formula
parentefda8aa8ee0e8ec7afe5ad56937ae2e3c5570c32 (diff)
Resolves: tdf#151886 Use default locale with English function names again
Automatically switching to en-US locale when using English function names caused too much confusion. There also might be the possibility that the '.' dot decimal separator clashes with the inline array column separator in some locales. A proper solution would make this user-specified and if set also adjust the separators to the common English ones. For now keep the default locale again as it previously was the case. Change-Id: Ic4712c6609c14f35cf0d1d842ac7443806a6e115 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144924 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index b0e21b250377..f7dcba3f9853 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1313,7 +1313,17 @@ void FormulaCompiler::OpCodeMap::copyFrom( const OpCodeMap& r )
maExternalHashMap = r.maExternalHashMap;
maReverseExternalHashMap = r.maReverseExternalHashMap;
mbCore = r.mbCore;
- mbEnglish = r.mbEnglish;
+ if (mbEnglish != r.mbEnglish)
+ {
+ // For now keep mbEnglishLocale setting, which is false for a
+ // non-English native map we're copying to.
+ /* TODO:
+ if (!mbEnglish && r.mbEnglish)
+ mbEnglishLocale = "getUseEnglishLocaleFromConfiguration()";
+ or set from outside i.e. via ScCompiler.
+ */
+ mbEnglish = r.mbEnglish;
+ }
}
}
@@ -2658,7 +2668,7 @@ const FormulaToken* FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuf
void FormulaCompiler::AppendDouble( OUStringBuffer& rBuffer, double fVal ) const
{
- if ( mxSymbols->isEnglish() )
+ if ( mxSymbols->isEnglishLocale() )
{
::rtl::math::doubleToUStringBuffer( rBuffer, fVal,
rtl_math_StringFormat_Automatic,