diff options
Diffstat (limited to 'sc/inc/rangenam.hxx')
-rw-r--r-- | sc/inc/rangenam.hxx | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx index a9f324b8b737..453530c0e1f6 100644 --- a/sc/inc/rangenam.hxx +++ b/sc/inc/rangenam.hxx @@ -47,7 +47,7 @@ namespace rtl { //------------------------------------------------------------------------ -typedef USHORT RangeType; +typedef sal_uInt16 RangeType; #define RT_NAME ((RangeType)0x0000) #define RT_DATABASE ((RangeType)0x0001) @@ -74,8 +74,8 @@ private: ScAddress aPos; RangeType eType; ScDocument* pDoc; - USHORT nIndex; - BOOL bModified; // wird bei UpdateReference gesetzt/geloescht + sal_uInt16 nIndex; + sal_Bool bModified; // wird bei UpdateReference gesetzt/geloescht // max row and column to use for wrapping of references. If -1 use the // application's default. @@ -83,7 +83,7 @@ private: SCCOL mnMaxCol; friend class ScRangeName; - ScRangeData( USHORT nIndex ); + ScRangeData( sal_uInt16 nIndex ); public: typedef ::std::map<sal_uInt16, sal_uInt16> IndexMap; @@ -109,45 +109,45 @@ public: virtual ScDataObject* Clone() const; - BOOL operator== (const ScRangeData& rData) const; + sal_Bool operator== (const ScRangeData& rData) const; void GetName( String& rName ) const { rName = aName; } const String& GetName( void ) const { return aName; } const String& GetUpperName( void ) const { return aUpperName; } ScAddress GetPos() const { return aPos; } // Der Index muss eindeutig sein. Ist er 0, wird ein neuer Index vergeben - void SetIndex( USHORT nInd ) { nIndex = nInd; } - USHORT GetIndex() const { return nIndex; } + void SetIndex( sal_uInt16 nInd ) { nIndex = nInd; } + sal_uInt16 GetIndex() const { return nIndex; } ScTokenArray* GetCode() { return pCode; } - USHORT GetErrCode(); - BOOL HasReferences() const; + sal_uInt16 GetErrCode(); + sal_Bool HasReferences() const; void SetDocument( ScDocument* pDocument){ pDoc = pDocument; } ScDocument* GetDocument() const { return pDoc; } void SetType( RangeType nType ) { eType = nType; } void AddType( RangeType nType ) { eType = eType|nType; } RangeType GetType() const { return eType; } - BOOL HasType( RangeType nType ) const; + sal_Bool HasType( RangeType nType ) const; SC_DLLPUBLIC void GetSymbol( String& rSymbol, const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ) const; void UpdateSymbol( rtl::OUStringBuffer& rBuffer, const ScAddress&, const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ); void UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - BOOL IsModified() const { return bModified; } + sal_Bool IsModified() const { return bModified; } SC_DLLPUBLIC void GuessPosition(); void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest ); void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY ); - SC_DLLPUBLIC BOOL IsReference( ScRange& rRef ) const; - BOOL IsReference( ScRange& rRef, const ScAddress& rPos ) const; - BOOL IsValidReference( ScRange& rRef ) const; + SC_DLLPUBLIC sal_Bool IsReference( ScRange& rRef ) const; + sal_Bool IsReference( ScRange& rRef, const ScAddress& rPos ) const; + sal_Bool IsValidReference( ScRange& rRef ) const; -//UNUSED2009-05 BOOL IsRangeAtCursor( const ScAddress&, BOOL bStartOnly ) const; - BOOL IsRangeAtBlock( const ScRange& ) const; +//UNUSED2009-05 sal_Bool IsRangeAtCursor( const ScAddress&, sal_Bool bStartOnly ) const; + sal_Bool IsRangeAtBlock( const ScRange& ) const; - void UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable); + void UpdateTabRef(SCTAB nOldTable, sal_uInt16 nFlag, SCTAB nNewTable); void TransferTabRef( SCTAB nOldTab, SCTAB nNewTab ); void ValidateTabRefs(); @@ -155,7 +155,7 @@ public: void ReplaceRangeNamesInUse( const IndexMap& rMap ); static void MakeValidName( String& rName ); - SC_DLLPUBLIC static BOOL IsNameValid( const String& rName, ScDocument* pDoc ); + SC_DLLPUBLIC static sal_Bool IsNameValid( const String& rName, ScDocument* pDoc ); SC_DLLPUBLIC void SetMaxRow(SCROW nRow); SCROW GetMaxRow() const; @@ -163,7 +163,7 @@ public: SCCOL GetMaxCol() const; }; -inline BOOL ScRangeData::HasType( RangeType nType ) const +inline sal_Bool ScRangeData::HasType( RangeType nType ) const { return ( ( eType & nType ) == nType ); } @@ -181,12 +181,12 @@ class ScRangeName : public ScSortedCollection { private: ScDocument* pDoc; - USHORT nSharedMaxIndex; + sal_uInt16 nSharedMaxIndex; using ScSortedCollection::Clone; // calcwarnings: shouldn't be used public: - ScRangeName(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE, + ScRangeName(sal_uInt16 nLim = 4, sal_uInt16 nDel = 4, sal_Bool bDup = sal_False, ScDocument* pDocument = NULL) : ScSortedCollection ( nLim, nDel, bDup ), pDoc ( pDocument ), @@ -196,28 +196,28 @@ public: virtual ScDataObject* Clone(ScDocument* pDocP) const { return new ScRangeName(*this, pDocP); } - ScRangeData* operator[]( const USHORT nIndex) const + ScRangeData* operator[]( const sal_uInt16 nIndex) const { return (ScRangeData*)At(nIndex); } virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const; - virtual BOOL IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const; + virtual sal_Bool IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const; -//UNUSED2009-05 ScRangeData* GetRangeAtCursor( const ScAddress&, BOOL bStartOnly ) const; +//UNUSED2009-05 ScRangeData* GetRangeAtCursor( const ScAddress&, sal_Bool bStartOnly ) const; SC_DLLPUBLIC ScRangeData* GetRangeAtBlock( const ScRange& ) const; - SC_DLLPUBLIC BOOL SearchName( const String& rName, USHORT& rPos ) const; + SC_DLLPUBLIC sal_Bool SearchName( const String& rName, sal_uInt16& rPos ) const; // SearchNameUpper must be called with an upper-case search string - BOOL SearchNameUpper( const String& rUpperName, USHORT& rPos ) const; + sal_Bool SearchNameUpper( const String& rUpperName, sal_uInt16& rPos ) const; void UpdateReference(UpdateRefMode eUpdateRefMode, const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - void UpdateTabRef(SCTAB nTable, USHORT nFlag, SCTAB nNewTable = 0); + void UpdateTabRef(SCTAB nTable, sal_uInt16 nFlag, SCTAB nNewTable = 0); void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest ); void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY ); - virtual BOOL Insert(ScDataObject* pScDataObject); - SC_DLLPUBLIC ScRangeData* FindIndex(USHORT nIndex); - USHORT GetSharedMaxIndex() { return nSharedMaxIndex; } - void SetSharedMaxIndex(USHORT nInd) { nSharedMaxIndex = nInd; } - USHORT GetEntryIndex(); + virtual sal_Bool Insert(ScDataObject* pScDataObject); + SC_DLLPUBLIC ScRangeData* FindIndex(sal_uInt16 nIndex); + sal_uInt16 GetSharedMaxIndex() { return nSharedMaxIndex; } + void SetSharedMaxIndex(sal_uInt16 nInd) { nSharedMaxIndex = nInd; } + sal_uInt16 GetEntryIndex(); }; #endif |