Kaydet (Commit) 7ba2c823 authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool to bool

Change-Id: Idf6003acc7ee07997150f77c886947dc1476218f
üst 0083b0d5
...@@ -84,7 +84,7 @@ class SwExtraPainter ...@@ -84,7 +84,7 @@ class SwExtraPainter
MSHORT nDivider; MSHORT nDivider;
bool bGoLeft; bool bGoLeft;
bool bLineNum; bool bLineNum;
inline sal_Bool IsClipChg() { return aClip.IsChg(); } inline bool IsClipChg() { return aClip.IsChg(); }
public: public:
SwExtraPainter( const SwTxtFrm *pFrm, ViewShell *pVwSh, SwExtraPainter( const SwTxtFrm *pFrm, ViewShell *pVwSh,
const SwLineNumberInfo &rLnInf, const SwRect &rRct, const SwLineNumberInfo &rLnInf, const SwRect &rRct,
......
...@@ -201,7 +201,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, ...@@ -201,7 +201,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
// bClip entscheidet darueber, ob geclippt werden muss. // bClip entscheidet darueber, ob geclippt werden muss.
// Das Ganze muss vor der Retusche stehen // Das Ganze muss vor der Retusche stehen
sal_Bool bClip = ( bDrawInWindow || bUnderSz ) && !rClip.IsChg(); bool bClip = ( bDrawInWindow || bUnderSz ) && !rClip.IsChg();
if( bClip && pPor ) if( bClip && pPor )
{ {
// Wenn TopLeft oder BottomLeft der Line ausserhalb liegen, // Wenn TopLeft oder BottomLeft der Line ausserhalb liegen,
...@@ -212,13 +212,13 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, ...@@ -212,13 +212,13 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
GetInfo().GetPos().Y() < rPaint.Top() || GetInfo().GetPos().Y() < rPaint.Top() ||
GetInfo().GetPos().Y() + nTmpHeight > rPaint.Top() + rPaint.Height() ) GetInfo().GetPos().Y() + nTmpHeight > rPaint.Top() + rPaint.Height() )
{ {
bClip = sal_False; bClip = false;
rClip.ChgClip( rPaint, pFrm, pCurr->HasUnderscore() ); rClip.ChgClip( rPaint, pFrm, pCurr->HasUnderscore() );
} }
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
static sal_Bool bClipAlways = sal_False; static bool bClipAlways = false;
if( bClip && bClipAlways ) if( bClip && bClipAlways )
{ bClip = sal_False; { bClip = false;
rClip.ChgClip( rPaint ); rClip.ChgClip( rPaint );
} }
#endif #endif
...@@ -243,7 +243,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, ...@@ -243,7 +243,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if( pCurr->IsClipping() ) if( pCurr->IsClipping() )
{ {
rClip.ChgClip( aLineRect, pFrm ); rClip.ChgClip( aLineRect, pFrm );
bClip = sal_False; bClip = false;
} }
if( !pPor && !bEndPor ) if( !pPor && !bEndPor )
...@@ -346,7 +346,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, ...@@ -346,7 +346,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
if( bClip && if( bClip &&
GetInfo().X() + pPor->Width() + ( pPor->Height() / 2 ) > nMaxRight ) GetInfo().X() + pPor->Width() + ( pPor->Height() / 2 ) > nMaxRight )
{ {
bClip = sal_False; bClip = false;
rClip.ChgClip( rPaint, pFrm, pCurr->HasUnderscore() ); rClip.ChgClip( rPaint, pFrm, pCurr->HasUnderscore() );
} }
......
...@@ -30,8 +30,8 @@ class SwRect; // SwSaveClip ...@@ -30,8 +30,8 @@ class SwRect; // SwSaveClip
class SwSaveClip class SwSaveClip
{ {
Region aClip; Region aClip;
const sal_Bool bOn; const bool bOn;
sal_Bool bChg; bool bChg;
protected: protected:
OutputDevice* pOut; OutputDevice* pOut;
void _ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm, void _ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm,
...@@ -43,14 +43,14 @@ public: ...@@ -43,14 +43,14 @@ public:
sal_Bool bEnlargeRect = sal_False) sal_Bool bEnlargeRect = sal_False)
{ if( pOut ) _ChgClip( rRect, pFrm, bEnlargeRect ); } { if( pOut ) _ChgClip( rRect, pFrm, bEnlargeRect ); }
void Reset(); void Reset();
inline sal_Bool IsOn() const { return bOn; } inline bool IsOn() const { return bOn; }
inline sal_Bool IsChg() const { return bChg; } inline bool IsChg() const { return bChg; }
inline OutputDevice *GetOut() { return pOut; } inline OutputDevice *GetOut() { return pOut; }
}; };
inline SwSaveClip::SwSaveClip( OutputDevice* pOutDev ) : inline SwSaveClip::SwSaveClip( OutputDevice* pOutDev ) :
bOn( pOutDev && pOutDev->IsClipRegion() ), bOn( pOutDev && pOutDev->IsClipRegion() ),
bChg( sal_False ), bChg( false ),
pOut(pOutDev) pOut(pOutDev)
{} {}
......
...@@ -403,7 +403,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf ) ...@@ -403,7 +403,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
// Break tab stop to next line if: // Break tab stop to next line if:
// 1. Minmal width does not fit to line anymore. // 1. Minmal width does not fit to line anymore.
// 2. An underflow event was called for the tab portion. // 2. An underflow event was called for the tab portion.
sal_Bool bFull = ( bTabCompat && rInf.IsUnderFlow() ) || bool bFull = ( bTabCompat && rInf.IsUnderFlow() ) ||
( rInf.Width() <= rInf.X() + PrtWidth() && rInf.X() <= rInf.Width() ) ; ( rInf.Width() <= rInf.X() + PrtWidth() && rInf.X() <= rInf.Width() ) ;
// #95477# Rotated tab stops get the width of one blank // #95477# Rotated tab stops get the width of one blank
...@@ -437,7 +437,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf ) ...@@ -437,7 +437,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
( ( bTabOverflow && ( rInf.IsTabOverflow() || !IsAutoTabStop() ) ) || bAtParaEnd ) && ( ( bTabOverflow && ( rInf.IsTabOverflow() || !IsAutoTabStop() ) ) || bAtParaEnd ) &&
GetTabPos() >= rInf.GetTxtFrm()->Frm().Width() ) GetTabPos() >= rInf.GetTxtFrm()->Frm().Width() )
{ {
bFull = sal_False; bFull = false;
if ( bTabOverflow && !IsAutoTabStop() ) if ( bTabOverflow && !IsAutoTabStop() )
rInf.SetTabOverflow( sal_True ); rInf.SetTabOverflow( sal_True );
} }
......
...@@ -193,7 +193,7 @@ sal_Bool SwTxtFrmBreak::IsBreakNow( SwTxtMargin &rLine ) ...@@ -193,7 +193,7 @@ sal_Bool SwTxtFrmBreak::IsBreakNow( SwTxtMargin &rLine )
*/ */
// 6010: include DropLines // 6010: include DropLines
sal_Bool bFirstLine = 1 == rLine.GetLineNr() && !rLine.GetPrev(); bool bFirstLine = 1 == rLine.GetLineNr() && !rLine.GetPrev();
bBreak = sal_True; bBreak = sal_True;
if( ( bFirstLine && pFrm->GetIndPrev() ) if( ( bFirstLine && pFrm->GetIndPrev() )
|| ( rLine.GetLineNr() <= rLine.GetDropLines() ) ) || ( rLine.GetLineNr() <= rLine.GetDropLines() ) )
......
...@@ -265,7 +265,7 @@ void SwWrongList::Move( xub_StrLen nPos, long nDiff ) ...@@ -265,7 +265,7 @@ void SwWrongList::Move( xub_StrLen nPos, long nDiff )
MSHORT nLst = i; MSHORT nLst = i;
xub_StrLen nWrPos; xub_StrLen nWrPos;
xub_StrLen nWrLen; xub_StrLen nWrLen;
sal_Bool bJump = sal_False; bool bJump = false;
while( nLst < Count() && Pos( nLst ) < nEnd ) while( nLst < Count() && Pos( nLst ) < nEnd )
++nLst; ++nLst;
if( nLst > i && ( nWrPos = Pos( nLst - 1 ) ) <= nPos ) if( nLst > i && ( nWrPos = Pos( nLst - 1 ) ) <= nPos )
...@@ -278,7 +278,7 @@ void SwWrongList::Move( xub_StrLen nPos, long nDiff ) ...@@ -278,7 +278,7 @@ void SwWrongList::Move( xub_StrLen nPos, long nDiff )
if( nWrLen ) if( nWrLen )
{ {
maList[--nLst].mnLen = nWrLen; maList[--nLst].mnLen = nWrLen;
bJump = sal_True; bJump = true;
} }
} }
Remove( i, nLst - i ); Remove( i, nLst - i );
......
...@@ -450,7 +450,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237 ...@@ -450,7 +450,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237
SwFormTokens aCurrentPattern = GetPattern(nLevel); SwFormTokens aCurrentPattern = GetPattern(nLevel);
SwFormTokens::iterator aIt = aCurrentPattern.begin(); SwFormTokens::iterator aIt = aCurrentPattern.begin();
sal_Bool bChanged = sal_False; bool bChanged = false;
for(sal_uInt16 nTab = 0; nTab < nTabCount; ++nTab) for(sal_uInt16 nTab = 0; nTab < nTabCount; ++nTab)
{ {
...@@ -463,7 +463,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237 ...@@ -463,7 +463,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237
{ {
if ( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() ) if ( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
{ {
bChanged = sal_True; bChanged = true;
SwFormToken aToken(TOKEN_TAB_STOP); SwFormToken aToken(TOKEN_TAB_STOP);
aToken.bWithTab = sal_False; aToken.bWithTab = sal_False;
aToken.nTabStopPosition = rTab.GetTabPos(); aToken.nTabStopPosition = rTab.GetTabPos();
...@@ -479,7 +479,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237 ...@@ -479,7 +479,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237
(TOKEN_TAB_STOP)); (TOKEN_TAB_STOP));
if ( aIt != aCurrentPattern.end() ) if ( aIt != aCurrentPattern.end() )
{ {
bChanged = sal_True; bChanged = true;
aIt->nTabStopPosition = rTab.GetTabPos(); aIt->nTabStopPosition = rTab.GetTabPos();
aIt->eTabAlign = nTab == nTabCount - 1 && aIt->eTabAlign = nTab == nTabCount - 1 &&
SVX_TAB_ADJUST_RIGHT == rTab.GetAdjustment() ? SVX_TAB_ADJUST_RIGHT == rTab.GetAdjustment() ?
...@@ -539,7 +539,7 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource ) ...@@ -539,7 +539,7 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
{ {
// type not in pDoc, so create it now // type not in pDoc, so create it now
const SwTOXTypes& rTypes = pDoc->GetTOXTypes(); const SwTOXTypes& rTypes = pDoc->GetTOXTypes();
sal_Bool bFound = sal_False; bool bFound = false;
for( sal_uInt16 n = rTypes.size(); n; ) for( sal_uInt16 n = rTypes.size(); n; )
{ {
const SwTOXType* pCmp = rTypes[ --n ]; const SwTOXType* pCmp = rTypes[ --n ];
...@@ -547,7 +547,7 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource ) ...@@ -547,7 +547,7 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
pCmp->GetTypeName() == pType->GetTypeName() ) pCmp->GetTypeName() == pType->GetTypeName() )
{ {
pType = (SwTOXType*)pCmp; pType = (SwTOXType*)pCmp;
bFound = sal_True; bFound = true;
break; break;
} }
} }
...@@ -629,7 +629,7 @@ String SwFormToken::GetString() const ...@@ -629,7 +629,7 @@ String SwFormToken::GetString() const
{ {
String sRet; String sRet;
sal_Bool bAppend = sal_True; bool bAppend = true;
switch( eTokenType ) switch( eTokenType )
{ {
case TOKEN_ENTRY_NO: case TOKEN_ENTRY_NO:
...@@ -707,7 +707,7 @@ String SwFormToken::GetString() const ...@@ -707,7 +707,7 @@ String SwFormToken::GetString() const
sRet += TOX_STYLE_DELIMITER; sRet += TOX_STYLE_DELIMITER;
} }
else else
bAppend = sal_False; bAppend = false;
} }
else if(TOKEN_ENTRY_NO == eTokenType) else if(TOKEN_ENTRY_NO == eTokenType)
{ {
......
...@@ -185,7 +185,7 @@ XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) co ...@@ -185,7 +185,7 @@ XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) co
{ {
// dann ist die Nummer von Interesse, also ueber die Info diese // dann ist die Nummer von Interesse, also ueber die Info diese
// besorgen. // besorgen.
sal_Bool bMakeNum = sal_True; bool bMakeNum = true;
const SwSectionNode* pSectNd = pTxtAttr const SwSectionNode* pSectNd = pTxtAttr
? SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *pTxtAttr ) ? SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *pTxtAttr )
: 0; : 0;
...@@ -200,7 +200,7 @@ XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) co ...@@ -200,7 +200,7 @@ XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) co
if( FTNEND_ATTXTEND_OWNNUMANDFMT == rFtnEnd.GetValue() ) if( FTNEND_ATTXTEND_OWNNUMANDFMT == rFtnEnd.GetValue() )
{ {
bMakeNum = sal_False; bMakeNum = false;
sRet = rFtnEnd.GetSwNumType().GetNumStr( GetNumber() ); sRet = rFtnEnd.GetSwNumType().GetNumStr( GetNumber() );
if( bInclStrings ) if( bInclStrings )
{ {
...@@ -430,7 +430,7 @@ void SwTxtFtn::DelFrms( const SwFrm* pSib ) ...@@ -430,7 +430,7 @@ void SwTxtFtn::DelFrms( const SwFrm* pSib )
return; return;
const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : 0; const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : 0;
sal_Bool bFrmFnd = sal_False; bool bFrmFnd = false;
{ {
SwIterator<SwCntntFrm,SwTxtNode> aIter( *m_pTxtNode ); SwIterator<SwCntntFrm,SwTxtNode> aIter( *m_pTxtNode );
for( SwCntntFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() ) for( SwCntntFrm* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() )
...@@ -441,7 +441,7 @@ void SwTxtFtn::DelFrms( const SwFrm* pSib ) ...@@ -441,7 +441,7 @@ void SwTxtFtn::DelFrms( const SwFrm* pSib )
if( pPage ) if( pPage )
{ {
pPage->RemoveFtn( pFnd, this ); pPage->RemoveFtn( pFnd, this );
bFrmFnd = sal_True; bFrmFnd = true;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment