diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-02-22 10:23:37 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-02-22 12:31:40 +0100 |
commit | 0b9310f91cdea3feb4160512d2fb1ce774007de7 (patch) | |
tree | 071bd4baa54760354ba61d18e82a3be03e40a277 /sw | |
parent | 6262c7073190d983e14727ea635f35a5b03dc7e2 (diff) |
sal_Bool to bool
Change-Id: I65c0332e53196ff9c059db2dcb4721968dacff1b
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/frmcrsr.cxx | 39 | ||||
-rw-r--r-- | sw/source/core/text/frmform.cxx | 32 | ||||
-rw-r--r-- | sw/source/core/text/frminf.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/frmpaint.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/text/itradj.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/text/itrcrsr.cxx | 49 | ||||
-rw-r--r-- | sw/source/core/text/noteurl.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/porlin.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/porrst.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/txtfld.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 16 |
11 files changed, 88 insertions, 90 deletions
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 8626435cc882..91ce85d6a990 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -55,15 +55,15 @@ using namespace ::com::sun::star; * - SurvivalKit: For how long do we get past the last char of the line. * - RightMargin abstains from adjusting position with -1 * - GetCharRect returns a GetEndCharRect for MV_RIGHTMARGIN - * - GetEndCharRect sets bRightMargin to sal_True - * - SwTxtCursor::bRightMargin is set to sal_False by CharCrsrToLine + * - GetEndCharRect sets bRightMargin to true + * - SwTxtCursor::bRightMargin is set to false by CharCrsrToLine */ namespace { SwTxtFrm *GetAdjFrmAtPos( SwTxtFrm *pFrm, const SwPosition &rPos, - const sal_Bool bRightMargin, const sal_Bool bNoScroll = sal_True ) + const bool bRightMargin, const bool bNoScroll = true ) { // RightMargin in the last master line const sal_Int32 nOffset = rPos.nContent.GetIndex(); @@ -187,7 +187,7 @@ bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos, OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::GetCharRect with swapped frame" ); if( IsLocked() || IsHiddenNow() ) - return sal_False; + return false; // Find the right frame first. We need to keep in mind that: // - the cached information could be invalid (GetPara() == 0) @@ -426,7 +426,7 @@ bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const SwTxtSizeInfo aInf( pFrm ); SwTxtCursor aLine( pFrm, &aInf ); SwCrsrMoveState aTmpState( MV_SETONLYTEXT ); - aTmpState.bRealHeight = sal_True; + aTmpState.bRealHeight = true; if( aLine.GetCharRect( &rOrig, nOffset, &aTmpState, nMaxY ) ) { if( aTmpState.aRealHeight.X() >= 0 ) @@ -781,11 +781,11 @@ bool SwTxtFrm::RightMargin(SwPaM *pPam, bool bAPI) const class SwSetToRightMargin { - sal_Bool bRight; + bool bRight; public: - inline SwSetToRightMargin() : bRight( sal_False ) { } + inline SwSetToRightMargin() : bRight( false ) { } inline ~SwSetToRightMargin() { SwTxtCursor::SetRightMargin( bRight ); } - inline void SetRight( const sal_Bool bNew ) { bRight = bNew; } + inline void SetRight( const bool bNew ) { bRight = bNew; } }; bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, @@ -1324,7 +1324,7 @@ bool SwTxtFrm::UnitUp(SwPaM *pPam, const SwTwips nOffset, */ const SwTxtFrm *pFrm = GetAdjFrmAtPos( (SwTxtFrm*)this, *(pPam->GetPoint()), SwTxtCursor::IsRightMargin() ); - const sal_Bool bRet = pFrm->_UnitUp( pPam, nOffset, bSetInReadOnly ); + const bool bRet = pFrm->_UnitUp( pPam, nOffset, bSetInReadOnly ); // No SwTxtCursor::SetRightMargin( false ); // Instead we have a SwSetToRightMargin in _UnitUp @@ -1405,7 +1405,6 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const return; } } - sal_Bool bFill = sal_True; SwFont *pFnt; SwTxtFmtColl* pColl = GetTxtNode()->GetTxtColl(); MSHORT nFirst = GetTxtNode()->GetSwAttrSet().GetULSpace().GetLower(); @@ -1434,13 +1433,15 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const if( !pSh->GetViewOptions()->getBrowseMode() || pSh->GetViewOptions()->IsPrtFormat() ) pOut = GetTxtNode()->getIDocumentDeviceAccess()->getReferenceDevice( true ); - pFnt->SetFntChg( sal_True ); + pFnt->SetFntChg( true ); pFnt->ChgPhysFnt( pSh, *pOut ); SwTwips nLineHeight = pFnt->GetHeight( pSh, *pOut ); + bool bFill = false; if( nLineHeight ) { + bFill = true; const SvxULSpaceItem &rUL = pSet->GetULSpace(); SwTwips nDist = std::max( rUL.GetLower(), rUL.GetUpper() ); if( rFill.Fill().nColumnCnt ) @@ -1469,7 +1470,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const else nDiff = -1; if( rFill.bInner ) - bFill = sal_False; + bFill = false; else { const SvxTabStopItem &rRuler = pSet->GetTabStops(); @@ -1510,7 +1511,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const } } else - bFill = sal_False; + bFill = false; } else { @@ -1530,13 +1531,13 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const rRect.Left( nRight ); } else - bFill = sal_False; + bFill = false; } else if( FILL_INDENT == rFill.Mode() ) { SwTwips nIndent = rFill.X(); if( !rFill.bEmpty || nIndent > nRight ) - bFill = sal_False; + bFill = false; else { nIndent -= rFill.Left(); @@ -1548,7 +1549,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const rRect.Left( nIndent + rFill.Left() ); } else - bFill = sal_False; + bFill = false; } } else if( rFill.X() > nLeft ) @@ -1688,7 +1689,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const if( !rFill.bEmpty ) rFill.nLineWidth += FILL_MIN_DIST; if( rRect.Left() < rFill.nLineWidth ) - bFill = sal_False; + bFill = false; } } } @@ -1709,13 +1710,11 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const nRectBottom = SwitchHorizontalToVertical( nRectBottom ); if( (*fnRect->fnYDiff)( nLimit, nRectBottom ) < 0 ) - bFill = sal_False; + bFill = false; else rRect.Width( 1 ); } } - else - bFill = sal_False; ((SwCrsrMoveState*)rFill.pCMS)->bFillRet = bFill; delete pFnt; } diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 5f215ed43f17..5129efa7b112 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -73,7 +73,7 @@ void ValidateTxt( SwFrm *pFrm ) // Friend of frame pFrm->Frm().Width() == pFrm->GetUpper()->Prt().Width() ) || ( pFrm->IsVertical() && pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) ) - pFrm->mbValidSize = sal_True; + pFrm->mbValidSize = true; } void SwTxtFrm::ValidateFrm() @@ -127,7 +127,7 @@ void _ValidateBodyFrm( SwFrm *pFrm ) pFrm->Calc(); else { - sal_Bool bOld = ((SwSectionFrm*)pFrm)->IsCntntLocked(); + const bool bOld = ((SwSectionFrm*)pFrm)->IsCntntLocked(); ((SwSectionFrm*)pFrm)->SetCntntLock( true ); pFrm->Calc(); if( !bOld ) @@ -375,7 +375,7 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) { if( IsInFtn() && !IsInSct() ) { - SwTwips nReal = Grow( nChgHght, sal_True ); + SwTwips nReal = Grow( nChgHght, true ); if( nReal < nChgHght ) { SwTwips nBot = (*fnRect->fnYInc)( (Frm().*fnRect->fnGetBottom)(), @@ -485,11 +485,11 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, bool bHasToFit ) if( bHasToFit || !IsMoveable() || ( IsInSct() && !FindSctFrm()->MoveAllowed(this) ) ) { - SetUndersized( sal_True ); + SetUndersized( true ); Shrink( std::min( ( nFrmHeight - nRstHeight), nPrtHeight ) ); } else - SetUndersized( sal_False ); + SetUndersized( false ); } } else if( nChgHeight ) @@ -642,7 +642,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm() else { if( !pFtnBoss ) - pFtnBoss = pFoll->FindFtnBossFrm( sal_True ); + pFtnBoss = pFoll->FindFtnBossFrm( true ); pFtnBoss->ChangeFtnRef( pFoll, (SwTxtFtn*)pHt, this ); } SetFtn( true ); @@ -735,7 +735,7 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const sal_Int32 nTxtPos ) else { if( !pFtnBoss ) - pFtnBoss = FindFtnBossFrm( sal_True ); + pFtnBoss = FindFtnBossFrm( true ); pFtnBoss->ChangeFtnRef( this, (SwTxtFtn*)pHt, pNew ); } pNew->SetFtn( true ); @@ -942,14 +942,14 @@ bool SwTxtFrm::CalcPreps() Shrink( nMust - nIs ); if( Prt().Width() < 0 ) Prt().Width( 0 ); - SetUndersized( sal_True ); + SetUndersized( true ); } else if ( ! bVert && nIs > nMust ) { Shrink( nIs - nMust ); if( Prt().Height() < 0 ) Prt().Height( 0 ); - SetUndersized( sal_True ); + SetUndersized( true ); } } } @@ -1609,9 +1609,9 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf ) // If necessary the pPara KSHORT nOld = ((const SwTxtMargin&)rLine).GetDropHeight(); - sal_Bool bShrink = sal_False, - bGrow = sal_False, - bGoOn = rLine.IsOnceMore(); + bool bShrink = false; + bool bGrow = false; + bool bGoOn = rLine.IsOnceMore(); sal_uInt8 nGo = 0; while( bGoOn ) { @@ -1629,16 +1629,16 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf ) { const KSHORT nNew = ((const SwTxtMargin&)rLine).GetDropHeight(); if( nOld == nNew ) - bGoOn = sal_False; + bGoOn = false; else { if( nOld > nNew ) - bShrink = sal_True; + bShrink = true; else - bGrow = sal_True; + bGrow = true; if( bShrink == bGrow || 5 < nGo ) - bGoOn = sal_False; + bGoOn = false; nOld = nNew; } diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx index fd165094fe05..1a3031a9cdff 100644 --- a/sw/source/core/text/frminf.cxx +++ b/sw/source/core/text/frminf.cxx @@ -72,7 +72,7 @@ sal_Bool SwTxtFrmInfo::IsOneLine() const return sal_False; else { - // For follows sal_False of course + // For follows false of course if( pFrm->GetFollow() ) return sal_False; pLay = pLay->GetNext(); diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index bf4dc37250df..812395161d00 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -124,7 +124,7 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, SwViewShell *pVwSh, nX, line number's x position pFnt, line number's font nLineNr, the first line number - bLineNum is set back to sal_False if the numbering is completely + bLineNum is set back to false if the numbering is completely outside of the paint rect */ nDivider = !rLineInf.GetDivider().isEmpty() ? rLineInf.GetDividerCountBy() : 0; @@ -204,8 +204,8 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed ) aDrawInf.SetRight( LONG_MAX ); aDrawInf.SetFrm( pTxtFrm ); aDrawInf.SetFont( pFnt ); - aDrawInf.SetSnapToGrid( sal_False ); - aDrawInf.SetIgnoreFrmRTL( sal_True ); + aDrawInf.SetSnapToGrid( false ); + aDrawInf.SetIgnoreFrmRTL( true ); bool bTooBig = pFnt->GetSize( pFnt->GetActual() ).Height() > nMax && pFnt->GetHeight( pSh, *pSh->GetOut() ) > nMax; diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx index 276ad5bed775..54fd60afbecf 100644 --- a/sw/source/core/text/itradj.cxx +++ b/sw/source/core/text/itradj.cxx @@ -301,7 +301,7 @@ void SwTxtAdjuster::CalcNewBlock( SwLineLayout *pCurrent, CalcRightMargin( pCurrent, nReal ); // #i49277# - const sal_Bool bDoNotJustifyLinesWithManualBreak = + const bool bDoNotJustifyLinesWithManualBreak = GetTxtFrm()->GetNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK); SwLinePortion *pPos = pCurrent->GetPortion(); @@ -427,7 +427,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent ) long nKanaDiffSum = 0; SwTwips nRepaintOfst = 0; SwTwips nX = 0; - sal_Bool bNoCompression = sal_False; + bool bNoCompression = false; // Do not forget: CalcRightMargin() sets pCurrent->Width() to the line width! CalcRightMargin( pCurrent, 0 ); @@ -479,7 +479,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent ) ((SwGluePortion*)pPos)->GetPrtGlue() : 0; - bNoCompression = sal_False; + bNoCompression = false; } if( nKanaDiffSum ) @@ -630,14 +630,14 @@ void SwTxtAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent ) sal_Int32 nLen = 0; // If we only have one line, the text portion is consecutive and we center, then ... - sal_Bool bComplete = 0 == nStart; - const sal_Bool bTabCompat = GetTxtFrm()->GetNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT); - sal_Bool bMultiTab = sal_False; + bool bComplete = 0 == nStart; + const bool bTabCompat = GetTxtFrm()->GetNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT); + bool bMultiTab = false; while( pPos ) { if ( pPos->IsMultiPortion() && ((SwMultiPortion*)pPos)->HasTabulator() ) - bMultiTab = sal_True; + bMultiTab = true; else if( pPos->InFixMargGrp() && ( bTabCompat ? ! pPos->InTabGrp() : ! bMultiTab ) ) { @@ -680,7 +680,7 @@ void SwTxtAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent ) } pGlue = (SwFlyPortion*)pPos; - bComplete = sal_False; + bComplete = false; } nLen = nLen + pPos->GetLen(); pPos = pPos->GetPortion(); diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index e4a469d49588..a418f98ca99c 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -351,9 +351,9 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf ) mnTabLeft = pNode->GetLeftMarginForTabCalculation(); #if OSL_DEBUG_LEVEL > 1 - static sal_Bool bOne = sal_False; - static sal_Bool bLast = sal_False; - static sal_Bool bCenter = sal_False; + static bool bOne = false; + static bool bLast = false; + static bool bCenter = false; bOneBlock |= bOne; bLastBlock |= bLast; bLastCenter |= bCenter; @@ -513,12 +513,12 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, // If we are looking for a position inside a field which covers // more than one line we may not skip any "empty portions" at the // beginning of a line - const sal_Bool bInsideFirstField = pCMS && pCMS->pSpecialPos && + const bool bInsideFirstField = pCMS && pCMS->pSpecialPos && ( pCMS->pSpecialPos->nLineOfst || SP_EXTEND_RANGE_BEFORE == pCMS->pSpecialPos->nExtendRange ); - sal_Bool bWidth = pCMS && pCMS->bRealWidth; + bool bWidth = pCMS && pCMS->bRealWidth; if( !pCurr->GetLen() && !pCurr->Width() ) { if ( pCMS && pCMS->bRealHeight ) @@ -541,7 +541,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, size_t nKanaIdx = 0; long nSpaceAdd = pCurr->IsSpaceAdd() ? pCurr->GetLLSpaceAdd( 0 ) : 0; - sal_Bool bNoTxt = sal_True; + bool bNoTxt = true; // First all portions without Len at beginning of line are skipped. // Exceptions are the mean special portions from WhichFirstPortion: @@ -559,7 +559,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, // if( pPor->InTxtGrp() || pPor->IsBreakPortion() ) if( pPor->InTxtGrp() || pPor->IsBreakPortion() || pPor->InTabGrp() ) { - bNoTxt = sal_False; + bNoTxt = false; nTmpFirst = nX; } if( pPor->IsMultiPortion() && ((SwMultiPortion*)pPor)->HasTabulator() ) @@ -578,7 +578,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, if( pPor->InFixMargGrp() ) { if( pPor->IsMarginPortion() ) - bNoTxt = sal_False; + bNoTxt = false; else { // fix margin portion => next SpaceAdd, KanaComp value @@ -697,12 +697,11 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, if( pCMS && pCMS->b2Lines ) { - sal_Bool bRecursion = sal_True; - if ( ! pCMS->p2Lines ) + const bool bRecursion = pCMS->p2Lines; + if ( !bRecursion ) { pCMS->p2Lines = new Sw2LinesPos; pCMS->p2Lines->aLine = SwRect(aCharPos, aCharSize); - bRecursion = sal_False; } if( ((SwMultiPortion*)pPor)->HasRotation() ) @@ -745,7 +744,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, SetPropFont( 50 ); GETGRID( GetTxtFrm()->FindPageFrm() ) - const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid(); + const bool bHasGrid = pGrid && GetInfo().SnapToGrid(); const sal_uInt16 nRubyHeight = bHasGrid ? pGrid->GetRubyHeight() : 0; @@ -767,7 +766,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, Next(); } - sal_Bool bSpaceChg = ((SwMultiPortion*)pPor)-> + const bool bSpaceChg = ((SwMultiPortion*)pPor)-> ChgSpaceAdd( pCurr, nSpaceAdd ); Point aOldPos = pOrig->Pos(); @@ -777,7 +776,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, // for the adjustment inside the recursion const sal_uInt16 nOldRubyHeight = pCurr->Height(); const sal_uInt16 nOldRubyRealHeight = pCurr->GetRealHeight(); - const sal_Bool bChgHeight = + const bool bChgHeight = ((SwMultiPortion*)pPor)->IsRuby() && bHasGrid; if ( bChgHeight ) @@ -960,7 +959,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, } } } - bWidth = sal_False; + bWidth = false; break; } } @@ -969,7 +968,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, if( pPor ) { OSL_ENSURE( !pPor->InNumberGrp() || bInsideFirstField, "Number surprise" ); - sal_Bool bEmptyFld = sal_False; + bool bEmptyFld = false; if( pPor->InFldGrp() && pPor->GetLen() ) { SwFldPortion *pTmp = (SwFldPortion*)pPor; @@ -989,7 +988,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, nPorHeight = pTmp->Height(); nPorAscent = pTmp->GetAscent(); nX += nAddX; - bEmptyFld = sal_True; + bEmptyFld = true; } } // 8513: Fields in justified text, skipped @@ -1205,7 +1204,7 @@ bool SwTxtCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst, // Indicates that a position inside a special portion (field, number portion) // is requested. - const sal_Bool bSpecialPos = pCMS && pCMS->pSpecialPos; + const bool bSpecialPos = pCMS && pCMS->pSpecialPos; sal_Int32 nFindOfst = nOfst; if ( bSpecialPos ) @@ -1307,14 +1306,14 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, if( nRightMargin == nLeftMargin ) nRightMargin += 30; - const sal_Bool bLeftOver = x < nLeftMargin; + const bool bLeftOver = x < nLeftMargin; if( bLeftOver ) x = nLeftMargin; - const sal_Bool bRightOver = x > nRightMargin; + const bool bRightOver = x > nRightMargin; if( bRightOver ) x = nRightMargin; - sal_Bool bRightAllowed = pCMS && ( pCMS->eState == MV_NONE ); + const bool bRightAllowed = pCMS && ( pCMS->eState == MV_NONE ); // Until here everything in document coordinates. x -= nLeftMargin; @@ -1325,8 +1324,8 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, // in which nX is situated. SwLinePortion *pPor = pCurr->GetFirstPortion(); sal_Int32 nCurrStart = nStart; - sal_Bool bHolePortion = sal_False; - sal_Bool bLastHyph = sal_False; + bool bHolePortion = false; + bool bLastHyph = false; std::deque<sal_uInt16> *pKanaComp = pCurr->GetpKanaComp(); sal_Int32 nOldIdx = GetInfo().GetIdx(); @@ -1423,7 +1422,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, bLastHyph = pPor->InHyphGrp(); } - const sal_Bool bLastPortion = (0 == pPor->GetPortion()); + const bool bLastPortion = (0 == pPor->GetPortion()); if( nX==nWidth ) { @@ -1442,7 +1441,7 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, sal_Int32 nLength = pPor->GetLen(); - sal_Bool bFieldInfo = pCMS && pCMS->bFieldInfo; + const bool bFieldInfo = pCMS && pCMS->bFieldInfo; if( bFieldInfo && ( nWidth30 < nX || bRightOver || bLeftOver || ( pPor->InNumberGrp() && !pPor->IsFtnNumPortion() ) || diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx index 3d20a393ed34..f51d1ff66840 100644 --- a/sw/source/core/text/noteurl.cxx +++ b/sw/source/core/text/noteurl.cxx @@ -61,7 +61,7 @@ void SwNoteURL::FillImageMap( ImageMap *pMap, const Point &rPos, Rectangle aRect( OutputDevice::LogicToLogic( aSwRect.SVRect(), rMap, aMap ) ); IMapRectangleObject aObj( aRect, rNote.GetURL(), OUString(), OUString(), - rNote.GetTarget(), OUString(), sal_True, sal_False ); + rNote.GetTarget(), OUString(), true, false ); pMap->InsertIMapObject( aObj ); } } diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx index a9d9dc7c7323..12c5312f8587 100644 --- a/sw/source/core/text/porlin.cxx +++ b/sw/source/core/text/porlin.cxx @@ -300,8 +300,8 @@ bool SwLinePortion::Format( SwTxtFormatInfo &rInf ) Height( pLast->Height() ); SetAscent( pLast->GetAscent() ); const KSHORT nNewWidth = static_cast<sal_uInt16>(rInf.X() + PrtWidth()); - // Nur Portions mit echter Breite koennen ein sal_True zurueckliefern - // Notizen beispielsweise setzen niemals bFull==sal_True + // Nur Portions mit echter Breite koennen ein true zurueckliefern + // Notizen beispielsweise setzen niemals bFull==true if( rInf.Width() <= nNewWidth && PrtWidth() && ! IsKernPortion() ) { Truncate(); diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index 263d0fb7e08d..4595dd505490 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -279,7 +279,7 @@ SwTwips SwTxtFrm::EmptyHeight() const Prt().SSize().Height() + 1; else { - pFnt->SetFntChg( sal_True ); + pFnt->SetFntChg( true ); pFnt->ChgPhysFnt( pSh, *pOut ); nRet = pFnt->GetHeight( pSh, *pOut ); } diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index 2c25bd470335..071197498e6e 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -77,7 +77,7 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, SwExpandPortion *pRet = 0; SwFrm *pFrame = (SwFrm*)pFrm; SwField *pFld = (SwField*)pHint->GetFmtFld().GetField(); - const sal_Bool bName = rInf.GetOpt().IsFldName(); + const bool bName = rInf.GetOpt().IsFldName(); SwCharFmt* pChFmt = 0; bool bNewFlyPor = false; @@ -96,7 +96,7 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, SwViewShell *pSh = rInf.GetVsh(); SwDoc *const pDoc( (pSh) ? pSh->GetDoc() : 0 ); bool const bInClipboard( (pDoc) ? pDoc->IsClipBoard() : true ); - sal_Bool bPlaceHolder = false; + bool bPlaceHolder = false; switch( pFld->GetTyp()->Which() ) { @@ -159,7 +159,7 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf, SwPageNumberFieldType *pPageNr = (SwPageNumberFieldType *)pFld->GetTyp(); const SwRootFrm* pTmpRootFrm = pSh->GetLayout(); - const sal_Bool bVirt = pTmpRootFrm->IsVirtPageNum(); + const bool bVirt = pTmpRootFrm->IsVirtPageNum(); MSHORT nVirtNum = pFrame->GetVirtPageNum(); MSHORT nNumPages = pTmpRootFrm->GetPageNum(); @@ -442,8 +442,8 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const nLevel = MAXLEVEL - 1; const SwNumFmt &rNumFmt = pNumRule->Get( nLevel ); - const sal_Bool bLeft = SVX_ADJUST_LEFT == rNumFmt.GetNumAdjust(); - const sal_Bool bCenter = SVX_ADJUST_CENTER == rNumFmt.GetNumAdjust(); + const bool bLeft = SVX_ADJUST_LEFT == rNumFmt.GetNumAdjust(); + const bool bCenter = SVX_ADJUST_CENTER == rNumFmt.GetNumAdjust(); const bool bLabelAlignmentPosAndSpaceModeActive( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ); const KSHORT nMinDist = bLabelAlignmentPosAndSpaceModeActive diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index cab59b1aa486..b59056b51c58 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -339,7 +339,7 @@ void SwTxtFrm::Init() // set flags directly to save a ResetPreps call, // and thereby an unnecessary GetPara call // don't set bOrphan, bLocked or bWait to false! - // bOrphan = bFlag7 = bFlag8 = sal_False; + // bOrphan = bFlag7 = bFlag8 = false; } } @@ -874,7 +874,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) Prepare( PREP_CLEAR ); _InvalidatePrt(); lcl_SetWrong( *this, 0, COMPLETE_STRING, false ); - SetDerivedR2L( sal_False ); + SetDerivedR2L( false ); CheckDirChange(); // OD 09.12.2002 #105576# - Force complete paint due to existing // indents. @@ -1181,7 +1181,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) else if ( SFX_ITEM_SET == rNewSet.GetItemState( RES_FRAMEDIR, false ) ) { - SetDerivedR2L( sal_False ); + SetDerivedR2L( false ); CheckDirChange(); // OD 09.12.2002 #105576# - Force complete paint due to existing // indents. @@ -1270,7 +1270,7 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) bSetFldsDirty = true; break; case RES_FRAMEDIR : - SetDerivedR2L( sal_False ); + SetDerivedR2L( false ); CheckDirChange(); break; default: @@ -1849,7 +1849,7 @@ bool SwTxtFrm::TestFormat( const SwFrm* pPrv, SwTwips &rMaxHeight, bool &bSplit } /* SwTxtFrm::WouldFit() - * sal_True: wenn ich aufspalten kann. + * true: wenn ich aufspalten kann. * Es soll und braucht nicht neu formatiert werden. * Wir gehen davon aus, dass bereits formatiert wurde und dass * die Formatierungsdaten noch aktuell sind. @@ -2005,7 +2005,7 @@ SwTxtFrm* SwTxtFrm::GetFormatted( bool bForceQuickFormat ) if( !HasPara() && !(IsValid() && IsEmpty()) ) { // Calc() must be called, because frame position can be wrong - const sal_Bool bFormat = GetValidSizeFlag(); + const bool bFormat = GetValidSizeFlag(); Calc(); // Es kann durchaus sein, dass Calc() das Format() // nicht anstiess (weil wir einst vom Idle-Zerstoerer @@ -2204,7 +2204,7 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont ) { SwFntObj *pOldFont = pLastFont; pLastFont = NULL; - aFont.SetFntChg( sal_True ); + aFont.SetFntChg( true ); aFont.ChgPhysFnt( pVsh, *pOut ); mnHeightOfLastLine = aFont.GetHeight( pVsh, *pOut ); pLastFont->Unlock(); @@ -2214,7 +2214,7 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont ) else { Font aOldFont = pOut->GetFont(); - aFont.SetFntChg( sal_True ); + aFont.SetFntChg( true ); aFont.ChgPhysFnt( pVsh, *pOut ); mnHeightOfLastLine = aFont.GetHeight( pVsh, *pOut ); pLastFont->Unlock(); |