diff options
author | Eike Rathke <erack@redhat.com> | 2015-04-30 01:52:53 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-04-30 01:55:00 +0200 |
commit | 0cd88d27ecd87c8c5791418bcac6ab1684ece74a (patch) | |
tree | 50b01f5b90c63a3ee4549d1c78d8a58a086d39ce | |
parent | 010b2d2d9be846fb6b10848204e29e1bc00ef1ea (diff) |
simplify logic and less comparisons, fdo#69552 follow-up
Change-Id: Id1150b53a57a6b7d9a6c623637c123e4f37a0876
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index f2a54d46cfa1..c07f0eae3fb9 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2507,21 +2507,18 @@ bool ScCompiler::IsOpCode( const OUString& rName, bool bInArray ) if (bFound) { OpCode eOp = iLook->second; - if ( eOp != ocOpen && eOp != ocClose ) + if (bInArray) { - if (bInArray) - { - if (rName.equals(mxSymbols->getSymbol(ocArrayColSep))) - eOp = ocArrayColSep; - else if (rName.equals(mxSymbols->getSymbol(ocArrayRowSep))) - eOp = ocArrayRowSep; - } - else if (mxSymbols->isOOXML()) - { - // OOXML names that need to treated differently on import. - if ( rName.equalsIgnoreAsciiCaseAscii( "_XLFN.CEILING.MATH" ) ) - eOp = ocCeil_Math; - } + if (rName.equals(mxSymbols->getSymbol(ocArrayColSep))) + eOp = ocArrayColSep; + else if (rName.equals(mxSymbols->getSymbol(ocArrayRowSep))) + eOp = ocArrayRowSep; + } + else if (eOp == ocCeil && mxSymbols->isOOXML()) + { + // Ensure that _xlfn.CEILING.MATH maps to ocCeil_Math. ocCeil is + // unassigned for import. + eOp = ocCeil_Math; } maRawToken.SetOpCode(eOp); } |