summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-02-15 11:59:31 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-02-16 22:52:29 +0100
commit8b3d4df3c8985dca67a986932c510a204c78f63a (patch)
tree257962b5d65b533e159f7a7fd7ac67e65753b819
parent87214657ba1fad4692be1084f719b91547378725 (diff)
sal_Bool to bool
Change-Id: I799196d2d9d52711937d56c018e70a1b453bce45
-rw-r--r--sw/source/core/inc/txtfrm.hxx10
-rw-r--r--sw/source/core/text/txtcache.cxx16
-rw-r--r--sw/source/core/text/txtfrm.cxx2
3 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index fc20df90eb9b..06b8d1aaef46 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -172,7 +172,7 @@ class SwTxtFrm: public SwCntntFrm
sal_Bool _GetDropRect( SwRect &rRect ) const;
- void SetPara( SwParaPortion *pNew, sal_Bool bDelete = sal_True );
+ void SetPara( SwParaPortion *pNew, bool bDelete = true );
sal_Bool _IsFtnNumFrm() const;
@@ -351,8 +351,8 @@ public:
SwParaPortion *GetPara();
inline const SwParaPortion *GetPara() const;
- inline sal_Bool HasPara() const;
- sal_Bool _HasPara() const;
+ inline bool HasPara() const;
+ bool _HasPara() const;
// If there are any hanging punctuation portions in the margin
// the offset will be returned.
SwTwips HangingMargin() const;
@@ -614,9 +614,9 @@ inline const SwParaPortion *SwTxtFrm::GetPara() const
return ((SwTxtFrm*)this)->GetPara();
}
-inline sal_Bool SwTxtFrm::HasPara() const
+inline bool SwTxtFrm::HasPara() const
{
- return nCacheIdx != USHRT_MAX ? _HasPara() : sal_False;
+ return nCacheIdx!=USHRT_MAX && _HasPara();
}
// 9104: Frm().Height() - Prt().Height(), siehe widorp.cxx und 7455, 6114, 7908
diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx
index 4cbad0253128..9a472278ab4e 100644
--- a/sw/source/core/text/txtcache.cxx
+++ b/sw/source/core/text/txtcache.cxx
@@ -99,19 +99,19 @@ bool SwTxtLineAccess::IsAvailable() const
|*
|*************************************************************************/
-sal_Bool SwTxtFrm::_HasPara() const
+bool SwTxtFrm::_HasPara() const
{
SwTxtLine *pTxtLine = (SwTxtLine*)SwTxtFrm::GetTxtCache()->
- Get( this, GetCacheIdx(), sal_False );
+ Get( this, GetCacheIdx(), false );
if ( pTxtLine )
{
if ( pTxtLine->GetPara() )
- return sal_True;
+ return true;
}
else
((SwTxtFrm*)this)->nCacheIdx = MSHRT_MAX;
- return sal_False;
+ return false;
}
/*************************************************************************
@@ -124,7 +124,7 @@ SwParaPortion *SwTxtFrm::GetPara()
{
if ( GetCacheIdx() != MSHRT_MAX )
{ SwTxtLine *pLine = (SwTxtLine*)SwTxtFrm::GetTxtCache()->
- Get( this, GetCacheIdx(), sal_False );
+ Get( this, GetCacheIdx(), false );
if ( pLine )
return pLine->GetPara();
else
@@ -146,7 +146,7 @@ void SwTxtFrm::ClearPara()
if ( !IsLocked() && GetCacheIdx() != MSHRT_MAX )
{
SwTxtLine *pTxtLine = (SwTxtLine*)SwTxtFrm::GetTxtCache()->
- Get( this, GetCacheIdx(), sal_False );
+ Get( this, GetCacheIdx(), false );
if ( pTxtLine )
{
delete pTxtLine->GetPara();
@@ -163,13 +163,13 @@ void SwTxtFrm::ClearPara()
|*
|*************************************************************************/
-void SwTxtFrm::SetPara( SwParaPortion *pNew, sal_Bool bDelete )
+void SwTxtFrm::SetPara( SwParaPortion *pNew, bool bDelete )
{
if ( GetCacheIdx() != MSHRT_MAX )
{
// Only change the information, the CacheObj stays there
SwTxtLine *pTxtLine = (SwTxtLine*)SwTxtFrm::GetTxtCache()->
- Get( this, GetCacheIdx(), sal_False );
+ Get( this, GetCacheIdx(), false );
if ( pTxtLine )
{
if( bDelete )
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 81a0f370f7b2..a03b00fb4113 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1862,7 +1862,7 @@ SwTestFormat::SwTestFormat( SwTxtFrm* pTxtFrm, const SwFrm* pPre, SwTwips nMaxHe
(pFrm->Frm().*fnRect->fnGetWidth)() -
( rAttrs.CalcLeft( pFrm ) + rAttrs.CalcRight( pFrm ) ) );
pOldPara = pFrm->HasPara() ? pFrm->GetPara() : NULL;
- pFrm->SetPara( new SwParaPortion(), sal_False );
+ pFrm->SetPara( new SwParaPortion(), false );
OSL_ENSURE( ! pFrm->IsSwapped(), "A frame is swapped before _Format" );