diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-17 10:25:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-17 10:09:50 +0000 |
commit | 06f0d2d9f1ff0f6a8d1eddc693e4c4f65ec2b046 (patch) | |
tree | c2ab6a55156f972d721b3362dc4219bb4f639bba /formula | |
parent | dc003d59ea81d39bccc88f47b0a0d6c12f82357d (diff) |
convert FormulaCompiler::SeparatorType to scoped enum
and drop unused COMMA_BASE enumerator
Change-Id: I5f35ba7453d5ca613ebd65d0853c7caaa210f3de
Reviewed-on: https://gerrit.libreoffice.org/34357
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index d837e2e3a398..8f86ce54af25 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -147,7 +147,7 @@ class OpCodeList public: OpCodeList( sal_uInt16, FormulaCompiler::NonConstOpCodeMapPtr, - FormulaCompiler::SeparatorType = FormulaCompiler::SEMICOLON_BASE ); + FormulaCompiler::SeparatorType = FormulaCompiler::SeparatorType::SEMICOLON_BASE ); private: bool getOpCodeString( OUString& rStr, sal_uInt16 nOp ); @@ -165,7 +165,7 @@ OpCodeList::OpCodeList( sal_uInt16 nRID, FormulaCompiler::NonConstOpCodeMapPtr x { SvtSysLocale aSysLocale; const CharClass* pCharClass = (xMap->isEnglish() ? nullptr : aSysLocale.GetCharClassPtr()); - if (meSepType == FormulaCompiler::RESOURCE_BASE) + if (meSepType == FormulaCompiler::SeparatorType::RESOURCE_BASE) { for (sal_uInt16 i = 0; i <= SC_OPCODE_LAST_OPCODE_ID; ++i) { @@ -191,12 +191,7 @@ bool OpCodeList::getOpCodeString( OUString& rStr, sal_uInt16 nOp ) { case SC_OPCODE_SEP: { - if (meSepType == FormulaCompiler::COMMA_BASE) - { - rStr = ","; - return true; - } - else if (meSepType == FormulaCompiler::SEMICOLON_BASE) + if (meSepType == FormulaCompiler::SeparatorType::SEMICOLON_BASE) { rStr = ";"; return true; @@ -205,12 +200,7 @@ bool OpCodeList::getOpCodeString( OUString& rStr, sal_uInt16 nOp ) break; case SC_OPCODE_ARRAY_COL_SEP: { - if (meSepType == FormulaCompiler::COMMA_BASE) - { - rStr = ","; - return true; - } - else if (meSepType == FormulaCompiler::SEMICOLON_BASE) + if (meSepType == FormulaCompiler::SeparatorType::SEMICOLON_BASE) { rStr = ";"; return true; @@ -219,12 +209,7 @@ bool OpCodeList::getOpCodeString( OUString& rStr, sal_uInt16 nOp ) break; case SC_OPCODE_ARRAY_ROW_SEP: { - if (meSepType == FormulaCompiler::COMMA_BASE) - { - rStr = ";"; - return true; - } - else if (meSepType == FormulaCompiler::SEMICOLON_BASE) + if (meSepType == FormulaCompiler::SeparatorType::SEMICOLON_BASE) { rStr = "|"; return true; @@ -893,7 +878,7 @@ void FormulaCompiler::InitSymbolsPODF() const static OpCodeMapData aMap; osl::MutexGuard aGuard(&aMap.maMtx); if (!aMap.mxSymbolMap) - loadSymbols(RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF, FormulaGrammar::GRAM_PODF, aMap.mxSymbolMap, RESOURCE_BASE); + loadSymbols(RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF, FormulaGrammar::GRAM_PODF, aMap.mxSymbolMap, SeparatorType::RESOURCE_BASE); mxSymbolsPODF = aMap.mxSymbolMap; } @@ -903,7 +888,7 @@ void FormulaCompiler::InitSymbolsAPI() const osl::MutexGuard aGuard(&aMap.maMtx); if (!aMap.mxSymbolMap) // XFunctionAccess API always used PODF grammar, keep it. - loadSymbols(RID_STRLIST_FUNCTION_NAMES_ENGLISH_API, FormulaGrammar::GRAM_PODF, aMap.mxSymbolMap, RESOURCE_BASE); + loadSymbols(RID_STRLIST_FUNCTION_NAMES_ENGLISH_API, FormulaGrammar::GRAM_PODF, aMap.mxSymbolMap, SeparatorType::RESOURCE_BASE); mxSymbolsAPI = aMap.mxSymbolMap; } @@ -912,7 +897,7 @@ void FormulaCompiler::InitSymbolsODFF() const static OpCodeMapData aMap; osl::MutexGuard aGuard(&aMap.maMtx); if (!aMap.mxSymbolMap) - loadSymbols(RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF, FormulaGrammar::GRAM_ODFF, aMap.mxSymbolMap, RESOURCE_BASE); + loadSymbols(RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF, FormulaGrammar::GRAM_ODFF, aMap.mxSymbolMap, SeparatorType::RESOURCE_BASE); mxSymbolsODFF = aMap.mxSymbolMap; } @@ -937,7 +922,7 @@ void FormulaCompiler::InitSymbolsOOXML() const static OpCodeMapData aMap; osl::MutexGuard aGuard(&aMap.maMtx); if (!aMap.mxSymbolMap) - loadSymbols(RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML, FormulaGrammar::GRAM_OOXML, aMap.mxSymbolMap, RESOURCE_BASE); + loadSymbols(RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML, FormulaGrammar::GRAM_OOXML, aMap.mxSymbolMap, SeparatorType::RESOURCE_BASE); mxSymbolsOOXML = aMap.mxSymbolMap; } |