diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-17 17:11:45 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-17 18:45:16 +0100 |
commit | c963d7e642c24f40c19fb9dc227db5da96728c12 (patch) | |
tree | 81fbcb736dad59a7e0d3bcd8f9e6b84e99bb5607 /sw/inc | |
parent | 8711842d1b861544ed4a934f675adbed7cf83f32 (diff) |
bool improvements
Change-Id: I9324483db587be43238af79c2148d724397a4622
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/PostItMgr.hxx | 2 | ||||
-rw-r--r-- | sw/inc/edglbldc.hxx | 4 | ||||
-rw-r--r-- | sw/inc/fmtcol.hxx | 4 | ||||
-rw-r--r-- | sw/inc/ndarr.hxx | 8 | ||||
-rw-r--r-- | sw/inc/ndhints.hxx | 4 | ||||
-rw-r--r-- | sw/inc/node.hxx | 4 | ||||
-rw-r--r-- | sw/inc/redline.hxx | 22 | ||||
-rw-r--r-- | sw/inc/swatrset.hxx | 4 | ||||
-rw-r--r-- | sw/inc/swcrsr.hxx | 2 | ||||
-rw-r--r-- | sw/inc/swevent.hxx | 4 | ||||
-rw-r--r-- | sw/inc/txatbase.hxx | 2 |
11 files changed, 30 insertions, 30 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index a87a9ba8c5c0..faf101432635 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -146,7 +146,7 @@ class SwPostItMgr: public SfxListener sw::sidebarwindows::SwSidebarWin* mpActivePostIt; bool mbLayout; long mbLayoutHeight; - long mbLayouting; + bool mbLayouting; bool mbReadOnly; bool mbDeleteNote; FieldShadowState mShadowState; diff --git a/sw/inc/edglbldc.hxx b/sw/inc/edglbldc.hxx index 16cf557396ee..56ecb9b61b92 100644 --- a/sw/inc/edglbldc.hxx +++ b/sw/inc/edglbldc.hxx @@ -54,9 +54,9 @@ public: sal_uLong GetDocPos() const { return nDocPos; } /// For sorting. - inline int operator==( const SwGlblDocContent& rCmp ) const + inline bool operator==( const SwGlblDocContent& rCmp ) const { return GetDocPos() == rCmp.GetDocPos(); } - inline int operator<( const SwGlblDocContent& rCmp ) const + inline bool operator<( const SwGlblDocContent& rCmp ) const { return GetDocPos() < rCmp.GetDocPos(); } }; diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx index 0db5c3658313..d973d3903619 100644 --- a/sw/inc/fmtcol.hxx +++ b/sw/inc/fmtcol.hxx @@ -209,8 +209,8 @@ private: SwCollCondition & operator= (const SwCollCondition &); public: - int operator==( const SwCollCondition& rCmp ) const; - int operator!=( const SwCollCondition& rCmp ) const + bool operator==( const SwCollCondition& rCmp ) const; + bool operator!=( const SwCollCondition& rCmp ) const { return ! (*this == rCmp); } sal_uLong GetCondition() const { return nCondition; } diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 4e8501f01e52..ad510d6083b8 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -201,10 +201,10 @@ public: /** Go to next content-node that is not protected or hidden (Both set FALSE ==> GoNext/GoPrevious!!!). */ - SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = sal_True, - int bSkipProtect = sal_True ) const; - SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = sal_True, - int bSkipProtect = sal_True ) const; + SwCntntNode* GoNextSection( SwNodeIndex *, bool bSkipHidden = sal_True, + bool bSkipProtect = sal_True ) const; + SwCntntNode* GoPrevSection( SwNodeIndex *, bool bSkipHidden = sal_True, + bool bSkipProtect = sal_True ) const; /** Create an empty section of Start- and EndNote. It may be called only if a new section with content is to be created, diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx index 4230c4969ac1..3800258c602f 100644 --- a/sw/inc/ndhints.hxx +++ b/sw/inc/ndhints.hxx @@ -35,8 +35,8 @@ class SfxItemSet; class SwDoc; typedef enum { - COPY = true, - NEW = false, + COPY = int(true), + NEW = int(false), } CopyOrNew_t; /// if COPY then pTxtNode must be given! diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index ee28196e338a..9dea06353c6f 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -394,8 +394,8 @@ public: virtual SwCntntNode *JoinPrev(); /** Is it possible to join two nodes? In pIdx the second position can be returned. */ - int CanJoinNext( SwNodeIndex* pIdx =0 ) const; - int CanJoinPrev( SwNodeIndex* pIdx =0 ) const; + bool CanJoinNext( SwNodeIndex* pIdx =0 ) const; + bool CanJoinPrev( SwNodeIndex* pIdx =0 ) const; void MakeStartIndex( SwIndex * pIdx ) { pIdx->Assign( this, 0 ); } void MakeEndIndex( SwIndex * pIdx ) { pIdx->Assign( this, Len() ); } diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index 73f3884879d9..b946618a5b0d 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -46,7 +46,7 @@ public: virtual void Accept( SwPaM& rPam ) const; virtual void Reject( SwPaM& rPam ) const; - virtual int operator == ( const SwRedlineExtraData& ) const; + virtual bool operator == ( const SwRedlineExtraData& ) const; }; class SwRedlineExtraData_FmtColl : public SwRedlineExtraData @@ -60,7 +60,7 @@ public: virtual ~SwRedlineExtraData_FmtColl(); virtual SwRedlineExtraData* CreateNew() const; virtual void Reject( SwPaM& rPam ) const; - virtual int operator == ( const SwRedlineExtraData& ) const; + virtual bool operator == ( const SwRedlineExtraData& ) const; void SetItemSet( const SfxItemSet& rSet ); }; @@ -76,7 +76,7 @@ public: virtual ~SwRedlineExtraData_Format(); virtual SwRedlineExtraData* CreateNew() const; virtual void Reject( SwPaM& rPam ) const; - virtual int operator == ( const SwRedlineExtraData& ) const; + virtual bool operator == ( const SwRedlineExtraData& ) const; }; /* @@ -98,7 +98,7 @@ public: virtual ~SwRedlineExtraData_FormattingChanges(); virtual SwRedlineExtraData* CreateNew() const; virtual void Reject( SwPaM& rPam ) const; - virtual int operator == ( const SwRedlineExtraData& ) const; + virtual bool operator == ( const SwRedlineExtraData& ) const; SfxItemSet* GetItemSet( ) const; }; @@ -125,7 +125,7 @@ public: ~SwRedlineData(); - int operator==( const SwRedlineData& rCmp ) const + bool operator==( const SwRedlineData& rCmp ) const { return nAuthor == rCmp.nAuthor && eType == rCmp.eType && @@ -136,7 +136,7 @@ public: ( pExtraData && rCmp.pExtraData && *pExtraData == *rCmp.pExtraData )); } - int operator!=( const SwRedlineData& rCmp ) const + bool operator!=( const SwRedlineData& rCmp ) const { return !operator==( rCmp ); } RedlineType_t GetType() const @@ -152,7 +152,7 @@ public: void SetAutoFmtFlag() { eType = (RedlineType_t)(eType | nsRedlineType_t::REDLINE_FORM_AUTOFMT); } - int CanCombine( const SwRedlineData& rCmp ) const + bool CanCombine( const SwRedlineData& rCmp ) const { return nAuthor == rCmp.nAuthor && eType == rCmp.eType && @@ -230,9 +230,9 @@ public: sal_Bool HasValidRange() const; const SwRedlineData& GetRedlineData(sal_uInt16 nPos = 0) const; - int operator==( const SwRedlineData& rCmp ) const + bool operator==( const SwRedlineData& rCmp ) const { return *pRedlineData == rCmp; } - int operator!=( const SwRedlineData& rCmp ) const + bool operator!=( const SwRedlineData& rCmp ) const { return *pRedlineData != rCmp; } void SetAutoFmtFlag() { pRedlineData->SetAutoFmtFlag(); } @@ -295,8 +295,8 @@ public: */ OUString GetDescr(sal_uInt16 nPos = 0); - int operator==( const SwRangeRedline& ) const; - int operator<( const SwRangeRedline& ) const; + bool operator==( const SwRangeRedline& ) const; + bool operator<( const SwRangeRedline& ) const; }; class SW_DLLPUBLIC SwRedlineHint : public SfxHint diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx index 4e20e75ba393..72e77cfffbc5 100644 --- a/sw/inc/swatrset.hxx +++ b/sw/inc/swatrset.hxx @@ -178,8 +178,8 @@ public: virtual SfxItemSet* Clone(sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0) const; - int Put_BC( const SfxPoolItem& rAttr, SwAttrSet* pOld, SwAttrSet* pNew ); - int Put_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew ); + bool Put_BC( const SfxPoolItem& rAttr, SwAttrSet* pOld, SwAttrSet* pNew ); + bool Put_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew ); // Delete an item or a range. sal_uInt16 ClearItem_BC( sal_uInt16 nWhich, SwAttrSet* pOld, SwAttrSet* pNew ); diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 69f476ac72d6..d2ce2bdee566 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -42,7 +42,7 @@ const int FIND_NO_RING = 2; struct SwFindParas { virtual int Find( SwPaM*, SwMoveFn, const SwPaM*, sal_Bool ) = 0; - virtual int IsReplaceMode() const = 0; + virtual bool IsReplaceMode() const = 0; protected: ~SwFindParas() {} diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx index 8bb787ef5ca3..e89c89e73755 100644 --- a/sw/inc/swevent.hxx +++ b/sw/inc/swevent.hxx @@ -99,13 +99,13 @@ struct SwCallMouseEvent void Set( const SwFmtINetFmt* pINetAttr ) { eType = EVENT_OBJECT_INETATTR; PTR.pINetAttr = pINetAttr; PTR.IMAP.pIMapObj = 0; } - int operator==( const SwCallMouseEvent& rEvent ) const + bool operator==( const SwCallMouseEvent& rEvent ) const { return eType == rEvent.eType && PTR.pFmt == rEvent.PTR.pFmt && PTR.IMAP.pIMapObj == rEvent.PTR.IMAP.pIMapObj; } - int operator!=( const SwCallMouseEvent& rEvent ) const + bool operator!=( const SwCallMouseEvent& rEvent ) const { return !( *this == rEvent ); } void Clear() diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx index fb274bc68b12..603b45618aac 100644 --- a/sw/inc/txatbase.hxx +++ b/sw/inc/txatbase.hxx @@ -108,7 +108,7 @@ public: inline SfxPoolItem& GetAttr(); inline sal_uInt16 Which() const { return GetAttr().Which(); } - virtual int operator==( const SwTxtAttr& ) const; + virtual bool operator==( const SwTxtAttr& ) const; inline const SwFmtCharFmt &GetCharFmt() const; inline const SwFmtAutoFmt &GetAutoFmt() const; |