diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-11-30 08:49:55 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-11-30 09:51:55 +0900 |
commit | dffb58f927ed68b58de1d5d6ad0df6549eb21d70 (patch) | |
tree | f54f6a7dea499e2c7c7590e20a01b083a8f1319e | |
parent | 469a202f5c387b71f698bf09ce0daefbcfd65dd3 (diff) |
sal_Bool to bool
Change-Id: I3b201985d204995c4b9eb707e7ef650c55985751
-rw-r--r-- | sw/source/core/layout/ssfrm.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 67 | ||||
-rw-r--r-- | sw/source/core/layout/trvlfrm.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/layout/wsfrm.cxx | 68 | ||||
-rw-r--r-- | sw/source/core/ole/ndole.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/swg/SwXMLTextBlocks.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/swg/SwXMLTextBlocks1.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/swg/swblocks.cxx | 4 |
8 files changed, 87 insertions, 88 deletions
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 177cd4d4b620..c27e2cb71388 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -227,7 +227,7 @@ void SwFrm::CheckDirChange() sal_Bool bOldR2L = GetRightToLeftFlag(); SetInvalidVert( sal_True ); SetInvalidR2L( sal_True ); - sal_Bool bChg = bOldR2L != IsRightToLeft(); + bool bChg = bOldR2L != IsRightToLeft(); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin sal_Bool bOldVertL2R = IsVertLR(); if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() ) @@ -675,8 +675,8 @@ const SwRect SwFrm::PaintArea() const long nRight = (aRect.*fnRect->fnGetRight)(); long nLeft = (aRect.*fnRect->fnGetLeft)(); const SwFrm* pTmp = this; - sal_Bool bLeft = sal_True; - sal_Bool bRight = sal_True; + bool bLeft = true; + bool bRight = true; long nRowSpan = 0; while( pTmp ) { @@ -706,8 +706,8 @@ const SwRect SwFrm::PaintArea() const nRight = nTmpRight; if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() || pTmp->IsRootFrm() ) break; - bLeft = sal_False; - bRight = sal_False; + bLeft = false; + bRight = false; } else if( pTmp->IsColumnFrm() ) // nobody enters neightbour columns { @@ -717,14 +717,14 @@ const SwRect SwFrm::PaintArea() const { if( bLeft || nLeft < nTmpLeft ) nLeft = nTmpLeft; - bLeft = sal_False; + bLeft = false; } // the last column has _no_ influence to the right range if( bR2L ? pTmp->GetPrev() : pTmp->GetNext() ) { if( bRight || nTmpRight < nRight ) nRight = nTmpRight; - bRight = sal_False; + bRight = false; } } else if( bVert && pTmp->IsBodyFrm() ) @@ -738,14 +738,14 @@ const SwRect SwFrm::PaintArea() const if( pTmp->GetPrev() && ( bLeft || nLeft < nTmpLeft ) ) { nLeft = nTmpLeft; - bLeft = sal_False; + bLeft = false; } if( pTmp->GetNext() && ( pTmp->GetNext()->IsFooterFrm() || pTmp->GetNext()->GetNext() ) && ( bRight || nTmpRight < nRight ) ) { nRight = nTmpRight; - bRight = sal_False; + bRight = false; } } pTmp = pTmp->GetUpper(); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index db3f7b2b0907..de12762772c8 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -199,7 +199,7 @@ void SwTabFrm::RegistFlys() |*************************************************************************/ void SwInvalidateAll( SwFrm *pFrm, long nBottom ); static void lcl_RecalcRow( SwRowFrm& rRow, long nBottom ); -static sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva ); +static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ); // #i26945# - add parameter <_bOnlyRowsAndCells> to control // that only row and cell frames are formatted. static sal_Bool lcl_InnerCalcLayout( SwFrm *pFrm, @@ -356,7 +356,7 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow ) // all lowers should have the correct position lcl_ArrangeLowers( &rToAdjust, (rToAdjust.*fnRect->fnGetPrtTop)(), - sal_False ); + false ); // TODO: Optimize number of frames which are set to 0 height // we have to start with the last lower frame, otherwise // the shrink will not shrink the current cell @@ -395,7 +395,7 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow ) // all lowers should have the correct position lcl_ArrangeLowers( &rToAdjust, (rToAdjust.*fnRect->fnGetPrtTop)(), - sal_False ); + false ); } pCurrMasterCell = static_cast<SwCellFrm*>(pCurrMasterCell->GetNext()); @@ -1173,16 +1173,16 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee // // Build follow table if not already done: // - sal_Bool bNewFollow; + bool bNewFollow; SwTabFrm *pFoll; if ( GetFollow() ) { pFoll = GetFollow(); - bNewFollow = sal_False; + bNewFollow = false; } else { - bNewFollow = sal_True; + bNewFollow = true; pFoll = new SwTabFrm( *this ); // @@ -1383,7 +1383,7 @@ bool SwTabFrm::Join() void SwInvalidatePositions( SwFrm *pFrm, long nBottom ) { // LONG_MAX == nBottom means we have to calculate all - sal_Bool bAll = LONG_MAX == nBottom; + bool bAll = LONG_MAX == nBottom; SWRECTFN( pFrm ) do { pFrm->_InvalidatePos(); @@ -1408,7 +1408,7 @@ void SwInvalidatePositions( SwFrm *pFrm, long nBottom ) void SwInvalidateAll( SwFrm *pFrm, long nBottom ) { // LONG_MAX == nBottom means we have to calculate all - sal_Bool bAll = LONG_MAX == nBottom; + bool bAll = LONG_MAX == nBottom; SWRECTFN( pFrm ) do { @@ -1469,11 +1469,11 @@ bool SwCntntFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave, long nBottom, bool bSkipRowSpanCells ) { if ( !pLay ) - return sal_True; + return true; // LONG_MAX == nBottom means we have to calculate all bool bAll = LONG_MAX == nBottom; - bool bRet = sal_False; + bool bRet = false; SwCntntFrm *pCnt = pLay->ContainsCntnt(); SWRECTFN( pLay ) @@ -1561,7 +1561,7 @@ static sal_Bool lcl_InnerCalcLayout( SwFrm *pFrm, bool _bOnlyRowsAndCells ) { // LONG_MAX == nBottom means we have to calculate all - sal_Bool bAll = LONG_MAX == nBottom; + bool bAll = LONG_MAX == nBottom; sal_Bool bRet = sal_False; const SwFrm* pOldUp = pFrm->GetUpper(); SWRECTFN( pFrm ) @@ -2192,7 +2192,7 @@ void SwTabFrm::MakeAll() while ( pRowToMove && nRowsToMove-- > 0 ) { - const sal_Bool bMoveFtns = bFtnsInDoc && !GetFollow()->IsJoinLocked(); + const bool bMoveFtns = bFtnsInDoc && !GetFollow()->IsJoinLocked(); SwFtnBossFrm *pOldBoss = 0; if ( bMoveFtns ) @@ -2833,7 +2833,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs ) // OD 14.03.2003 #i9040# - adjust variable name. const SwTwips nWishedTableWidth = CalcRel( rSz, sal_True ); - sal_Bool bCheckBrowseWidth = sal_False; + bool bCheckBrowseWidth = false; // OD 14.03.2003 #i9040# - insert new variables for left/right spacing. SwTwips nLeftSpacing = 0; @@ -2922,7 +2922,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs ) //Only the free space needed for the border is taken into //account. The attribute values of LRSpace are ignored //intentionally. - bCheckBrowseWidth = sal_True; + bCheckBrowseWidth = true; nLeftSpacing = nLeftLine + nLeftOffset; nRightSpacing = nRightLine + nRightOffset; break; @@ -2954,7 +2954,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs ) { //Linker Rand und die Breite zaehlen (Word-Spezialitaet) // OD 10.03.2003 #i9040# - no width alignment in online mode. - //bCheckBrowseWidth = sal_True; + //bCheckBrowseWidth = true; nLeftSpacing = pAttrs->CalcLeft( this ); if( nLeftOffset ) { @@ -3124,7 +3124,7 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; - sal_Bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); + bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); if( bAttrSetChg ) { @@ -3132,7 +3132,7 @@ void SwTabFrm::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, @@ -3188,7 +3188,7 @@ void SwTabFrm::_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; switch( nWhich ) { @@ -3257,7 +3257,7 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, /* no break here */ default: - bClear = sal_False; + bClear = false; } if ( bClear ) { @@ -3407,7 +3407,7 @@ sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &r SwPageFrm *pOldPage = FindPageFrm(), *pNewPage = pNewUpper->FindPageFrm(); - sal_Bool bMoveAnyway = sal_False; + bool bMoveAnyway = false; SwTwips nSpace = 0; SWRECTFN( this ) @@ -3419,8 +3419,7 @@ sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &r long nNewWidth = (pNewUpper->Prt().*fnRectX->fnGetWidth)(); if( Abs( nNewWidth - nOldWidth ) < 2 ) { - if( sal_False == - ( bMoveAnyway = (BwdMoveNecessary( pOldPage, Frm() ) > 1) ) ) + if( !( bMoveAnyway = (BwdMoveNecessary( pOldPage, Frm() ) > 1) ) ) { SwRect aRect( pNewUpper->Prt() ); aRect.Pos() += pNewUpper->Frm().Pos(); @@ -3450,10 +3449,10 @@ sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &r } } else if( !bLockBackMove ) - bMoveAnyway = sal_True; + bMoveAnyway = true; } else if( !bLockBackMove ) - bMoveAnyway = sal_True; + bMoveAnyway = true; if ( bMoveAnyway ) return rReformat = sal_True; @@ -3712,7 +3711,7 @@ void SwRowFrm::RegistFlys( SwPageFrm *pPage ) |*************************************************************************/ void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { - sal_Bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); + bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); const SfxPoolItem *pItem = 0; if( bAttrSetChg ) @@ -4686,9 +4685,9 @@ SwCellFrm::~SwCellFrm() |* SwCellFrm::Format() |* |*************************************************************************/ -static sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva ) +static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ) { - sal_Bool bRet = sal_False; + bool bRet = false; SwFrm *pFrm = pLay->Lower(); SWRECTFN( pLay ) while ( pFrm ) @@ -4696,7 +4695,7 @@ static sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bIn long nFrmTop = (pFrm->Frm().*fnRect->fnGetTop)(); if( nFrmTop != lYStart ) { - bRet = sal_True; + bRet = true; const long lDiff = (*fnRect->fnYDiff)( lYStart, nFrmTop ); const long lDiffX = lYStart - nFrmTop; (pFrm->Frm().*fnRect->fnSubTop)( -lDiff ); @@ -5076,7 +5075,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs ) OSL_ENSURE( !this, "VAlign to cell without content" ); return; } - sal_Bool bVertDir = sal_True; + bool bVertDir = true; // #i43913# - no vertical alignment, if wrapping // style influence is considered on object positioning and // an object is anchored inside the cell. @@ -5117,7 +5116,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs ) pAnchoredObj->IsTmpConsiderWrapInfluence() || !rAnchoredObjFrmFmt.GetFollowTextFlow().GetValue() ) { - bVertDir = sal_False; + bVertDir = false; break; } } @@ -5155,7 +5154,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs ) if ( Lower()->IsCntntFrm() ) { const long lYStart = (this->*fnRect->fnGetPrtTop)(); - lcl_ArrangeLowers( this, lYStart, sal_True ); + lcl_ArrangeLowers( this, lYStart, true ); } } } @@ -5168,7 +5167,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs ) void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { - sal_Bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); + bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); const SfxPoolItem *pItem = 0; if( bAttrSetChg ) @@ -5178,14 +5177,14 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) if ( pItem ) { - sal_Bool bInva = sal_True; + bool bInva = true; if ( text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient() && // OD 04.11.2003 #112910# Lower() && Lower()->IsCntntFrm() ) { SWRECTFN( this ) const long lYStart = (this->*fnRect->fnGetPrtTop)(); - bInva = lcl_ArrangeLowers( this, lYStart, sal_False ); + bInva = lcl_ArrangeLowers( this, lYStart, false ); } if ( bInva ) { diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 856845f5428d..41dafead11f2 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -133,14 +133,14 @@ public: //public: // SwCrsrOszControl() : pStk1( 0 ), pStk2( 0 ) {}; // ; <- ???? - sal_Bool ChkOsz( const SwFlyFrm *pFly ) + bool ChkOsz( const SwFlyFrm *pFly ) { - sal_Bool bRet = sal_True; + bool bRet = true; if ( pFly != pStk1 && pFly != pStk2 ) { pStk1 = pStk2; pStk2 = pFly; - bRet = sal_False; + bRet = false; } return bRet; } @@ -638,7 +638,7 @@ static const SwCntntFrm *lcl_GetPrvCnt( const SwCntntFrm* pCnt ) typedef const SwCntntFrm *(*GetNxtPrvCnt)( const SwCntntFrm* ); //Frame in wiederholter Headline? -static sal_Bool lcl_IsInRepeatedHeadline( const SwFrm *pFrm, +static bool lcl_IsInRepeatedHeadline( const SwFrm *pFrm, const SwTabFrm** ppTFrm = 0 ) { const SwTabFrm *pTab = pFrm->FindTabFrm(); @@ -1244,7 +1244,7 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint, Point aPoint = rPoint; sal_uLong nDistance = ULONG_MAX; - while ( sal_True ) //Sicherheitsschleifchen, damit immer einer gefunden wird. + while ( true ) //Sicherheitsschleifchen, damit immer einer gefunden wird. { while ( pCntnt && ((!bDontLeave || IsAnLower( pCntnt )) && diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 7025c2b3581a..3e071414d1e8 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -258,7 +258,7 @@ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { SfxItemIter aNIter( *((SwAttrSetChg*)pNew)->GetChgSet() ); SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() ); - while( sal_True ) + while( true ) { _UpdateAttrFrm( (SfxPoolItem*)aOIter.GetCurItem(), (SfxPoolItem*)aNIter.GetCurItem(), nInvFlags ); @@ -339,7 +339,7 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew, { if ( IsRowFrm() ) { - sal_Bool bInFollowFlowRow = 0 != IsInFollowFlowRow(); + bool bInFollowFlowRow = 0 != IsInFollowFlowRow(); if ( bInFollowFlowRow || 0 != IsInSplitTableRow() ) { SwTabFrm* pTab = FindTabFrm(); @@ -1364,7 +1364,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst ) return 0L; const ViewShell *pSh = getRootFrm()->GetCurrShell(); - const sal_Bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); + const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); //The (Page-)Body only changes in BrowseMode, but only if it does not //contain columns. @@ -1522,13 +1522,13 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst ) SwFtnContFrm* pCont = (SwFtnContFrm*)GetNext(); SwTwips nMinH = 0; SwFtnFrm* pFtn = (SwFtnFrm*)pCont->Lower(); - sal_Bool bFtn = sal_False; + bool bFtn = false; while( pFtn ) { if( !pFtn->GetAttr()->GetFtn().IsEndNote() ) { nMinH += (pFtn->Frm().*fnRect->fnGetHeight)(); - bFtn = sal_True; + bFtn = true; } pFtn = (SwFtnFrm*)pFtn->GetNext(); } @@ -1849,7 +1849,7 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) nDist = LONG_MAX - nFrmHeight; const ViewShell *pSh = getRootFrm()->GetCurrShell(); - const sal_Bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); + const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse with Body if( !(GetUpper()->GetType() & nTmpType) && GetUpper()->HasFixSize() ) { @@ -2078,7 +2078,7 @@ void SwCntntFrm::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, @@ -2145,7 +2145,7 @@ void SwCntntFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew, sal_uInt8 &rInvFlags, SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet ) { - sal_Bool bClear = sal_True; + bool bClear = true; sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; switch ( nWhich ) { @@ -2276,7 +2276,7 @@ void SwCntntFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew, /* no break here */ default: - bClear = sal_False; + bClear = false; } if ( bClear ) { @@ -2358,7 +2358,7 @@ SwTwips SwLayoutFrm::InnerHeight() const SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { const ViewShell *pSh = getRootFrm()->GetCurrShell(); - const sal_Bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); + const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse with Body if( !(GetType() & nTmpType) && HasFixSize() ) return 0; @@ -2384,16 +2384,16 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) } SwRect aOldFrm( Frm() ); - sal_Bool bMoveAccFrm = sal_False; + bool bMoveAccFrm = false; - sal_Bool bChgPos = IsVertical() && !IsReverse(); + bool bChgPos = IsVertical() && !IsReverse(); if ( !bTst ) { (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist ); //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if( bChgPos && !IsVertLR() ) Frm().Pos().X() -= nDist; - bMoveAccFrm = sal_True; + bMoveAccFrm = true; } SwTwips nReal = nDist - nMin; @@ -2475,7 +2475,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if( bChgPos && !IsVertLR() ) Frm().Pos().X() = nFrmPos - nReal; - bMoveAccFrm = sal_True; + bMoveAccFrm = true; } if ( nReal ) @@ -2524,7 +2524,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { const ViewShell *pSh = getRootFrm()->GetCurrShell(); - const sal_Bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); + const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body if( !(GetType() & nTmpType) && HasFixSize() ) return 0; @@ -2536,7 +2536,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) nDist = nFrmHeight; SwTwips nMin = 0; - sal_Bool bChgPos = IsVertical() && !IsReverse(); + bool bChgPos = IsVertical() && !IsReverse(); if ( Lower() ) { if( !Lower()->IsNeighbourFrm() ) @@ -2556,7 +2556,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) return nDist; SwRect aOldFrm( Frm() ); - sal_Bool bMoveAccFrm = sal_False; + bool bMoveAccFrm = false; SwTwips nRealDist = nReal; if ( !bTst ) @@ -2565,7 +2565,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin if( bChgPos && !IsVertLR() ) Frm().Pos().X() += nReal; - bMoveAccFrm = sal_True; + bMoveAccFrm = true; } sal_uInt8 nAdjust = GetUpper() && GetUpper()->IsFtnBossFrm() ? @@ -2743,7 +2743,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) pLowerFrm = pLowerFrm->GetNext(); else break; - } while( sal_True ); + } while( true ); // If found last lower is a section frame containing no section // (section frame isn't valid and will be deleted in the future), // travel backwards. @@ -3199,7 +3199,7 @@ static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff ) const SwFmtFrmSize &rSz = pFly->GetFmt()->GetFrmSize(); if ( rSz.GetWidthPercent() || rSz.GetHeightPercent() ) { - sal_Bool bNotify = sal_True; + bool bNotify = true; // If we've a fly with more than 90% relative height... if( rSz.GetHeightPercent() > 90 && pFly->GetAnchorFrm() && rSz.GetHeightPercent() != 0xFF && nDiff ) @@ -3214,7 +3214,7 @@ static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff ) ( nDiff + pRel->Prt().Height() )*9 && pFly->GetFmt()->GetSurround().GetSurround() != SURROUND_THROUGHT ) - bNotify = sal_False; + bNotify = false; } if( bNotify ) pFly->InvalidateSize(); @@ -3267,7 +3267,7 @@ long SwLayoutFrm::CalcRel( const SwFmtFrmSize &rSz, sal_Bool ) const const SwFrm *pRel = GetUpper(); long nRel = LONG_MAX; const ViewShell *pSh = getRootFrm()->GetCurrShell(); - const sal_Bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); + const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode(); if( pRel->IsPageBodyFrm() && pSh && bBrowseMode && pSh->VisArea().Width() ) { nRel = pSh->GetBrowseWidth(); @@ -3315,7 +3315,7 @@ static long lcl_CalcMinColDiff( SwLayoutFrm *pLayFrm ) return nDiff ? nDiff : nFirstDiff ? nFirstDiff : 240; } -static sal_Bool lcl_IsFlyHeightClipped( SwLayoutFrm *pLay ) +static bool lcl_IsFlyHeightClipped( SwLayoutFrm *pLay ) { SwFrm *pFrm = pLay->ContainsCntnt(); while ( pFrm ) @@ -3334,13 +3334,13 @@ static sal_Bool lcl_IsFlyHeightClipped( SwLayoutFrm *pLay ) SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj); if ( pFly->IsHeightClipped() && ( !pFly->IsFlyFreeFrm() || pFly->GetPageFrm() ) ) - return sal_True; + return true; } } } pFrm = pFrm->FindNextCnt(); } - return sal_False; + return false; } /************************************************************************* @@ -3363,8 +3363,8 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, const SwFmtCol &rCol = rAttrs.GetAttrSet().GetCol(); const sal_uInt16 nNumCols = rCol.GetNumCols(); - sal_Bool bEnd = sal_False; - sal_Bool bBackLock = sal_False; + bool bEnd = false; + bool bBackLock = false; ViewShell *pSh = getRootFrm()->GetCurrShell(); SwViewImp *pImp = pSh ? pSh->Imp() : 0; { @@ -3439,7 +3439,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, SwFrm* pFtnAny = pFtnCont->ContainsAny(); if( pFtnAny && pFtnAny->IsValid() ) { - bBackLock = sal_True; + bBackLock = true; ((SwSectionFrm*)this)->SetFtnLock( sal_True ); } } @@ -3497,7 +3497,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, pCol = (SwLayoutFrm*)Lower(); OSL_ENSURE( pCol && pCol->GetNext(), ":-( column making holidays?"); // set bMinDiff if no empty columns exist - sal_Bool bMinDiff = sal_True; + bool bMinDiff = true; // OD 28.03.2003 #108446# - check for all column content and all columns while ( bMinDiff && pCol ) { @@ -3511,7 +3511,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, SwTwips nMaxFree = 0; SwTwips nAllFree = LONG_MAX; // set bFoundLower if there is at least one non-empty column - sal_Bool bFoundLower = sal_False; + bool bFoundLower = false; while( pCol ) { SwLayoutFrm* pLay = (SwLayoutFrm*)pCol->Lower(); @@ -3519,7 +3519,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, (pLay->Prt().*fnRect->fnGetHeight)(); if( pLay->Lower() ) { - bFoundLower = sal_True; + bFoundLower = true; nInnerHeight += pLay->InnerHeight(); } else if( nInnerHeight < 0 ) @@ -3527,7 +3527,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, if( pLay->GetNext() ) { - bFoundLower = sal_True; + bFoundLower = true; pLay = (SwLayoutFrm*)pLay->GetNext(); OSL_ENSURE( pLay->IsFtnContFrm(),"FtnContainer exspected" ); nInnerHeight += pLay->InnerHeight(); @@ -3684,10 +3684,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, } } else - bEnd = sal_True; + bEnd = true; } else - bEnd = sal_True; + bEnd = true; } while ( !bEnd || !bValidSize ); } diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 006cdcc6ad0f..5505b325484c 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -172,7 +172,7 @@ public: virtual ::sfx2::SvBaseLink::UpdateResult DataChanged( const String& rMimeType, const ::com::sun::star::uno::Any & rValue ); - sal_Bool Connect() { return GetRealObject() != NULL; } + bool Connect() { return GetRealObject() != NULL; } }; // ----------------------------------------------------------------------------- @@ -840,7 +840,7 @@ sal_Bool SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, sal_Bool bRet = sal_True; sal_Int32 nState = xObj.is() ? xObj->getCurrentState() : embed::EmbedStates::LOADED; - sal_Bool bIsActive = ( nState != embed::EmbedStates::LOADED && nState != embed::EmbedStates::RUNNING ); + bool bIsActive = ( nState != embed::EmbedStates::LOADED && nState != embed::EmbedStates::RUNNING ); sal_Int64 nMiscStatus = xObj->getStatus( nAspect ); if( nState != embed::EmbedStates::LOADED && !pDoc->IsInDtor() && !bIsActive && diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index fe5d8523a75a..ecfc57459ede 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -356,7 +356,7 @@ sal_uLong SwXMLTextBlocks::PutBlock( SwPaM& , const String& ) // Save OLE objects if there are some SwDocShell *pDocSh = pDoc->GetDocShell(); - sal_Bool bHasChildren = pDocSh && pDocSh->GetEmbeddedObjectContainer().HasEmbeddedObjects(); + bool bHasChildren = pDocSh && pDocSh->GetEmbeddedObjectContainer().HasEmbeddedObjects(); if( !nRes && bHasChildren ) { // we have to write to the temporary storage first, since the used below functions are optimized diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index 0bdb4ec4d771..66dff575a520 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -609,7 +609,7 @@ sal_uLong SwXMLTextBlocks::SetMacroTable( xRoot = xBlkRoot->openStorageElement( aPackageName, embed::ElementModes::WRITE ); OUString sStreamName( RTL_CONSTASCII_USTRINGPARAM("atevent.xml") ); long nTmp = SOT_FORMATSTR_ID_STARWRITER_60; - sal_Bool bOasis = ( SotStorage::GetVersion( xRoot ) > nTmp ); + bool bOasis = ( SotStorage::GetVersion( xRoot ) > nTmp ); uno::Reference < io::XStream > xDocStream = xRoot->openStreamElement( sStreamName, embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ); diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index 46954c00b653..05e2891051a4 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -404,12 +404,12 @@ sal_uInt16 SwTextBlocks::Rename( sal_uInt16 n, const String* s, const String* l sal_uLong SwTextBlocks::CopyBlock( SwTextBlocks& rSource, String& rSrcShort, const String& rLong ) { - sal_Bool bIsOld = sal_False; + bool bIsOld = false; if (rSource.pImp) { short nType = rSource.pImp->GetFileType(); if (SWBLK_SW2 == nType || SWBLK_SW3 == nType ) - bIsOld = sal_True; + bIsOld = true; } if( bIsOld ) //rSource.IsOld() ) nErr = ERR_SWG_OLD_GLOSSARY; |