summaryrefslogtreecommitdiff
path: root/sc/inc/rangenam.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-07-25 22:17:28 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-07-30 23:49:54 -0400
commit2622d1dbe6f6d7914cf9cf353d55e83385f3ee5a (patch)
treeb02df1edb0457921aa465ae799d9aec4ceba62af /sc/inc/rangenam.hxx
parent43bb6f2b562f20dc8bf6d46fe1748f0bbeccf526 (diff)
Let's not use numerical magic numbers. Prefer enum.
Change-Id: I84d14dd06a2b28d7a8a1544f26eae180b6ea86b5
Diffstat (limited to 'sc/inc/rangenam.hxx')
-rw-r--r--sc/inc/rangenam.hxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 436f82a04f88..4a5944f8814b 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -30,13 +30,8 @@
#include <boost/ptr_container/ptr_set.hpp>
#include <boost/ptr_container/ptr_map.hpp>
-//------------------------------------------------------------------------
-
class ScDocument;
-
-
-
-//------------------------------------------------------------------------
+class ScTokenArray;
typedef sal_uInt16 RangeType;
@@ -52,10 +47,6 @@ typedef sal_uInt16 RangeType;
#define RT_SHARED ((RangeType)0x0100)
#define RT_SHAREDMOD ((RangeType)0x0200)
-//------------------------------------------------------------------------
-
-class ScTokenArray;
-
class ScRangeData
{
private:
@@ -77,6 +68,9 @@ private:
void CompileRangeData( const String& rSymbol, bool bSetError );
void InitCode();
public:
+
+ enum TabRefUpdateMode { Insert = 1, Delete = 2, Move = 3 };
+
typedef ::std::map<sal_uInt16, sal_uInt16> IndexMap;
SC_DLLPUBLIC ScRangeData( ScDocument* pDoc,
@@ -139,7 +133,7 @@ public:
SC_DLLPUBLIC bool IsValidReference( ScRange& rRef ) const;
bool IsRangeAtBlock( const ScRange& ) const;
- void UpdateTabRef(SCTAB nOldTable, sal_uInt16 nFlag, SCTAB nNewTable, SCTAB nNewSheets);
+ void UpdateTabRef(SCTAB nOldTable, TabRefUpdateMode eMode, SCTAB nNewTable, SCTAB nNewSheets);
void ValidateTabRefs();
@@ -189,7 +183,7 @@ public:
SC_DLLPUBLIC ScRangeData* findByIndex(sal_uInt16 i) const;
void UpdateReference(UpdateRefMode eUpdateRefMode, const ScRange& rRange,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz, bool bLocal = false);
- void UpdateTabRef(SCTAB nTable, sal_uInt16 nFlag, SCTAB nNewTable = 0, SCTAB nNewSheets = 1);
+ void UpdateTabRef(SCTAB nTable, ScRangeData::TabRefUpdateMode eMode, SCTAB nNewTable = 0, SCTAB nNewSheets = 1);
void UpdateTranspose(const ScRange& rSource, const ScAddress& rDest);
void UpdateGrow(const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY);