summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-05-14 11:17:13 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-05-14 13:15:11 -0400
commit69a7e7440cdafbaeddd344f61cc5dfe54750d509 (patch)
tree98eb2f408311889077da87014a5c6375ae72334a /formula
parent5db9391c0640450f3e30dfa9d2c9b8ff9c79b958 (diff)
Use "stop on error" concept rather than "ignore error if true".
Just to keep the pattern of "true" -> "action", "false" -> "no action". Change-Id: I6303bc779cd7048eef2fdc3c2abba8be8f15da6d
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 02c7a5eb9424..59839b4cc2b7 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -537,9 +537,9 @@ FormulaCompiler::FormulaCompiler( FormulaTokenArray& rArr )
meGrammar( formula::FormulaGrammar::GRAM_UNSPECIFIED ),
bAutoCorrect( false ),
bCorrected( false ),
- bIgnoreErrors( false ),
glSubTotal( false ),
- mbJumpCommandReorder(true)
+ mbJumpCommandReorder(true),
+ mbStopOnError(true)
{
}
@@ -555,9 +555,9 @@ FormulaCompiler::FormulaCompiler()
meGrammar( formula::FormulaGrammar::GRAM_UNSPECIFIED ),
bAutoCorrect( false ),
bCorrected( false ),
- bIgnoreErrors( false ),
glSubTotal( false ),
- mbJumpCommandReorder(true)
+ mbJumpCommandReorder(true),
+ mbStopOnError(true)
{
}
@@ -983,7 +983,7 @@ sal_uInt16 FormulaCompiler::GetErrorConstant( const OUString& rName ) const
void FormulaCompiler::SetCompileForFAP( bool bVal )
{
mbJumpCommandReorder = !bVal;
- bIgnoreErrors = bVal;
+ mbStopOnError = !bVal;
}
@@ -1041,7 +1041,7 @@ bool FormulaCompiler::GetToken()
aCorrectedSymbol = "";
}
bool bStop = false;
- if( pArr->GetCodeError() && !bIgnoreErrors )
+ if (pArr->GetCodeError() && mbStopOnError)
bStop = true;
else
{
@@ -1119,7 +1119,7 @@ bool FormulaCompiler::GetToken()
// RPN creation by recursion
void FormulaCompiler::Factor()
{
- if ( pArr->GetCodeError() && !bIgnoreErrors )
+ if (pArr->GetCodeError() && mbStopOnError)
return;
CurrentFactor pFacToken( this );
@@ -1157,7 +1157,7 @@ void FormulaCompiler::Factor()
{
NextToken();
eOp = Expression();
- while ((eOp == ocSep) && (!pArr->GetCodeError() || bIgnoreErrors))
+ while ((eOp == ocSep) && (!pArr->GetCodeError() || !mbStopOnError))
{ // range list (A1;A2) converted to (A1~A2)
pFacToken = mpToken;
NextToken();
@@ -1292,7 +1292,7 @@ void FormulaCompiler::Factor()
if( !bNoParam )
{
nSepCount++;
- while ( (eOp == ocSep) && (!pArr->GetCodeError() || bIgnoreErrors) )
+ while ((eOp == ocSep) && (!pArr->GetCodeError() || !mbStopOnError))
{
nSepCount++;
NextToken();
@@ -1364,7 +1364,7 @@ void FormulaCompiler::Factor()
}
short nJumpCount = 0;
while ( (nJumpCount < (FORMULA_MAXJUMPCOUNT - 1)) && (eOp == ocSep)
- && (!pArr->GetCodeError() || bIgnoreErrors) )
+ && (!pArr->GetCodeError() || !mbStopOnError))
{
if ( ++nJumpCount <= nJumpMax )
pFacToken->GetJump()[nJumpCount] = pc-1;
@@ -1641,7 +1641,7 @@ bool FormulaCompiler::CompileTokenArray()
{
glSubTotal = false;
bCorrected = false;
- if( !pArr->GetCodeError() || bIgnoreErrors )
+ if (!pArr->GetCodeError() || !mbStopOnError)
{
if ( bAutoCorrect )
{
@@ -1684,7 +1684,7 @@ bool FormulaCompiler::CompileTokenArray()
if( !pArr->GetCodeError() && nErrorBeforePop )
pArr->SetCodeError( nErrorBeforePop);
- if( pArr->GetCodeError() && !bIgnoreErrors )
+ if (pArr->GetCodeError() && mbStopOnError)
{
pArr->DelRPN();
pArr->SetHyperLink( false);