diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-14 11:31:33 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-14 13:15:11 -0400 |
commit | a921d38ad4ee087355945b9a544d1957987f308f (patch) | |
tree | 800f7490741c7f7bb7ca06915b32d33338a12fea | |
parent | 69a7e7440cdafbaeddd344f61cc5dfe54750d509 (diff) |
No more SetCompileForFAP(). Use respective flag setting methods instead.
Change-Id: Ib2256ebac8a7e63e7e24fb35d13d47b811bd8e19
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 9 | ||||
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 4 | ||||
-rw-r--r-- | include/formula/FormulaCompiler.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/anyrefdg.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/unoobj/tokenuno.cxx | 4 |
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); } |