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-02 02:21:12 +0000
commit29d8b78c6b0bcbcf3f66e123194325008f7bc029 (patch)
tree78958923e038576ffcd1bcdd28339ef05020c2f4 /formula
parent1f4214d7c3328bb6eb62656219a8322dfeaeb913 (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 (cherry picked from commit cf8cfee9d4e64dba6a14dde16f08a7699fdff863) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144905
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,