diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-11-25 21:47:12 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-11-25 21:48:31 +0900 |
commit | b19be5c73cadfa398f6f40e74ec23b9f79a9e3b7 (patch) | |
tree | a7faa576a7edb51b93bc38f1a86ed4a5ad548b41 /sw | |
parent | e609841e8f96d4898f080d1b06a753dbe346db36 (diff) |
sal_Bool to bool
Change-Id: Ieb7ddea4c5934717a22e2fdc78883a5d13cfc448
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 40 | ||||
-rw-r--r-- | sw/source/core/layout/dbg_lay.cxx | 36 | ||||
-rw-r--r-- | sw/source/core/layout/findfrm.cxx | 30 | ||||
-rw-r--r-- | sw/source/core/layout/flowfrm.cxx | 44 | ||||
-rw-r--r-- | sw/source/core/layout/fly.cxx | 20 | ||||
-rw-r--r-- | sw/source/core/layout/flycnt.cxx | 30 | ||||
-rw-r--r-- | sw/source/core/layout/flyincnt.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/layout/flylay.cxx | 10 |
10 files changed, 120 insertions, 120 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 2c291ee53b86..2b516de003bd 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -683,7 +683,7 @@ void SwGrfNode::ScaleImageMap() if ( !aURL.GetMap() ) return; - sal_Bool bScale = sal_False; + bool bScale = false; Fraction aScaleX( 1, 1 ); Fraction aScaleY( 1, 1 ); @@ -702,7 +702,7 @@ void SwGrfNode::ScaleImageMap() if( nGrfSize.Width() != nWidth ) { aScaleX = Fraction( nGrfSize.Width(), nWidth ); - bScale = sal_True; + bScale = true; } } if( !rFrmSize.GetHeightPercent() ) @@ -717,7 +717,7 @@ void SwGrfNode::ScaleImageMap() if( nGrfSize.Height() != nHeight ) { aScaleY = Fraction( nGrfSize.Height(), nHeight ); - bScale = sal_True; + bScale = true; } } diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 8d180aee3426..a850e95f04f3 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -176,7 +176,7 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt ) } // Anything other than frames registered? - sal_Bool bDel = sal_True; + bool bDel = true; { // nested scope because DTOR of SwClientIter resets the flag bTreeChg. // It's suboptimal if the format is deleted beforehand. @@ -334,7 +334,7 @@ bool SwFmtFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { - sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS); + bool bConvert = 0 != (nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; bool bRet = true; switch ( nMemberId ) @@ -765,7 +765,7 @@ bool SwFmtPageDesc::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // here we convert always! nMemberId &= ~CONVERT_TWIPS; - sal_Bool bRet = sal_True; + bool bRet = true; switch ( nMemberId ) { case MID_PAGEDESC_PAGENUMOFFSET: @@ -897,7 +897,7 @@ sal_uInt16 SwFmtCol::GetGutterWidth( sal_Bool bMin ) const nRet = aColumns[0].GetRight() + aColumns[1].GetLeft(); else if ( aColumns.size() > 2 ) { - sal_Bool bSet = sal_False; + bool bSet = false; for ( sal_uInt16 i = 1; i < aColumns.size()-1; ++i ) { const sal_uInt16 nTmp = aColumns[i].GetRight() + aColumns[i+1].GetLeft(); @@ -912,7 +912,7 @@ sal_uInt16 SwFmtCol::GetGutterWidth( sal_Bool bMin ) const } } else - { bSet = sal_True; + { bSet = true; nRet = nTmp; } } @@ -1319,7 +1319,7 @@ bool SwFmtVertOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const bool SwFmtVertOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { - sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS); + bool bConvert = 0 != (nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; bool bRet = true; switch ( nMemberId ) @@ -1441,7 +1441,7 @@ bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { - sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS); + bool bConvert = 0 != (nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; bool bRet = true; switch ( nMemberId ) @@ -1722,7 +1722,7 @@ int SwFmtURL::operator==( const SfxPoolItem &rAttr ) const { OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "not the same attributes" ); const SwFmtURL &rCmp = (SwFmtURL&)rAttr; - sal_Bool bRet = bIsServerMap == rCmp.IsServerMap() && + bool bRet = bIsServerMap == rCmp.IsServerMap() && sURL == rCmp.GetURL() && sTargetFrameName == rCmp.GetTargetFrameName() && sName == rCmp.GetName(); diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 12ac81010096..3b5171f117d1 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -490,7 +490,7 @@ void SwFrm::PrepareCrsr() |*************************************************************************/ // Here we return GetPrev(); however we will ignore empty SectionFrms -static SwFrm* lcl_Prev( SwFrm* pFrm, sal_Bool bSectPrv = sal_True ) +static SwFrm* lcl_Prev( SwFrm* pFrm, bool bSectPrv = true ) { SwFrm* pRet = pFrm->GetPrev(); if( !pRet && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm() && @@ -517,7 +517,7 @@ void SwFrm::MakePos() if ( !bValidPos ) { bValidPos = sal_True; - sal_Bool bUseUpper = sal_False; + bool bUseUpper = false; SwFrm* pPrv = lcl_Prev( this ); if ( pPrv && ( !pPrv->IsCntntFrm() || @@ -534,11 +534,11 @@ void SwFrm::MakePos() } else if ( pPrv->Frm().Top() == 0 ) { - bUseUpper = sal_True; + bUseUpper = true; } } - pPrv = lcl_Prev( this, sal_False ); + pPrv = lcl_Prev( this, false ); sal_uInt16 nMyType = GetType(); SWRECTFN( ( IsCellFrm() && GetUpper() ? GetUpper() : this ) ) if ( !bUseUpper && pPrv ) @@ -595,7 +595,7 @@ void SwFrm::MakePos() { GetUpper()->Calc(); } - pPrv = lcl_Prev( this, sal_False ); + pPrv = lcl_Prev( this, false ); if ( !bUseUpper && pPrv ) { aFrm.Pos( pPrv->Frm().Pos() ); @@ -1132,14 +1132,14 @@ void SwCntntFrm::MakeAll() const SwDoc *pDoc = GetAttrSet()->GetDoc(); if( pDoc ) { - static sal_Bool bWarned = sal_False; + static bool bWarned = false; if( pDoc->InXMLExport() ) { SAL_WARN_IF( !bWarned, "sw", "Formatting during XML-export!" ); - bWarned = sal_True; + bWarned = true; } else - bWarned = sal_False; + bWarned = false; } #endif @@ -1157,9 +1157,9 @@ void SwCntntFrm::MakeAll() // last CntntFrm of a chain to format. This only // needs to happen once. Every time the Frm is // moved, the flag will have to be reset. - sal_Bool bMustFit = sal_False; // Once the emergency brake is pulled, + bool bMustFit = false; // Once the emergency brake is pulled, // no other prepares will be triggered - sal_Bool bFitPromise = sal_False; // If a paragraph didn't fit, but promises + bool bFitPromise = false; // If a paragraph didn't fit, but promises // with WouldFit that it would adjust accordingly, // this flag is set. If it turns out that it // didn't keep it's promise, we can act in a @@ -1556,8 +1556,8 @@ void SwCntntFrm::MakeAll() } if ( pNxt ) { - const sal_Bool bMoveFwdInvalid = 0 != GetIndNext(); - const sal_Bool bNxtNew = + const bool bMoveFwdInvalid = 0 != GetIndNext(); + const bool bNxtNew = ( 0 == (pNxt->Prt().*fnRect->fnGetHeight)() ) && (!pNxt->IsTxtFrm() ||!((SwTxtFrm*)pNxt)->IsHiddenNow()); @@ -1604,8 +1604,8 @@ void SwCntntFrm::MakeAll() // If I'm unable to split (WouldFit()) and can't be fitted, I'm going // to tell my TxtFrm part that, if possible, we still need to split despite // the "don't split" attribute. - sal_Bool bMoveOrFit = sal_False; - sal_Bool bDontMoveMe = !GetIndPrev(); + bool bMoveOrFit = false; + bool bDontMoveMe = !GetIndPrev(); if( bDontMoveMe && IsInSct() ) { SwFtnBossFrm* pBoss = FindFtnBossFrm(); @@ -1614,10 +1614,10 @@ void SwCntntFrm::MakeAll() } // Finally, we are able to split table rows. Therefore, bDontMoveMe - // can be set to sal_False: + // can be set to false: if( bDontMoveMe && IsInTab() && 0 != const_cast<SwCntntFrm*>(this)->GetNextCellLeaf( MAKEPAGE_NONE ) ) - bDontMoveMe = sal_False; + bDontMoveMe = false; if ( bDontMoveMe && (Frm().*fnRect->fnGetHeight)() > (GetUpper()->Prt().*fnRect->fnGetHeight)() ) @@ -1631,7 +1631,7 @@ void SwCntntFrm::MakeAll() { Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False ); bValidSize = sal_False; - bFitPromise = sal_True; + bFitPromise = true; continue; } /* -------------------------------------------------- @@ -1646,7 +1646,7 @@ void SwCntntFrm::MakeAll() else if ( !bFtn && bMoveable && ( !bFly || !FindFlyFrm()->IsColLocked() ) && ( !bSct || !FindSctFrm()->IsColLocked() ) ) - bMoveOrFit = sal_True; + bMoveOrFit = true; } #if OSL_DEBUG_LEVEL > 0 else @@ -1705,7 +1705,7 @@ void SwCntntFrm::MakeAll() { Prepare( PREP_MUST_FIT, 0, sal_False ); bValidSize = sal_False; - bMustFit = sal_True; + bMustFit = true; continue; } @@ -1813,7 +1813,7 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt ) // This routine checks whether there are no other FtnBosses // between the pFrm's FtnBoss and the pNxt's FtnBoss. -static sal_Bool lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt ) +static bool lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt ) { OSL_ENSURE( pFrm && pNxt, "lcl_IsNextFtnBoss: No Frames?" ); pFrm = pFrm->FindFtnBossFrm(); diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index de78d6d8f9fb..ddcb9ad83035 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -179,7 +179,7 @@ SwImplProtocol* SwProtocol::pImpl = NULL; static sal_uLong lcl_GetFrameId( const SwFrm* pFrm ) { #if OSL_DEBUG_LEVEL > 1 - static sal_Bool bFrameId = sal_False; + static bool bFrameId = false; if( bFrameId ) return pFrm->GetFrmId(); #endif @@ -200,7 +200,7 @@ class SwImplProtocol sal_uInt8 nInitFile; // range (FrmId,FrmType,Record) during reading of the INI file sal_uInt8 nTestMode; // special for test formating, logging may only be done in test formating. void _Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam ); - sal_Bool NewStream(); + bool NewStream(); void CheckLine( rtl::OString& rLine ); void SectFunc( rtl::OStringBuffer& rOut, const SwFrm* pFrm, sal_uLong nAct, void* pParam ); public: @@ -209,8 +209,8 @@ public: // logging void Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam ) { if( pStream ) _Record( pFrm, nFunction, nAct, pParam ); } - sal_Bool InsertFrm( sal_uInt16 nFrmId ); // take FrmId for logging - sal_Bool DeleteFrm( sal_uInt16 nFrmId ); // remove FrmId; don't log him anymore + bool InsertFrm( sal_uInt16 nFrmId ); // take FrmId for logging + bool DeleteFrm( sal_uInt16 nFrmId ); // remove FrmId; don't log him anymore void FileInit(); // read the INI file void ChkStream() { if( !pStream ) NewStream(); } }; @@ -277,7 +277,7 @@ void SwProtocol::Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, { if( Start() ) { // We reach this point if SwProtocol::nRecord is binary OR'd with PROT_INIT(0x1) using the debugger - sal_Bool bFinit = sal_False; // This gives the possibility to stop logging of this action in the debugger + bool bFinit = false; // This gives the possibility to stop logging of this action in the debugger if( bFinit ) { nRecord &= ~nFunction; // Don't log this function any longer @@ -332,7 +332,7 @@ SwImplProtocol::SwImplProtocol() NewStream(); } -sal_Bool SwImplProtocol::NewStream() +bool SwImplProtocol::NewStream() { rtl::OUString aName("dbg_lay.out"); nLineCount = 0; @@ -411,10 +411,10 @@ void SwImplProtocol::CheckLine( rtl::OString& rLine ) do { rtl::OString aTok = rLine.getToken( 0, ' ', nIndex ); - sal_Bool bNo = sal_False; + bool bNo = false; if( '!' == aTok[0] ) { - bNo = sal_True; // remove this function/type + bNo = true; // remove this function/type aTok = aTok.copy(1); } if( !aTok.isEmpty() ) @@ -750,13 +750,13 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong void SwImplProtocol::SectFunc(rtl::OStringBuffer &rOut, const SwFrm* , sal_uLong nAct, void* pParam) { - sal_Bool bTmp = sal_False; + bool bTmp = false; switch( nAct ) { case ACT_MERGE: rOut.append(RTL_CONSTASCII_STRINGPARAM("Merge Section ")); rOut.append(static_cast<sal_Int64>(lcl_GetFrameId((SwFrm*)pParam))); break; - case ACT_CREATE_MASTER: bTmp = sal_True; // NoBreak + case ACT_CREATE_MASTER: bTmp = true; // NoBreak case ACT_CREATE_FOLLOW: rOut.append(RTL_CONSTASCII_STRINGPARAM("Create Section ")); if (bTmp) rOut.append(RTL_CONSTASCII_STRINGPARAM("Master to ")); @@ -764,7 +764,7 @@ void SwImplProtocol::SectFunc(rtl::OStringBuffer &rOut, const SwFrm* , sal_uLong rOut.append(RTL_CONSTASCII_STRINGPARAM("Follow from ")); rOut.append(static_cast<sal_Int64>(lcl_GetFrameId((SwFrm*)pParam))); break; - case ACT_DEL_MASTER: bTmp = sal_True; // NoBreak + case ACT_DEL_MASTER: bTmp = true; // NoBreak case ACT_DEL_FOLLOW: rOut.append(RTL_CONSTASCII_STRINGPARAM("Delete Section ")); if (bTmp) rOut.append(RTL_CONSTASCII_STRINGPARAM("Master to ")); @@ -781,27 +781,27 @@ void SwImplProtocol::SectFunc(rtl::OStringBuffer &rOut, const SwFrm* , sal_uLong * InsertFrm(..) only the added FrmIds are being logged. * --------------------------------------------------*/ -sal_Bool SwImplProtocol::InsertFrm( sal_uInt16 nId ) +bool SwImplProtocol::InsertFrm( sal_uInt16 nId ) { if( !pFrmIds ) pFrmIds = new std::set<sal_uInt16>; if( pFrmIds->count( nId ) ) - return sal_False; + return false; pFrmIds->insert( nId ); - return sal_True; + return true; } /* -------------------------------------------------- * SwImplProtocol::DeleteFrm(..) removes a FrmId from the pFrmIds array, so they * won't be logged anymore. * --------------------------------------------------*/ -sal_Bool SwImplProtocol::DeleteFrm( sal_uInt16 nId ) +bool SwImplProtocol::DeleteFrm( sal_uInt16 nId ) { if( !pFrmIds ) - return sal_False; + return false; if ( pFrmIds->erase(nId) ) - return sal_True; - return sal_False; + return true; + return false; } /* -------------------------------------------------- diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index ff02dfabb3bb..301db2bd8567 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -391,12 +391,12 @@ const SwCntntFrm* SwCntntFrm::ImplGetNextCntntFrm( bool bFwd ) const const SwFrm *pFrm = this; // #100926# SwCntntFrm *pCntntFrm = 0; - sal_Bool bGoingUp = sal_False; + bool bGoingUp = false; do { const SwFrm *p = 0; - sal_Bool bGoingFwdOrBwd = sal_False; + bool bGoingFwdOrBwd = false; - sal_Bool bGoingDown = ( !bGoingUp && ( 0 != ( p = lcl_GetLower( pFrm, true ) ) ) ); + bool bGoingDown = ( !bGoingUp && ( 0 != ( p = lcl_GetLower( pFrm, true ) ) ) ); if ( !bGoingDown ) { bGoingFwdOrBwd = ( 0 != ( p = lcl_FindLayoutFrame( pFrm, bFwd ) ) ); @@ -657,12 +657,12 @@ const SwAttrSet* SwFrm::GetAttrSet() const static SwFrm* lcl_NextFrm( SwFrm* pFrm ) { SwFrm *pRet = 0; - sal_Bool bGoingUp = sal_False; + bool bGoingUp = false; do { SwFrm *p = 0; - sal_Bool bGoingFwd = sal_False; - sal_Bool bGoingDown = (!bGoingUp && ( 0 != (p = pFrm->IsLayoutFrm() ? ((SwLayoutFrm*)pFrm)->Lower() : 0))); + bool bGoingFwd = false; + bool bGoingDown = (!bGoingUp && ( 0 != (p = pFrm->IsLayoutFrm() ? ((SwLayoutFrm*)pFrm)->Lower() : 0))); if( !bGoingDown ) { @@ -685,7 +685,7 @@ static SwFrm* lcl_NextFrm( SwFrm* pFrm ) SwFrm *SwFrm::_FindNext() { - sal_Bool bIgnoreTab = sal_False; + bool bIgnoreTab = false; SwFrm *pThis = this; if ( IsTabFrm() ) @@ -699,7 +699,7 @@ SwFrm *SwFrm::_FindNext() pThis = ((SwTabFrm*)this)->FindLastCntnt(); if ( !pThis ) pThis = this; - bIgnoreTab = sal_True; + bIgnoreTab = true; } else if ( IsSctFrm() ) { @@ -1069,7 +1069,7 @@ SwCntntFrm* SwFrm::_FindPrevCnt( const bool _bInSameFtn ) SwFrm *SwFrm::_FindPrev() { - sal_Bool bIgnoreTab = sal_False; + bool bIgnoreTab = false; SwFrm *pThis = this; if ( IsTabFrm() ) @@ -1081,7 +1081,7 @@ SwFrm *SwFrm::_FindPrev() return ((SwTabFrm*)this)->FindMaster(); else pThis = ((SwTabFrm*)this)->ContainsCntnt(); - bIgnoreTab = sal_True; + bIgnoreTab = true; } if ( pThis && pThis->IsCntntFrm() ) @@ -1248,20 +1248,20 @@ void SwFrm::InvalidateNextPrtArea() |* but not if it sits in a table which itself sits in a section with columns. |*************************************************************************/ -static sal_Bool lcl_IsInColSct( const SwFrm *pUp ) +static bool lcl_IsInColSct( const SwFrm *pUp ) { - sal_Bool bRet = sal_False; + bool bRet = false; while( pUp ) { if( pUp->IsColumnFrm() ) - bRet = sal_True; + bRet = true; else if( pUp->IsSctFrm() ) return bRet; else if( pUp->IsTabFrm() ) - return sal_False; + return false; pUp = pUp->GetUpper(); } - return sal_False; + return false; } /************************************************************************* diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 18642dfd69de..ef9ea8e7eee6 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -463,7 +463,7 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart ) } else { - sal_Bool bUnlock = !((SwFtnFrm*)pLay)->IsBackMoveLocked(); + bool bUnlock = !((SwFtnFrm*)pLay)->IsBackMoveLocked(); ((SwFtnFrm*)pLay)->LockBackMove(); pLay->InvalidateSize(); pLay->Calc(); @@ -613,7 +613,7 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling ) // Be economical with notifications if an action is running. ViewShell *pSh = rThis.getRootFrm()->GetCurrShell(); const SwViewImp *pImp = pSh ? pSh->Imp() : 0; - const sal_Bool bComplete = pImp && pImp->IsAction() && pImp->GetLayAction().IsComplete(); + const bool bComplete = pImp && pImp->IsAction() && pImp->GetLayAction().IsComplete(); if ( !bComplete ) { @@ -803,7 +803,7 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd, return 0; const SwFrm *pLeaf = this; - sal_Bool bFound = sal_False; + bool bFound = false; do { pLeaf = ((SwFrm*)pLeaf)->GetLeaf( eMakePage, bFwd ); @@ -814,7 +814,7 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd, if ( pAnch->IsInDocBody() == pLeaf->IsInDocBody() && pAnch->IsInFtn() == pLeaf->IsInFtn() ) { - bFound = sal_True; + bFound = true; } } } while ( !bFound && pLeaf ); @@ -979,9 +979,9 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) SwLayoutFrm *pOldLayLeaf = 0; // Make sure that we don't have to // start searching from top when we // have a freshly created page. - sal_Bool bNewPg = sal_False; // Only insert a new page once. + bool bNewPg = false; // Only insert a new page once. - while ( sal_True ) + while ( true ) { if ( pLayLeaf ) { @@ -1040,7 +1040,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) //insert a new one. if ( eMakePage == MAKEPAGE_INSERT ) { - bNewPg = sal_True; + bNewPg = true; SwPageFrm *pPg = pOldLayLeaf ? pOldLayLeaf->FindPageFrm() : 0; @@ -1867,16 +1867,16 @@ sal_Bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, sal_Bool bKeep, sal_Bool ) } if( pNxt && pNxt->GetValidPosFlag() ) { - sal_Bool bMove = sal_False; + bool bMove = false; const SwSectionFrm *pSct = rThis.FindSctFrm(); if( pSct && !pSct->GetValidSizeFlag() ) { const SwSectionFrm* pNxtSct = pNxt->FindSctFrm(); if( pNxtSct && pSct->IsAnFollow( pNxtSct ) ) - bMove = sal_True; + bMove = true; } else - bMove = sal_True; + bMove = true; if( bMove ) { //Keep together with the following frame @@ -1947,7 +1947,7 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b if( !IsFwdMoveAllowed() && !bMoveAlways ) { - sal_Bool bNoFwd = sal_True; + bool bNoFwd = true; if( rThis.IsInSct() ) { SwFtnBossFrm* pBoss = rThis.FindFtnBossFrm(); @@ -1962,7 +1962,7 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b rThis.GetUpper()->FindTabFrm()->IsFwdMoveAllowed() ) ) && 0 != const_cast<SwFrm&>(rThis).GetNextCellLeaf( MAKEPAGE_NONE ) ) { - bNoFwd = sal_False; + bNoFwd = false; } if( bNoFwd ) @@ -1992,7 +1992,7 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b // If our NewUpper lies in a SectionFrm, we need to make sure // that it won't destroy itself in Calc. SwSectionFrm* pSect = pNewUpper->FindSctFrm(); - sal_Bool bUnlock = sal_False; + bool bUnlock = false; if( pSect ) { // If we only switch column within our SectionFrm, we better don't @@ -2012,7 +2012,7 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b pNewUpper->Calc(); SwFtnBossFrm *pNewBoss = pNewUpper->FindFtnBossFrm(); - sal_Bool bBossChg = pNewBoss != pOldBoss; + bool bBossChg = pNewBoss != pOldBoss; pNewBoss = pNewBoss->FindFtnBossFrm( sal_True ); pOldBoss = pOldBoss->FindFtnBossFrm( sal_True ); SwPageFrm* pNewPage = pOldPage; @@ -2166,7 +2166,7 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) SwFtnBossFrm * pOldBoss = rThis.FindFtnBossFrm(); SwPageFrm * const pOldPage = pOldBoss->FindPageFrm(); SwLayoutFrm *pNewUpper = 0; - sal_Bool bCheckPageDescs = sal_False; + bool bCheckPageDescs = false; bool bCheckPageDescOfNextPage = false; if ( pFtn ) @@ -2261,7 +2261,7 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) } } - bCheckPageDescs = sal_True; + bCheckPageDescs = true; } } } @@ -2313,15 +2313,15 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) else { const SwFrm *pCol = rThis.FindColFrm(); - sal_Bool bGoOn = sal_True; - sal_Bool bJump = sal_False; + bool bGoOn = true; + bool bJump = false; do { if ( pCol->GetPrev() ) pCol = pCol->GetPrev(); else { - bGoOn = sal_False; + bGoOn = false; pCol = rThis.GetLeaf( MAKEPAGE_NONE, sal_False ); } if ( pCol ) @@ -2332,7 +2332,7 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) (SwLayoutFrm*)pCol; if ( pColBody->ContainsCntnt() ) { - bGoOn = sal_False; // We have content here! we accept this + bGoOn = false; // We have content here! we accept this // only if GetLeaf() has set the MoveBwdJump. if( SwFlowFrm::IsMoveBwdJump() ) { @@ -2368,7 +2368,7 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) else { if( pNewUpper ) // We already had an empty column, in other - bJump = sal_True; // words we skipped one. + bJump = true; // words we skipped one. pNewUpper = pColBody; // this empty column could be considered, // but we continue searching nevertheless. } @@ -2596,7 +2596,7 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) } } } - sal_Bool bUnlock = sal_False; + bool bUnlock = false; sal_Bool bFollow = sal_False; // Lock section. Otherwise, it could get destroyed if the only Cntnt // moves e.g. from the second into the first column. diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index fb8096275efa..25bbec3688a9 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -775,7 +775,7 @@ void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() ); SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld ); SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew ); - while( sal_True ) + while( true ) { _UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(), (SfxPoolItem*)aNIter.GetCurItem(), nInvFlags, @@ -833,7 +833,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, sal_uInt8 &rInvFlags, SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet ) { - sal_Bool bClear = sal_True; + bool bClear = true; const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; ViewShell *pSh = getRootFrm()->GetCurrShell(); switch( nWhich ) @@ -1123,7 +1123,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, } default: - bClear = sal_False; + bClear = false; } if ( bClear ) { @@ -1507,13 +1507,13 @@ void CalcCntnt( SwLayoutFrm *pLay, bool bNoCalcFollow ) { SwSectionFrm* pSect; - sal_Bool bCollect = sal_False; + bool bCollect = false; if( pLay->IsSctFrm() ) { pSect = (SwSectionFrm*)pLay; if( pSect->IsEndnAtEnd() && !bNoColl ) { - bCollect = sal_True; + bCollect = true; SwLayouter::CollectEndnotes( pLay->GetFmt()->GetDoc(), pSect ); } pSect->CalcFtnCntnt(); @@ -1800,14 +1800,14 @@ void CalcCntnt( SwLayoutFrm *pLay, if( bCollect ) { pFrm = pLay->ContainsAny(); - bCollect = sal_False; + bCollect = false; if( pFrm ) continue; } } break; } - while( sal_True ); + while( true ); } /************************************************************************* @@ -2621,7 +2621,7 @@ sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour, // in order to avoid load of graphic, if <SwNoTxtNode> contains a graphic // node and method is called for paint. const GraphicObject* pGrfObj = NULL; - sal_Bool bGrfObjCreated = sal_False; + bool bGrfObjCreated = false; const SwGrfNode* pGrfNd = pNd->GetGrfNode(); if ( pGrfNd && _bForPaint ) { @@ -2630,7 +2630,7 @@ sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour, else { pGrfObj = new GraphicObject( pNd->GetGraphic() ); - bGrfObjCreated = sal_True; + bGrfObjCreated = true; } OSL_ENSURE( pGrfObj, "SwFlyFrm::GetContour() - No Graphic/GraphicObject found at <SwNoTxtNode>." ); if ( pGrfObj && pGrfObj->GetType() != GRAPHIC_NONE ) @@ -2663,7 +2663,7 @@ sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour, const Size aGrfSize( pGrfObj->GetPrefSize() ); Size aOrgSize; Point aNewPoint; - sal_Bool bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL; + bool bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL; if ( bPixelMap ) aOrgSize = pOutDev->PixelToLogic( aGrfSize, aDispMap ); diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 783784c7f12c..81976e79174e 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -238,7 +238,7 @@ public: SwOszControl( const SwFlyFrm *pFrm ); ~SwOszControl(); bool ChkOsz(); - static sal_Bool IsInProgress( const SwFlyFrm *pFly ); + static bool IsInProgress( const SwFlyFrm *pFly ); }; const SwFlyFrm *SwOszControl::pStk1 = 0; const SwFlyFrm *SwOszControl::pStk2 = 0; @@ -285,19 +285,19 @@ SwOszControl::~SwOszControl() } } -sal_Bool SwOszControl::IsInProgress( const SwFlyFrm *pFly ) +bool SwOszControl::IsInProgress( const SwFlyFrm *pFly ) { if ( SwOszControl::pStk1 && !pFly->IsLowerOf( SwOszControl::pStk1 ) ) - return sal_True; + return true; if ( SwOszControl::pStk2 && !pFly->IsLowerOf( SwOszControl::pStk2 ) ) - return sal_True; + return true; if ( SwOszControl::pStk3 && !pFly->IsLowerOf( SwOszControl::pStk3 ) ) - return sal_True; + return true; if ( SwOszControl::pStk4 && !pFly->IsLowerOf( SwOszControl::pStk4 ) ) - return sal_True; + return true; if ( SwOszControl::pStk5 && !pFly->IsLowerOf( SwOszControl::pStk5 ) ) - return sal_True; - return sal_False; + return true; + return false; } bool SwOszControl::ChkOsz() @@ -573,10 +573,10 @@ public: SwDistance() { nMain = nSub = 0; } SwDistance& operator=( const SwDistance &rTwo ) { nMain = rTwo.nMain; nSub = rTwo.nSub; return *this; } - sal_Bool operator<( const SwDistance& rTwo ) const + bool operator<( const SwDistance& rTwo ) const { return nMain < rTwo.nMain || ( nMain == rTwo.nMain && nSub && rTwo.nSub && nSub < rTwo.nSub ); } - sal_Bool operator<=( const SwDistance& rTwo ) const + bool operator<=( const SwDistance& rTwo ) const { return nMain < rTwo.nMain || ( nMain == rTwo.nMain && ( !nSub || !rTwo.nSub || nSub <= rTwo.nSub ) ); } }; @@ -678,7 +678,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_True, pCnt ); SwTwips nFrmTop = 0; SwTwips nPrtHeight = 0; - sal_Bool bSct = sal_False; + bool bSct = false; const SwSectionFrm *pSect = pUp->FindSctFrm(); if( pSect ) { @@ -687,7 +687,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, } if( pSect && !pSect->IsAnLower( pLay ) ) { - bSct = sal_False; + bSct = false; const SwSectionFrm* pNxtSect = pLay ? pLay->FindSctFrm() : 0; if( pSect->IsAnFollow( pNxtSect ) ) { @@ -789,7 +789,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet, // is the part of the upper below the SectionFrm. const SwSectionFrm* pNxtSect = pLay ? pLay->FindSctFrm() : NULL; - bSct = sal_False; + bSct = false; if( pSect->IsAnFollow( pNxtSect ) ) { pSect = pNxtSect; @@ -1119,7 +1119,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew, SwDistance nUp, nUpLst; ::lcl_CalcDownDist( nUp, aNew, pUpFrm ); SwDistance nDown = nUp; - sal_Bool bNegAllowed = sal_True;// Make it possible to leave the negative section once. + bool bNegAllowed = true;// Make it possible to leave the negative section once. do { pUpLst = pUpFrm; nUpLst = nUp; @@ -1147,7 +1147,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew, nUp.nMain = LONG_MAX; if ( nUp.nMain >= 0 && LONG_MAX != nUp.nMain ) { - bNegAllowed = sal_False; + bNegAllowed = false; if ( nUpLst.nMain < 0 ) //don't take the wrong one, if the value //just changed from negative to positive. { pUpLst = pUpFrm; diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index 5caf39b35e72..e9880f71fb39 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -113,7 +113,7 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint, |*************************************************************************/ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { - sal_Bool bCallPrepare = sal_False; + bool bCallPrepare = false; sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; if( RES_ATTRSET_CHG == nWhich ) { @@ -132,19 +132,19 @@ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if( aNew.Count() ) { SwFlyFrm::Modify( &aOld, &aNew ); - bCallPrepare = sal_True; + bCallPrepare = true; } } else if( ((SwAttrSetChg*)pNew)->GetChgSet()->Count()) { SwFlyFrm::Modify( pOld, pNew ); - bCallPrepare = sal_True; + bCallPrepare = true; } } else if( nWhich != RES_SURROUND && RES_FRMMACRO != nWhich ) { SwFlyFrm::Modify( pOld, pNew ); - bCallPrepare = sal_True; + bCallPrepare = true; } if ( bCallPrepare && GetAnchorFrm() ) diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 53e273a795d6..8b12718ae243 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -309,11 +309,11 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz ) const long nClipBot = aClip.Top() + aClip.Height(); const long nClipRig = aClip.Left() + aClip.Width(); - const sal_Bool bBot = nBot > nClipBot; - const sal_Bool bRig = nRig > nClipRig; + const bool bBot = nBot > nClipBot; + const bool bRig = nRig > nClipRig; if ( bBot || bRig ) { - sal_Bool bAgain = sal_False; + bool bAgain = false; // #i37068# - no move, if it's requested if ( bBot && !IsNoMoveOnCheckClip() && !GetDrawObjs() && !GetAnchorFrm()->IsInTab() ) @@ -328,7 +328,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz ) const long nOld = Frm().Top(); Frm().Pos().Y() = Max( aClip.Top(), nClipBot - Frm().Height() ); if ( Frm().Top() != nOld ) - bAgain = sal_True; + bAgain = true; bHeightClipped = sal_True; } } @@ -344,7 +344,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz ) if( rH.GetHoriOrient() == text::HoriOrientation::LEFT ) Frm().Pos().X() = nOld; else - bAgain = sal_True; + bAgain = true; } bWidthClipped = sal_True; } |