diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-08-09 23:59:36 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-08-10 00:06:43 +0200 |
commit | df59a409a7a14a985fcf4f2bb62f4ce1544c39e9 (patch) | |
tree | 5cb44c749b38fcce166f8bc4aeaeb5f3401defaf /sc/inc | |
parent | 96336b01a8e2836a3cabe407a92ac5d7b5ac5bf7 (diff) |
change from sal_Bool to bool in ScRangeName/ScRangeData
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/compiler.hxx | 24 | ||||
-rw-r--r-- | sc/inc/rangenam.hxx | 22 |
2 files changed, 22 insertions, 24 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 1e1d81e73912..2148b00bf8e6 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -344,11 +344,11 @@ private: sal_Bool IsPredetectedReference( const String& ); sal_Bool IsDoubleReference( const String& ); sal_Bool IsMacro( const String& ); - sal_Bool IsNamedRange( const String& ); + bool IsNamedRange( const String& ); bool IsExternalNamedRange( const String& rSymbol ); bool IsDBRange( const String& ); sal_Bool IsColRowName( const String& ); - sal_Bool IsBoolean( const String& ); + bool IsBoolean( const String& ); void AutoCorrectParsedSymbol(); void SetRelNameReference(); @@ -428,10 +428,10 @@ public: static void MoveRelWrap( ScTokenArray& rArr, ScDocument* pDoc, const ScAddress& rPos, SCCOL nMaxCol, SCROW nMaxRow ); - sal_Bool UpdateNameReference( UpdateRefMode eUpdateRefMode, + bool UpdateNameReference( UpdateRefMode eUpdateRefMode, const ScRange&, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, - sal_Bool& rChanged, sal_Bool bSharedFormula = false); + bool& rChanged, bool bSharedFormula = false); ScRangeData* UpdateReference( UpdateRefMode eUpdateRefMode, const ScAddress& rOldPos, const ScRange&, @@ -444,15 +444,15 @@ public: const ScAddress& rOldPos, const ScRange&, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - ScRangeData* UpdateInsertTab(SCTAB nTable, sal_Bool bIsName, SCTAB nNewSheets = 1 ); - ScRangeData* UpdateDeleteTab(SCTAB nTable, sal_Bool bIsMove, sal_Bool bIsName, sal_Bool& bCompile, SCTAB nSheets = 1); - ScRangeData* UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, sal_Bool bIsName ); + ScRangeData* UpdateInsertTab(SCTAB nTable, bool bIsName, SCTAB nNewSheets = 1 ); + ScRangeData* UpdateDeleteTab(SCTAB nTable, bool bIsMove, bool bIsName, bool& bCompile, SCTAB nSheets = 1); + ScRangeData* UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, bool bIsName ); bool HasModifiedRange(); /** If the character is allowed as first character in sheet names or references, includes '$' and '?'. */ - static inline sal_Bool IsCharWordChar( String const & rStr, + static inline bool IsCharWordChar( String const & rStr, xub_StrLen nPos, const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO ) { @@ -460,8 +460,7 @@ public: sal_Unicode cLast = nPos > 0 ? rStr.GetChar(nPos-1) : 0; if (c < 128) { - return pConventions[eConv] ? static_cast<sal_Bool>( - (pConventions[eConv]->getCharTableFlags(c, cLast) & SC_COMPILER_C_CHAR_WORD) == SC_COMPILER_C_CHAR_WORD) : + return pConventions[eConv] ? (pConventions[eConv]->getCharTableFlags(c, cLast) & SC_COMPILER_C_CHAR_WORD) == SC_COMPILER_C_CHAR_WORD : false; // no convention => assume invalid } else @@ -470,7 +469,7 @@ public: /** If the character is allowed in sheet names, thus may be part of a reference, includes '$' and '?' and such. */ - static inline sal_Bool IsWordChar( String const & rStr, + static inline bool IsWordChar( String const & rStr, xub_StrLen nPos, const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO ) { @@ -478,8 +477,7 @@ public: sal_Unicode cLast = nPos > 0 ? rStr.GetChar(nPos-1) : 0; if (c < 128) { - return pConventions[eConv] ? static_cast<sal_Bool>( - (pConventions[eConv]->getCharTableFlags(c, cLast) & SC_COMPILER_C_WORD) == SC_COMPILER_C_WORD) : + return pConventions[eConv] ? (pConventions[eConv]->getCharTableFlags(c, cLast) & SC_COMPILER_C_WORD) == SC_COMPILER_C_WORD : false; // convention not known => assume invalid } else diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx index 543d7276f18e..a3b3bc7f44ba 100644 --- a/sc/inc/rangenam.hxx +++ b/sc/inc/rangenam.hxx @@ -78,7 +78,7 @@ private: RangeType eType; ScDocument* pDoc; sal_uInt16 nIndex; - sal_Bool bModified; // is set/cleared by UpdateReference + bool bModified; // is set/cleared by UpdateReference // max row and column to use for wrapping of references. If -1 use the // application's default. @@ -108,7 +108,7 @@ public: SC_DLLPUBLIC ~ScRangeData(); - sal_Bool operator== (const ScRangeData& rData) const; + bool operator== (const ScRangeData& rData) const; void GetName( String& rName ) const { rName = aName; } const String& GetName( void ) const { return aName; } @@ -120,13 +120,13 @@ public: ScTokenArray* GetCode() { return pCode; } const ScTokenArray* GetCode() const { return pCode; } sal_uInt16 GetErrCode() const; - sal_Bool HasReferences() const; + 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; } - sal_Bool HasType( RangeType nType ) const; + bool HasType( RangeType nType ) const; SC_DLLPUBLIC void GetSymbol( String& rSymbol, const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ) const; SC_DLLPUBLIC void GetSymbol( rtl::OUString& rSymbol, const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ) const; void UpdateSymbol( rtl::OUStringBuffer& rBuffer, const ScAddress&, @@ -134,17 +134,17 @@ public: void UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - sal_Bool IsModified() const { return bModified; } + 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 sal_Bool IsReference( ScRange& rRef ) const; - sal_Bool IsReference( ScRange& rRef, const ScAddress& rPos ) const; - SC_DLLPUBLIC sal_Bool IsValidReference( ScRange& rRef ) const; - sal_Bool IsRangeAtBlock( const ScRange& ) const; + SC_DLLPUBLIC bool IsReference( ScRange& rRef ) const; + bool IsReference( ScRange& rRef, const ScAddress& rPos ) const; + SC_DLLPUBLIC bool IsValidReference( ScRange& rRef ) const; + bool IsRangeAtBlock( const ScRange& ) const; void UpdateTabRef(SCTAB nOldTable, sal_uInt16 nFlag, SCTAB nNewTable, SCTAB nNewSheets); void TransferTabRef( SCTAB nOldTab, SCTAB nNewTab ); @@ -154,7 +154,7 @@ public: void ReplaceRangeNamesInUse( const IndexMap& rMap ); static void MakeValidName( String& rName ); - SC_DLLPUBLIC static sal_Bool IsNameValid( const String& rName, ScDocument* pDoc ); + SC_DLLPUBLIC static bool IsNameValid( const String& rName, ScDocument* pDoc ); SC_DLLPUBLIC void SetMaxRow(SCROW nRow); SCROW GetMaxRow() const; @@ -162,7 +162,7 @@ public: SCCOL GetMaxCol() const; }; -inline sal_Bool ScRangeData::HasType( RangeType nType ) const +inline bool ScRangeData::HasType( RangeType nType ) const { return ( ( eType & nType ) == nType ); } |