From 5b033d425cebe2fc031172c2c3bc9b6a7a784369 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Tue, 29 Nov 2011 21:31:29 -0500 Subject: [PATCH] sal_Bool to bool. --- sc/source/filter/excel/excrecds.cxx | 8 ++++---- sc/source/filter/inc/excrecds.hxx | 27 +++++++++++++-------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index b28a1bf7f603..80368210921a 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -657,8 +657,8 @@ XclExpAutofilter::XclExpAutofilter( const XclExpRoot& rRoot, sal_uInt16 nC ) : { } -sal_Bool XclExpAutofilter::AddCondition( ScQueryConnect eConn, sal_uInt8 nType, sal_uInt8 nOp, - double fVal, String* pText, sal_Bool bSimple ) +bool XclExpAutofilter::AddCondition( ScQueryConnect eConn, sal_uInt8 nType, sal_uInt8 nOp, + double fVal, String* pText, bool bSimple ) { if( !aCond[ 1 ].IsEmpty() ) return false; @@ -949,11 +949,11 @@ XclExpAutofilter* ExcAutoFilterRecs::GetByCol( SCCOL nCol ) return xFilter.get(); } -sal_Bool ExcAutoFilterRecs::IsFiltered( SCCOL nCol ) +bool ExcAutoFilterRecs::IsFiltered( SCCOL nCol ) { for( size_t nPos = 0, nSize = maFilterList.GetSize(); nPos < nSize; ++nPos ) if( maFilterList.GetRecord( nPos )->GetCol() == static_cast(nCol) ) - return sal_True; + return true; return false; } diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx index 2d15ba485876..2c6b1fb69e89 100644 --- a/sc/source/filter/inc/excrecds.hxx +++ b/sc/source/filter/inc/excrecds.hxx @@ -376,8 +376,8 @@ private: class ExcFilterCondition { private: - sal_uInt8 nType; - sal_uInt8 nOper; + sal_uInt8 nType; + sal_uInt8 nOper; double fVal; XclExpString* pText; @@ -386,9 +386,9 @@ public: ExcFilterCondition(); ~ExcFilterCondition(); - inline sal_Bool IsEmpty() const { return (nType == EXC_AFTYPE_NOTUSED); } - inline sal_Bool HasEqual() const { return (nOper == EXC_AFOPER_EQUAL); } - sal_uLong GetTextBytes() const; + inline bool IsEmpty() const { return (nType == EXC_AFTYPE_NOTUSED); } + inline bool HasEqual() const { return (nOper == EXC_AFOPER_EQUAL); } + sal_uLong GetTextBytes() const; void SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, String* pT ); @@ -402,23 +402,22 @@ public: class XclExpAutofilter : public XclExpRecord, protected XclExpRoot { private: - sal_uInt16 nCol; - sal_uInt16 nFlags; + sal_uInt16 nCol; + sal_uInt16 nFlags; ExcFilterCondition aCond[ 2 ]; - sal_Bool AddCondition( ScQueryConnect eConn, sal_uInt8 nType, + bool AddCondition( ScQueryConnect eConn, sal_uInt8 nType, sal_uInt8 nOp, double fVal, String* pText, - sal_Bool bSimple = false ); + bool bSimple = false ); virtual void WriteBody( XclExpStream& rStrm ); -protected: public: XclExpAutofilter( const XclExpRoot& rRoot, sal_uInt16 nC ); - inline sal_uInt16 GetCol() const { return nCol; } - inline sal_Bool HasCondition() const { return !aCond[ 0 ].IsEmpty(); } - inline sal_Bool HasTop10() const { return ::get_flag( nFlags, EXC_AFFLAG_TOP10 ); } + inline sal_uInt16 GetCol() const { return nCol; } + inline bool HasCondition() const { return !aCond[ 0 ].IsEmpty(); } + inline bool HasTop10() const { return ::get_flag( nFlags, EXC_AFFLAG_TOP10 ); } bool AddEntry( const ScQueryEntry& rEntry ); @@ -442,7 +441,7 @@ public: private: XclExpAutofilter* GetByCol( SCCOL nCol ); // always 0-based - sal_Bool IsFiltered( SCCOL nCol ); + bool IsFiltered( SCCOL nCol ); private: typedef XclExpRecordList< XclExpAutofilter > XclExpAutofilterList;