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

sal_Bool to bool

Change-Id: I51b096bab5f5c12a9c4c6633aa3150c50e9ffa47
üst 445e66f7
This diff is collapsed.
......@@ -62,7 +62,7 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
{
const SwPaM *_pStartCrsr = (SwPaM*)rPam.GetNext(),
*__pStartCrsr = _pStartCrsr;
sal_Bool bCheckEmpty = &rPam != _pStartCrsr;
bool bCheckEmpty = &rPam != _pStartCrsr;
do {
const SwPosition* pStt = _pStartCrsr->Start(),
* pEnd = pStt == _pStartCrsr->GetPoint()
......@@ -114,7 +114,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
const SwPaM *_pStartCrsr = (SwPaM*)rPam.GetNext(),
*__pStartCrsr = _pStartCrsr;
sal_Bool bCheckEmpty = &rPam != _pStartCrsr;
bool bCheckEmpty = &rPam != _pStartCrsr;
do {
const SwPosition* pStt = _pStartCrsr->Start(),
* pEnd = pStt == _pStartCrsr->GetPoint()
......@@ -254,7 +254,7 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
}
}
sal_Bool bAlphaNum = sal_False;
bool bAlphaNum = false;
long nWordEnd = nEnd;
CharClass& rCC = GetAppCharClass();
while( nStart < nEnd )
......@@ -274,14 +274,14 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
}
sal_Int32 nChType = rCC.getType( *pTxt, nStart );
sal_Bool bIgnoreChar = sal_False, bIsAlphaNum = sal_False, bChkNxtWrd = sal_False;
bool bIgnoreChar = false, bIsAlphaNum = false, bChkNxtWrd = false;
switch( nChType )
{
case UnicodeType::UPPERCASE_LETTER:
case UnicodeType::LOWERCASE_LETTER:
case UnicodeType::TITLECASE_LETTER:
case UnicodeType::DECIMAL_DIGIT_NUMBER:
bChkNxtWrd = bIsAlphaNum = sal_True;
bChkNxtWrd = bIsAlphaNum = true;
break;
case UnicodeType::SPACE_SEPARATOR:
......@@ -289,15 +289,15 @@ sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_
/*??*/ case UnicodeType::PRIVATE_USE:
case UnicodeType::START_PUNCTUATION:
case UnicodeType::END_PUNCTUATION:
bIgnoreChar = sal_True;
bIgnoreChar = true;
break;
case UnicodeType::OTHER_LETTER:
bChkNxtWrd = sal_True;
bChkNxtWrd = true;
default:
bIsAlphaNum = sal_False;
bIsAlphaNum = false;
break;
}
......
......@@ -755,7 +755,7 @@ void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar,
pNd = pDoc->GetNodes().GoNext( &aTar ); // next ContentNode
sal_uLong nCount = pNd->EndOfSectionIndex() - pNd->StartOfSectionIndex();
sal_Bool bDelFirst = sal_False;
bool bDelFirst = false;
if( nCount == 2 )
{
OSL_ENSURE( pNd->GetCntntNode(), "No ContentNode");
......@@ -919,7 +919,7 @@ sal_uInt16 FlatFndBox::GetRowCount(const _FndBox& rBox)
--------------------------------------------------------------------*/
void FlatFndBox::FillFlat(const _FndBox& rBox, sal_Bool bLastBox)
{
sal_Bool bModRow = sal_False;
bool bModRow = false;
const _FndLines& rLines = rBox.GetLines();
// Iterate over Lines
......@@ -958,7 +958,7 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, sal_Bool bLastBox)
*(ppItemSets + nOff ) = pSet;
}
bModRow = sal_True;
bModRow = true;
}
else
{
......
......@@ -1430,7 +1430,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
case nsSwTOXElement::TOX_OLE:
if( pNd->IsOLENode() )
{
sal_Bool bInclude = sal_True;
bool bInclude = true;
if(TOX_OBJECTS == SwTOXBase::GetType())
{
SwOLENode* pOLENode = pNd->GetOLENode();
......@@ -1447,7 +1447,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
else
{
OSL_FAIL("OLE Object no loaded?");
bInclude = sal_False;
bInclude = false;
}
}
......@@ -1649,7 +1649,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
const SwPageDesc* pPageDesc = ((SwFmtPageDesc&)pTOXNd->
SwCntntNode::GetAttr( RES_PAGEDESC )).GetPageDesc();
sal_Bool bCallFindRect = sal_True;
bool bCallFindRect = true;
long nRightMargin;
if( pPageDesc )
{
......@@ -1657,7 +1657,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
if( !pFrm || 0 == ( pFrm = pFrm->FindPageFrm() ) ||
pPageDesc != ((SwPageFrm*)pFrm)->GetPageDesc() )
// we have to go via the PageDesc here
bCallFindRect = sal_False;
bCallFindRect = false;
}
SwRect aNdRect;
......@@ -1966,12 +1966,12 @@ void SwTOXBaseSection::UpdatePageNum()
Description: Replace the PageNumber place holders
--------------------------------------------------------------------*/
// search for the page no in the array of main entry page numbers
static sal_Bool lcl_HasMainEntry( const std::vector<sal_uInt16>* pMainEntryNums, sal_uInt16 nToFind )
static bool lcl_HasMainEntry( const std::vector<sal_uInt16>* pMainEntryNums, sal_uInt16 nToFind )
{
for(sal_uInt16 i = 0; pMainEntryNums && i < pMainEntryNums->size(); ++i)
if(nToFind == (*pMainEntryNums)[i])
return sal_True;
return sal_False;
return true;
return false;
}
void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
......@@ -2035,7 +2035,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
// Add up all following
// break up if main entry starts or ends and
// insert a char style index
sal_Bool bMainEntryChanges = lcl_HasMainEntry(pMainEntryNums, nOld)
bool bMainEntryChanges = lcl_HasMainEntry(pMainEntryNums, nOld)
!= lcl_HasMainEntry(pMainEntryNums, rNums[i]);
if(nOld == rNums[i]-1 && !bMainEntryChanges &&
......
......@@ -121,7 +121,7 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
SwUpdFtnEndNtAtEnd aNumArr;
// unless we have per-document numbering, only look at endnotes here
const sal_Bool bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
const bool bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
sal_uInt16 nPos, nFtnNo = 1, nEndNo = 1;
sal_uLong nUpdNdIdx = rStt.GetIndex();
......@@ -225,8 +225,8 @@ void SwFtnIdxs::UpdateAllFtn()
}
// We use sal_Bool here, so that we also iterate through the Endnotes with a chapter setting.
const sal_Bool bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
// We use bool here, so that we also iterate through the Endnotes with a chapter setting.
const bool bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
sal_uInt16 nFtnNo = 0, nEndNo = 0;
for( sal_uInt16 nPos = 0; nPos < size(); ++nPos )
{
......
......@@ -35,7 +35,7 @@
using namespace ::editeng;
inline const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, sal_Bool bTop )
inline const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, bool bTop )
{
return bTop ? pBox->GetTop() : pBox->GetBottom();
}
......@@ -104,7 +104,7 @@ static void lcl_GCBorder_GetLastBox_B( const SwTableBox* pBox, SwTableBoxes* pPa
// Find the "end" of the passed BorderLine. Returns the "Layout"Pos!
static sal_uInt16 lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB,
const SvxBorderLine& rBrdLn, sal_uInt16& rStt, sal_Bool bTop )
const SvxBorderLine& rBrdLn, sal_uInt16& rStt, bool bTop )
{
sal_uInt16 nPos, nLastPos = 0;
for( sal_uInt16 nEnd = rCollTLB.Count(); rStt < nEnd; ++rStt )
......@@ -123,7 +123,7 @@ static sal_uInt16 lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB,
}
static inline const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBox,
sal_Bool bTop,
bool bTop,
const SfxPoolItem** ppItem )
{
return SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOX, sal_True, ppItem )
......@@ -132,7 +132,7 @@ static inline const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBo
}
static void lcl_GCBorder_DelBorder( const SwCollectTblLineBoxes& rCollTLB,
sal_uInt16& rStt, sal_Bool bTop,
sal_uInt16& rStt, bool bTop,
const SvxBorderLine& rLine,
const SfxPoolItem* pItem,
sal_uInt16 nEndPos,
......@@ -166,7 +166,7 @@ static void lcl_GCBorder_DelBorder( const SwCollectTblLineBoxes& rCollTLB,
pLn = lcl_GCBorder_GetBorder( *pBox, bTop, &pItem );
} while( sal_True );
} while( true );
}
static void lcl_GC_Box_Border( const SwTableBox* pBox, _SwGCLineBorder* pPara );
......@@ -234,23 +234,23 @@ void sw_GC_Line_Border( const SwTableLine* pLine, _SwGCLineBorder* pGCPara )
*pTopBox = &aTop.GetBox( nSttTop++, &nTopPos );
const SfxPoolItem *pBtmItem = 0, *pTopItem = 0;
const SvxBorderLine *pBtmLine(0), *pTopLine(0);
sal_Bool bGetTopItem = sal_True, bGetBtmItem = sal_True;
bool bGetTopItem = true, bGetBtmItem = true;
do {
if( bGetBtmItem )
pBtmLine = lcl_GCBorder_GetBorder( *pBtmBox, sal_False, &pBtmItem );
pBtmLine = lcl_GCBorder_GetBorder( *pBtmBox, false, &pBtmItem );
if( bGetTopItem )
pTopLine = lcl_GCBorder_GetBorder( *pTopBox, sal_True, &pTopItem );
pTopLine = lcl_GCBorder_GetBorder( *pTopBox, true, &pTopItem );
if( pTopLine && pBtmLine && *pTopLine == *pBtmLine )
{
// We can remove one, but which one?
sal_uInt16 nSavSttBtm = nSttBtm, nSavSttTop = nSttTop;
sal_uInt16 nBtmEndPos = ::lcl_FindEndPosOfBorder( aBottom,
*pTopLine, nSttBtm, sal_False );
*pTopLine, nSttBtm, false );
if( !nBtmEndPos ) nBtmEndPos = nBtmPos;
sal_uInt16 nTopEndPos = ::lcl_FindEndPosOfBorder( aTop,
*pTopLine, nSttTop, sal_True );
*pTopLine, nSttTop, true );
if( !nTopEndPos ) nTopEndPos = nTopPos;
......@@ -259,7 +259,7 @@ void sw_GC_Line_Border( const SwTableLine* pLine, _SwGCLineBorder* pGCPara )
// Delete the TopBorders until BottomEndPos
nSttTop = nSavSttTop;
if( nTopPos <= nBtmEndPos )
lcl_GCBorder_DelBorder( aTop, --nSttTop, sal_True,
lcl_GCBorder_DelBorder( aTop, --nSttTop, true,
*pBtmLine, pTopItem, nBtmEndPos,
pGCPara->pShareFmts );
else
......@@ -270,7 +270,7 @@ void sw_GC_Line_Border( const SwTableLine* pLine, _SwGCLineBorder* pGCPara )
// Else delete the BottomBorders until TopEndPos
nSttBtm = nSavSttBtm;
if( nBtmPos <= nTopEndPos )
lcl_GCBorder_DelBorder( aBottom, --nSttBtm, sal_False,
lcl_GCBorder_DelBorder( aBottom, --nSttBtm, false,
*pTopLine, pBtmItem, nTopEndPos,
pGCPara->pShareFmts );
else
......@@ -286,26 +286,26 @@ void sw_GC_Line_Border( const SwTableLine* pLine, _SwGCLineBorder* pGCPara )
pBtmBox = &aBottom.GetBox( nSttBtm++, &nBtmPos );
pTopBox = &aTop.GetBox( nSttTop++, &nTopPos );
bGetTopItem = bGetBtmItem = sal_True;
bGetTopItem = bGetBtmItem = true;
}
else if( nTopPos < nBtmPos )
{
if( nSttTop >= nEndTop )
break;
pTopBox = &aTop.GetBox( nSttTop++, &nTopPos );
bGetTopItem = sal_True;
bGetBtmItem = sal_False;
bGetTopItem = true;
bGetBtmItem = false;
}
else
{
if( nSttBtm >= nEndBtm )
break;
pBtmBox = &aBottom.GetBox( nSttBtm++, &nBtmPos );
bGetTopItem = sal_False;
bGetBtmItem = sal_True;
bGetTopItem = false;
bGetBtmItem = true;
}
} while( sal_True );
} while( true );
}
for( SwTableBoxes::const_iterator it = pLine->GetTabBoxes().begin();
......
......@@ -267,7 +267,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
OutputDevice *pOut = pSh->GetOut();
pOut->Push();
sal_Bool bClip = sal_True;
bool bClip = true;
PolyPolygon aPoly;
SwNoTxtNode& rNoTNd = *(SwNoTxtNode*)GetNode();
......@@ -284,7 +284,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
)
{
pOut->SetClipRegion( aPoly );
bClip = sal_False;
bClip = false;
}
SwRect aOrigPaint( rRect );
......@@ -636,7 +636,7 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
SwCntntFrm::Modify( pOld, pNew );
}
sal_Bool bComplete = sal_True;
bool bComplete = true;
switch( nWhich )
{
......@@ -646,7 +646,7 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
case RES_GRF_REREAD_AND_INCACHE:
if( ND_GRFNODE == GetNode()->GetNodeType() )
{
bComplete = sal_False;
bComplete = false;
SwGrfNode* pNd = (SwGrfNode*) GetNode();
ViewShell *pVSh = 0;
......@@ -701,7 +701,7 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
case RES_LINKED_GRAPHIC_STREAM_ARRIVED:
if ( GetNode()->GetNodeType() == ND_GRFNODE )
{
bComplete = sal_False;
bComplete = false;
SwGrfNode* pNd = (SwGrfNode*) GetNode();
CLEARCACHE( pNd )
......@@ -824,7 +824,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
pOut->SetAntialiasing( nFormerAntialiasingAtOutput | ANTIALIASING_ENABLE_B2DDRAW );
}
sal_Bool bForceSwap = sal_False, bContinue = sal_True;
bool bForceSwap = false, bContinue = true;
GraphicObject& rGrfObj = pGrfNd->GetGrfObj();
GraphicAttr aGrfAttr;
......@@ -857,7 +857,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if ( !aTxt.Len() )
GetRealURL( *pGrfNd, aTxt );
::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, sal_False );
bContinue = sal_False;
bContinue = false;
}
else if( rGrfObj.IsCached( pOut, aAlignedGrfArea.Pos(),
aAlignedGrfArea.SSize(), &aGrfAttr ))
......@@ -865,17 +865,17 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
rGrfObj.DrawWithPDFHandling( *pOut,
aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(),
&aGrfAttr );
bContinue = sal_False;
bContinue = false;
}
}
if( bContinue )
{
const sal_Bool bSwapped = rGrfObj.IsSwappedOut();
const sal_Bool bSwappedIn = 0 != pGrfNd->SwapIn( bPrn );
const bool bSwappedIn = 0 != pGrfNd->SwapIn( bPrn );
if( bSwappedIn && rGrfObj.GetGraphic().IsSupportedGraphic())
{
const sal_Bool bAnimate = rGrfObj.IsAnimated() &&
const bool bAnimate = rGrfObj.IsAnimated() &&
!pShell->IsPreView() &&
!pShell->GetAccessibilityOptions()->IsStopAnimatedGraphics() &&
// #i9684# Stop animation during printing/pdf export
......@@ -932,7 +932,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
// When printing, we must not collect the graphics
if( bSwapped && bPrn )
bForceSwap = sal_True;
bForceSwap = true;
}
if( bForceSwap )
......@@ -971,7 +971,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
// We do not have a printer in the BrowseMode and thus no JobSetup, so we create one ...
const JobSetup* pJobSetup = pOLENd->getIDocumentDeviceAccess()->getJobsetup();
sal_Bool bDummyJobSetup = 0 == pJobSetup;
bool bDummyJobSetup = 0 == pJobSetup;
if( bDummyJobSetup )
pJobSetup = new JobSetup();
......
......@@ -353,7 +353,7 @@ sal_Int16 SwNumFmt::GetVertOrient() const
void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
{
sal_Bool bDocIsModified = pDoc->IsModified();
sal_Bool bFnd = sal_False;
bool bFnd = false;
const SwNumRule* pRule;
for( sal_uInt16 n = pDoc->GetNumRuleTbl().size(); !bFnd && n; )
{
......@@ -368,7 +368,7 @@ void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
{
lcl_SetRuleChgd( *(*aIter), i );
}
bFnd = sal_True;
bFnd = true;
break;
}
}
......@@ -749,7 +749,7 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
if ( rNodeNum.GetLevelInListTree() >= 0 )
{
sal_Bool bOldHadPrefix = sal_True;
bool bOldHadPrefix = true;
bool bFirstIteration = true;
::rtl::OUString sOldPrefix;
......
This diff is collapsed.
......@@ -554,7 +554,7 @@ static void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
while( pLine->GetUpper() )
pLine = pLine->GetUpper()->GetUpper();
sal_Bool bReplaceColl = sal_True;
bool bReplaceColl = true;
if( bDelCntnt && !bUndoRedline )
{
// Delete the Fly first, then the corresponding Nodes
......@@ -598,7 +598,7 @@ static void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
if( pCNd &&
RES_POOLCOLL_TABLE_HDLN !=
pCNd->GetFmtColl()->GetPoolFmtId() )
bReplaceColl = sal_False;
bReplaceColl = false;
}
pDoc->GetNodes().Delete( aInsIdx, aEndNdIdx.GetIndex() - aInsIdx.GetIndex() );
......
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