summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-21 12:51:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-21 13:23:02 +0200
commitcd0e227a326f0571f157dde8678a253bcf172204 (patch)
tree7d842dd10e8f2df7cf9143b06e9cc5bc8fba1513
parentf3fab399da4035e910ae701bd1a3e9a6898f13a9 (diff)
rename RECALCMODE_EMASK to ScRecalcMode::EMask
much neater this way Change-Id: I0af38f8bc0d7be4f2f1be9899dd8739493cf66d5
-rw-r--r--include/formula/tokenarray.hxx6
-rw-r--r--sc/source/core/data/formulacell.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index cdb4e34e58c1..65b12a940fd4 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -59,13 +59,13 @@ enum class ScRecalcMode : sal_uInt8
ONLOAD_ONCE = 0x08, // exclusive, once after load
FORCED = 0x10, // combined, also if cell isn't visible
ONREFMOVE = 0x20, // combined, if reference was moved
+ EMask = NORMAL | ALWAYS | ONLOAD | ONLOAD_ONCE // mask of exclusive bits
};
// If new bits are to be defined, AddRecalcMode has to be adjusted!
namespace o3tl
{
template<> struct typed_flags<ScRecalcMode> : is_typed_flags<ScRecalcMode, 0x3f> {};
}
-#define RECALCMODE_EMASK (ScRecalcMode(ScRecalcMode::NORMAL | ScRecalcMode::ALWAYS | ScRecalcMode::ONLOAD | ScRecalcMode::ONLOAD_ONCE)) // mask of exclusive bits
namespace formula
{
@@ -173,9 +173,9 @@ protected:
sal_uInt16 RemoveToken( sal_uInt16 nOffset, sal_uInt16 nCount );
inline void SetCombinedBitsRecalcMode( ScRecalcMode nBits )
- { nMode |= (nBits & ~RECALCMODE_EMASK); }
+ { nMode |= (nBits & ~ScRecalcMode::EMask); }
inline ScRecalcMode GetCombinedBitsRecalcMode() const
- { return nMode & ~RECALCMODE_EMASK; }
+ { return nMode & ~ScRecalcMode::EMask; }
/** Exclusive bits already set in nMode are
zero'ed, nBits may contain combined bits, but
only one exclusive bit may be set! */
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 7ca01dbcf1ab..b95417b4a363 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2448,11 +2448,11 @@ void ScFormulaCell::SetResultError( FormulaError n )
void ScFormulaCell::AddRecalcMode( ScRecalcMode nBits )
{
- if ( (nBits & RECALCMODE_EMASK) != ScRecalcMode::NORMAL )
+ if ( (nBits & ScRecalcMode::EMask) != ScRecalcMode::NORMAL )
SetDirtyVar();
if ( nBits & ScRecalcMode::ONLOAD_ONCE )
{ // OnLoadOnce is used only to set Dirty after filter import.
- nBits = (nBits & ~RECALCMODE_EMASK) | ScRecalcMode::NORMAL;
+ nBits = (nBits & ~ScRecalcMode::EMask) | ScRecalcMode::NORMAL;
}
pCode->AddRecalcMode( nBits );
}