summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx9
-rw-r--r--formula/source/ui/dlg/formula.cxx4
-rw-r--r--include/formula/FormulaCompiler.hxx3
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx3
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx4
5 files changed, 15 insertions, 8 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 59839b4cc2b7..2e066af8d01d 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -980,12 +980,15 @@ sal_uInt16 FormulaCompiler::GetErrorConstant( const OUString& rName ) const
return nError;
}
-void FormulaCompiler::SetCompileForFAP( bool bVal )
+void FormulaCompiler::EnableJumpCommandReorder( bool bEnable )
{
- mbJumpCommandReorder = !bVal;
- mbStopOnError = !bVal;
+ mbJumpCommandReorder = bEnable;
}
+void FormulaCompiler::EnableStopOnError( bool bEnable )
+{
+ mbStopOnError = bEnable;
+}
void FormulaCompiler::AppendErrorConstant( OUStringBuffer& rBuffer, sal_uInt16 nError ) const
{
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 11d36ccc7ca7..3247f2a8dfcd 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -740,7 +740,9 @@ void FormulaDlg_Impl::UpdateTokenArray( const OUString& rStrExp)
} // if ( pTokens && nLen == m_aTokenList.getLength() )
FormulaCompiler aCompiler(*m_pTokenArray.get());
- aCompiler.SetCompileForFAP(true); // #i101512# special handling is needed
+ // #i101512# Disable special handling of jump commands.
+ aCompiler.EnableJumpCommandReorder(false);
+ aCompiler.EnableStopOnError(false);
aCompiler.CompileTokenArray();
}
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx
index ec1aba3782b1..81277c9ee4bb 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -227,7 +227,8 @@ public:
sal_uInt16 GetErrorConstant( const OUString& rName ) const;
- void SetCompileForFAP( bool bVal );
+ void EnableJumpCommandReorder( bool bEnable );
+ void EnableStopOnError( bool bEnable );
static bool IsOpCodeVolatile( OpCode eOp );
static bool IsOpCodeJumpCommand( OpCode eOp );
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 5b435f0f8f57..7e226366a556 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -323,7 +323,8 @@ void ScFormulaReferenceHelper::Init()
pRefComp.reset( new ScCompiler( pDoc, aCursorPos) );
pRefComp->SetGrammar( pDoc->GetGrammar() );
- pRefComp->SetCompileForFAP(true);
+ pRefComp->EnableJumpCommandReorder(false);
+ pRefComp->EnableStopOnError(false);
nRefTab = nTab;
}
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index 1bde19267e81..5cd494438646 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -114,8 +114,8 @@ void ScFormulaParserObj::SetCompilerFlags( ScCompiler& rCompiler ) const
eConv = aConvMap[mnConv];
rCompiler.SetRefConvention( eConv );
-
- rCompiler.SetCompileForFAP(mbCompileFAP);
+ rCompiler.EnableJumpCommandReorder(!mbCompileFAP);
+ rCompiler.EnableStopOnError(!mbCompileFAP);
rCompiler.SetExternalLinks( maExternalLinks);
}