diff options
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/calcconfig.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/xeformula.cxx | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 8f86ce54af25..b70af7dc3152 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -964,7 +964,7 @@ OpCode FormulaCompiler::GetEnglishOpCode( const OUString& rName ) const formula::OpCodeHashMap::const_iterator iLook( xMap->getHashMap()->find( rName ) ); bool bFound = (iLook != xMap->getHashMap()->end()); - return bFound ? (*iLook).second : OpCode(ocNone); + return bFound ? (*iLook).second : ocNone; } bool FormulaCompiler::IsOpCodeVolatile( OpCode eOp ) @@ -2306,7 +2306,7 @@ void FormulaCompiler::AppendDouble( OUStringBuffer& rBuffer, double fVal ) const void FormulaCompiler::AppendBoolean( OUStringBuffer& rBuffer, bool bVal ) const { - rBuffer.append( mxSymbols->getSymbol( static_cast<OpCode>(bVal ? ocTrue : ocFalse)) ); + rBuffer.append( mxSymbols->getSymbol( bVal ? ocTrue : ocFalse ) ); } void FormulaCompiler::AppendString( OUStringBuffer& rBuffer, const OUString & rStr ) diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 2a0b1f305276..97863bbacd23 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -192,7 +192,7 @@ ScCalcConfig::OpCodeSet ScStringToOpCodeSet(const OUString& rOpCodes) { auto opcode(pHashMap->find(element)); if (opcode != pHashMap->end()) - result->insert(static_cast<OpCode>(opcode->second)); + result->insert(opcode->second); else SAL_WARN("sc.opencl", "Unrecognized OpCode " << element << " in OpCode set string"); } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index e5cef31ca269..3fc28488dc5b 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4708,8 +4708,8 @@ bool ScCompiler::HandleRange() // in short: if it isn't a self-contained expression. FormulaToken* p1 = pArr->PeekPrevNoSpaces(); FormulaToken* p2 = pArr->PeekNextNoSpaces(); - OpCode eOp1 = (p1 ? p1->GetOpCode() : static_cast<OpCode>( ocSep ) ); - OpCode eOp2 = (p2 ? p2->GetOpCode() : static_cast<OpCode>( ocSep ) ); + OpCode eOp1 = (p1 ? p1->GetOpCode() : ocSep); + OpCode eOp2 = (p2 ? p2->GetOpCode() : ocSep); bool bBorder1 = (eOp1 == ocSep || eOp1 == ocOpen); bool bBorder2 = (eOp2 == ocSep || eOp2 == ocClose); bool bAddPair = !(bBorder1 && bBorder2); @@ -5353,8 +5353,8 @@ bool ScCompiler::HandleColRowName() FormulaToken* p1 = pArr->PeekPrevNoSpaces(); FormulaToken* p2 = pArr->PeekNextNoSpaces(); // begin/end of a formula => single - OpCode eOp1 = p1 ? p1->GetOpCode() : static_cast<OpCode>( ocAdd ); - OpCode eOp2 = p2 ? p2->GetOpCode() : static_cast<OpCode>( ocAdd ); + OpCode eOp1 = p1 ? p1->GetOpCode() : ocAdd; + OpCode eOp2 = p2 ? p2->GetOpCode() : ocAdd; if ( eOp1 != ocColRowName && eOp1 != ocIntersect && eOp2 != ocColRowName && eOp2 != ocIntersect ) { diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index 79dce1e5bdc6..97e1907df15b 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -60,7 +60,7 @@ struct XclExpScToken explicit XclExpScToken() : mpScToken( nullptr ), mnSpaces( 0 ) {} bool Is() const { return mpScToken != nullptr; } StackVar GetType() const { return mpScToken ? mpScToken->GetType() : static_cast< StackVar >( svUnknown ); } - OpCode GetOpCode() const { return mpScToken ? mpScToken->GetOpCode() : static_cast< OpCode >( ocNone ); } + OpCode GetOpCode() const { return mpScToken ? mpScToken->GetOpCode() : ocNone; } }; /** Effective token class conversion types. */ |