diff options
author | Eike Rathke <erack@redhat.com> | 2023-01-01 15:35:16 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2023-01-01 20:26:05 +0000 |
commit | cf8cfee9d4e64dba6a14dde16f08a7699fdff863 (patch) | |
tree | 542d652e8146c6cc9234771e95d81589c4a72154 /include/formula | |
parent | efda8aa8ee0e8ec7afe5ad56937ae2e3c5570c32 (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 'include/formula')
-rw-r--r-- | include/formula/FormulaCompiler.hxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index d94dbd40d399..08710f561b5a 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -83,12 +83,13 @@ public: { OpCodeHashMap maHashMap; /// Hash map of symbols, OUString -> OpCode std::unique_ptr<OUString[]> mpTable; /// Array of symbols, OpCode -> OUString, offset==OpCode - ExternalHashMap maExternalHashMap; /// Hash map of ocExternal, Filter String -> AddIn String - ExternalHashMap maReverseExternalHashMap; /// Hash map of ocExternal, AddIn String -> Filter String + ExternalHashMap maExternalHashMap; /// Hash map of ocExternal, Filter String -> AddIn String + ExternalHashMap maReverseExternalHashMap; /// Hash map of ocExternal, AddIn String -> Filter String FormulaGrammar::Grammar meGrammar; /// Grammar, language and reference convention sal_uInt16 mnSymbols; /// Count of OpCode symbols - bool mbCore : 1; /// If mapping was setup by core, not filters - bool mbEnglish : 1; /// If English symbols and external names + bool mbCore : 1; /// If mapping was setup by core, not filters + bool mbEnglish : 1; /// If English symbols and external names + bool mbEnglishLocale : 1; /// If English locale for numbers OpCodeMap( const OpCodeMap& ) = delete; OpCodeMap& operator=( const OpCodeMap& ) = delete; @@ -101,7 +102,8 @@ public: meGrammar( eGrammar), mnSymbols( nSymbols), mbCore( bCore), - mbEnglish ( FormulaGrammar::isEnglish(eGrammar) ) + mbEnglish ( FormulaGrammar::isEnglish(eGrammar) ), + mbEnglishLocale ( mbEnglish ) { } @@ -145,6 +147,10 @@ public: be English as well)? */ bool isEnglish() const { return mbEnglish; } + /** Are inline numbers parsed/formatted in en-US locale, as opposed + to default locale? */ + bool isEnglishLocale() const { return mbEnglishLocale; } + /// Is it an ODF 1.1 compatibility mapping? bool isPODF() const { return FormulaGrammar::isPODF( meGrammar); } |