diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-26 16:05:01 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-10-04 21:29:35 +0200 |
commit | c29633988bc1877c5f6e2a89be4840c70afde418 (patch) | |
tree | 6efa539f0a7498627bc4be3fea6aba98b003b9d0 /sw | |
parent | 055b6f1271cf90240caa3ab0f22f3e760fcefd51 (diff) |
sal_Bool->bool in svl::SfxStyleSheetBase
Change-Id: Id506fa56d07be56d63715703e354625715275933
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/docstyle.hxx | 16 | ||||
-rw-r--r-- | sw/source/ui/app/docstyle.cxx | 64 |
2 files changed, 40 insertions, 40 deletions
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index 576e5d2f39ca..82b4788cac91 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -130,13 +130,13 @@ public: void PresetParent(const String& rName){ aParent = rName; } void PresetFollow(const String& rName){ aFollow = rName; } - virtual sal_Bool SetName( const String& rStr); - virtual sal_Bool SetParent( const String& rStr); - virtual sal_Bool SetFollow( const String& rStr); + virtual bool SetName( const String& rStr); + virtual bool SetParent( const String& rStr); + virtual bool SetFollow( const String& rStr); - virtual sal_Bool HasFollowSupport() const; - virtual sal_Bool HasParentSupport() const; - virtual sal_Bool HasClearParentSupport() const; + virtual bool HasFollowSupport() const; + virtual bool HasParentSupport() const; + virtual bool HasClearParentSupport() const; virtual String GetDescription(); virtual String GetDescription(SfxMapUnit eUnit); @@ -147,7 +147,7 @@ public: const SwNumRule* GetNumRule(); void SetNumRule(const SwNumRule& rRule); - virtual sal_Bool IsUsed() const; + virtual bool IsUsed() const; }; /*-------------------------------------------------------------------- @@ -204,7 +204,7 @@ public: virtual SfxStyleSheetBase* Find( const String&, SfxStyleFamily eFam, sal_uInt16 n=0xFFFF ); - virtual sal_Bool SetParent( SfxStyleFamily eFam, const String &rStyle, + virtual bool SetParent( SfxStyleFamily eFam, const String &rStyle, const String &rParent ); virtual void Remove( SfxStyleSheetBase* pStyle); diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx index 8276247910f6..ae984bdc9d11 100644 --- a/sw/source/ui/app/docstyle.cxx +++ b/sw/source/ui/app/docstyle.cxx @@ -530,19 +530,19 @@ const String& SwDocStyleSheet::GetFollow() const --------------------------------------------------------------------*/ -sal_Bool SwDocStyleSheet::HasFollowSupport() const +bool SwDocStyleSheet::HasFollowSupport() const { switch(nFamily) { case SFX_STYLE_FAMILY_PARA : - case SFX_STYLE_FAMILY_PAGE : return sal_True; + case SFX_STYLE_FAMILY_PAGE : return true; case SFX_STYLE_FAMILY_FRAME: case SFX_STYLE_FAMILY_CHAR : - case SFX_STYLE_FAMILY_PSEUDO: return sal_False; + case SFX_STYLE_FAMILY_PSEUDO: return false; default: OSL_ENSURE(!this, "unknown style family"); } - return sal_False; + return false; } /*-------------------------------------------------------------------- @@ -550,28 +550,28 @@ sal_Bool SwDocStyleSheet::HasFollowSupport() const --------------------------------------------------------------------*/ -sal_Bool SwDocStyleSheet::HasParentSupport() const +bool SwDocStyleSheet::HasParentSupport() const { - sal_Bool bRet = sal_False; + bool bRet = false; switch(nFamily) { case SFX_STYLE_FAMILY_CHAR : case SFX_STYLE_FAMILY_PARA : - case SFX_STYLE_FAMILY_FRAME: bRet = sal_True; + case SFX_STYLE_FAMILY_FRAME: bRet = true; default:; //prevent warning } return bRet; } -sal_Bool SwDocStyleSheet::HasClearParentSupport() const +bool SwDocStyleSheet::HasClearParentSupport() const { - sal_Bool bRet = sal_False; + bool bRet = false; switch(nFamily) { case SFX_STYLE_FAMILY_PARA : case SFX_STYLE_FAMILY_CHAR : - case SFX_STYLE_FAMILY_FRAME: bRet = sal_True; + case SFX_STYLE_FAMILY_FRAME: bRet = true; default:; //prevent warning } return bRet; @@ -758,20 +758,20 @@ String SwDocStyleSheet::GetDescription() --------------------------------------------------------------------*/ -sal_Bool SwDocStyleSheet::SetName( const String& rStr) +bool SwDocStyleSheet::SetName( const String& rStr) { if( !rStr.Len() ) - return sal_False; + return false; if( aName != rStr ) { if( !SfxStyleSheetBase::SetName( rStr )) - return sal_False; + return false; } else if(!bPhysical) FillStyleSheet( FillPhysical ); - int bChg = sal_False; + int bChg = false; switch(nFamily) { case SFX_STYLE_FAMILY_CHAR : @@ -780,7 +780,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr) if( pCharFmt && pCharFmt->GetName() != rStr ) { pCharFmt->SetName( rStr ); - bChg = sal_True; + bChg = true; } break; } @@ -794,7 +794,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr) else pColl->SetName(rStr); - bChg = sal_True; + bChg = true; } break; } @@ -808,7 +808,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr) else pFrmFmt->SetName( rStr ); - bChg = sal_True; + bChg = true; } break; } @@ -830,7 +830,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr) rDoc.GetIDocumentUndoRedo().DoUndo(bDoesUndo); rDoc.SetModified(); - bChg = sal_True; + bChg = true; } break; case SFX_STYLE_FAMILY_PSEUDO: @@ -848,7 +848,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr) pNumRule = rDoc.FindNumRulePtr(rStr); rDoc.SetModified(); - bChg = sal_True; + bChg = true; } } else @@ -857,7 +857,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr) ((SwNumRule*)pNumRule)->SetName( rStr, rDoc ); rDoc.SetModified(); - bChg = sal_True; + bChg = true; } } @@ -875,7 +875,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr) if( pSh ) pSh->CallChgLnk(); } - return sal_True; + return true; } /*-------------------------------------------------------------------- @@ -883,7 +883,7 @@ sal_Bool SwDocStyleSheet::SetName( const String& rStr) --------------------------------------------------------------------*/ -sal_Bool SwDocStyleSheet::SetParent( const String& rStr) +bool SwDocStyleSheet::SetParent( const String& rStr) { SwFmt* pFmt = 0, *pParent = 0; switch(nFamily) @@ -913,7 +913,7 @@ sal_Bool SwDocStyleSheet::SetParent( const String& rStr) OSL_ENSURE(!this, "unknown style family"); } - sal_Bool bRet = sal_False; + bool bRet = false; if( pFmt && pFmt->DerivedFrom() && pFmt->DerivedFrom()->GetName() != rStr ) { @@ -938,10 +938,10 @@ sal_Bool SwDocStyleSheet::SetParent( const String& rStr) --------------------------------------------------------------------*/ -sal_Bool SwDocStyleSheet::SetFollow( const String& rStr) +bool SwDocStyleSheet::SetFollow( const String& rStr) { if( rStr.Len() && !SfxStyleSheetBase::SetFollow( rStr )) - return sal_False; + return false; SwImplShellAction aTmpSh( rDoc ); switch(nFamily) @@ -987,7 +987,7 @@ sal_Bool SwDocStyleSheet::SetFollow( const String& rStr) OSL_ENSURE(!this, "unknwown style family"); } - return sal_True; + return true; } /*-------------------------------------------------------------------- @@ -1843,7 +1843,7 @@ SwFrmFmt* SwDocStyleSheet::GetFrmFmt() return pFrmFmt; } -sal_Bool SwDocStyleSheet::IsUsed() const +bool SwDocStyleSheet::IsUsed() const { if( !bPhysical ) { @@ -1852,7 +1852,7 @@ sal_Bool SwDocStyleSheet::IsUsed() const } if( !bPhysical ) - return sal_False; + return false; const SwModify* pMod; switch( nFamily ) @@ -1863,11 +1863,11 @@ sal_Bool SwDocStyleSheet::IsUsed() const case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break; case SFX_STYLE_FAMILY_PSEUDO: - return pNumRule ? rDoc.IsUsed( *pNumRule ) : sal_False; + return pNumRule ? rDoc.IsUsed( *pNumRule ) : false; default: OSL_ENSURE(!this, "unknown style family"); - return sal_False; + return false; } return rDoc.IsUsed( *pMod ); } @@ -2230,7 +2230,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle) -sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, +bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, const String &rStyle, const String &rParent ) { SwFmt* pFmt = 0, *pParent = 0; @@ -2259,7 +2259,7 @@ sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam, OSL_ENSURE(!this, "unknown style family"); } - sal_Bool bRet = sal_False; + bool bRet = false; if( pFmt && pFmt->DerivedFrom() && pFmt->DerivedFrom()->GetName() != rParent ) { |