From 216fdcbdb4c17f349ffd68abd1f372bea3287fad Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 8 Apr 2015 09:06:49 +0200 Subject: convert RECALCMODE_ constants to scoped enum Change-Id: Ice2e45a3db59adc34a160b4b410cc51c750835f2 --- formula/source/core/api/FormulaCompiler.cxx | 8 ++++---- formula/source/core/api/token.cxx | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'formula') diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index af4fcfae745c..78861b85f65e 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1198,12 +1198,12 @@ void FormulaCompiler::Factor() // Functions recalculated on every document load. // Don't use SetExclusiveRecalcModeOnLoad() which would // override ModeAlways, use - // AddRecalcMode(RECALCMODE_ONLOAD) instead. + // AddRecalcMode(ScRecalcMode::ONLOAD) instead. case ocConvert : case ocDde: case ocMacro: case ocExternal: - pArr->AddRecalcMode( RECALCMODE_ONLOAD ); + pArr->AddRecalcMode( ScRecalcMode::ONLOAD ); break; // If the referred cell is moved the value changes. case ocColumn : @@ -1214,12 +1214,12 @@ void FormulaCompiler::Factor() // and recalc mode on load, fdo#60646 case ocCell : pArr->SetRecalcModeOnRefMove(); - pArr->AddRecalcMode( RECALCMODE_ONLOAD ); + pArr->AddRecalcMode( ScRecalcMode::ONLOAD ); break; case ocHyperLink : // cell with hyperlink needs to be calculated on load to // get its matrix result generated. - pArr->AddRecalcMode( RECALCMODE_ONLOAD ); + pArr->AddRecalcMode( ScRecalcMode::ONLOAD ); pArr->SetHyperLink( true); break; default: diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 39067e262e92..08a129a4ec3e 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -699,7 +699,7 @@ FormulaTokenArray::FormulaTokenArray() : nRPN(0), nIndex(0), nError(0), - nMode(RECALCMODE_NORMAL), + nMode(ScRecalcMode::NORMAL), bHyperLink(false) { } @@ -929,13 +929,13 @@ FormulaToken* FormulaTokenArray::AddStringXML( const OUString& rStr ) void FormulaTokenArray::AddRecalcMode( ScRecalcMode nBits ) { //! Order is important. - if ( nBits & RECALCMODE_ALWAYS ) + if ( nBits & ScRecalcMode::ALWAYS ) SetExclusiveRecalcModeAlways(); else if ( !IsRecalcModeAlways() ) { - if ( nBits & RECALCMODE_ONLOAD ) + if ( nBits & ScRecalcMode::ONLOAD ) SetExclusiveRecalcModeOnLoad(); - else if ( nBits & RECALCMODE_ONLOAD_ONCE && !IsRecalcModeOnLoad() ) + else if ( nBits & ScRecalcMode::ONLOAD_ONCE && !IsRecalcModeOnLoad() ) SetExclusiveRecalcModeOnLoadOnce(); } SetCombinedBitsRecalcMode( nBits ); @@ -1357,7 +1357,7 @@ FormulaTokenArray * FormulaTokenArray::RewriteMissing( const MissingConvention & int nOcas = 0; FormulaTokenArray *pNewArr = new FormulaTokenArray; - // At least RECALCMODE_ALWAYS needs to be set. + // At least ScRecalcMode::ALWAYS needs to be set. pNewArr->AddRecalcMode( GetRecalcMode()); for ( FormulaToken *pCur = First(); pCur; pCur = Next() ) -- cgit