diff options
author | Eike Rathke <erack@redhat.com> | 2013-02-15 13:49:43 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-02-15 13:57:27 +0100 |
commit | a60712be0e05ec2c2e3d48ec77511412151988ea (patch) | |
tree | 77bbe9b66e92262e7020006cd17c3ac8e52e1535 /formula | |
parent | ff319d052659974d1aa5d6ac8c468a7259a46cc4 (diff) |
renamed SetRecalcMode...() to SetExclusiveRecalcMode...()
To emphasize exclusiveness of the four basic recalc modes renamed the
corresponding methods.
Change-Id: If6f99d2c84e4a042a3a3e3640cf416d306a2d0c5
Diffstat (limited to 'formula')
-rw-r--r-- | formula/inc/formula/tokenarray.hxx | 10 | ||||
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 9 | ||||
-rw-r--r-- | formula/source/core/api/token.cxx | 6 |
3 files changed, 13 insertions, 12 deletions
diff --git a/formula/inc/formula/tokenarray.hxx b/formula/inc/formula/tokenarray.hxx index e9041acb049a..32d871016e7b 100644 --- a/formula/inc/formula/tokenarray.hxx +++ b/formula/inc/formula/tokenarray.hxx @@ -84,7 +84,7 @@ protected: inline ScRecalcMode GetCombinedBitsRecalcMode() const { return nMode & ~RECALCMODE_EMASK; } /** Exclusive bits already set in nMode are - zero'ed, nVal may contain combined bits, but + zero'ed, nBits may contain combined bits, but only one exclusive bit may be set! */ inline void SetMaskedRecalcMode( ScRecalcMode nBits ) { nMode = GetCombinedBitsRecalcMode() | nBits; } @@ -142,13 +142,13 @@ public: void AddRecalcMode( ScRecalcMode nBits ); inline void ClearRecalcMode() { nMode = RECALCMODE_NORMAL; } - inline void SetRecalcModeNormal() + inline void SetExclusiveRecalcModeNormal() { SetMaskedRecalcMode( RECALCMODE_NORMAL ); } - inline void SetRecalcModeAlways() + inline void SetExclusiveRecalcModeAlways() { SetMaskedRecalcMode( RECALCMODE_ALWAYS ); } - inline void SetRecalcModeOnLoad() + inline void SetExclusiveRecalcModeOnLoad() { SetMaskedRecalcMode( RECALCMODE_ONLOAD ); } - inline void SetRecalcModeOnLoadOnce() + inline void SetExclusiveRecalcModeOnLoadOnce() { SetMaskedRecalcMode( RECALCMODE_ONLOAD_ONCE ); } inline void SetRecalcModeForced() { nMode |= RECALCMODE_FORCED; } diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index a8bfcbd0a0c3..21f8e975a7ee 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1052,14 +1052,15 @@ void FormulaCompiler::Factor() nNumFmt = lcl_GetRetFormat( eOp ); if ( IsOpCodeVolatile(eOp) ) - pArr->SetRecalcModeAlways(); + pArr->SetExclusiveRecalcModeAlways(); else { switch( eOp ) { // Functions recalculated on every document load. - // Don't use SetRecalcModeOnLoad() which would override - // ModeAlways. + // Don't use SetExclusiveRecalcModeOnLoad() which would + // override ModeAlways, use + // AddRecalcMode(RECALCMODE_ONLOAD) instead. case ocConvert : pArr->AddRecalcMode( RECALCMODE_ONLOAD ); break; @@ -1599,7 +1600,7 @@ void FormulaCompiler::PopTokenArray() p->pArr->nRefs = sal::static_int_cast<short>( p->pArr->nRefs + pArr->nRefs ); // obtain special RecalcMode from SharedFormula if ( pArr->IsRecalcModeAlways() ) - p->pArr->SetRecalcModeAlways(); + p->pArr->SetExclusiveRecalcModeAlways(); else if ( !pArr->IsRecalcModeNormal() && p->pArr->IsRecalcModeNormal() ) p->pArr->SetMaskedRecalcMode( pArr->GetRecalcMode() ); p->pArr->SetCombinedBitsRecalcMode( pArr->GetRecalcMode() ); diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index f6110e7ce5b3..150be29a7a61 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -783,13 +783,13 @@ void FormulaTokenArray::AddRecalcMode( ScRecalcMode nBits ) { //! Reihenfolge ist wichtig if ( nBits & RECALCMODE_ALWAYS ) - SetRecalcModeAlways(); + SetExclusiveRecalcModeAlways(); else if ( !IsRecalcModeAlways() ) { if ( nBits & RECALCMODE_ONLOAD ) - SetRecalcModeOnLoad(); + SetExclusiveRecalcModeOnLoad(); else if ( nBits & RECALCMODE_ONLOAD_ONCE && !IsRecalcModeOnLoad() ) - SetRecalcModeOnLoadOnce(); + SetExclusiveRecalcModeOnLoadOnce(); } SetCombinedBitsRecalcMode( nBits ); } |