Skip to content

Commit

Permalink
sal_Bool to bool
Browse files Browse the repository at this point in the history
Change-Id: I5f454a00d10264adc0c7312459ca0a7ad261c3ad
  • Loading branch information
tabe committed Nov 23, 2012
1 parent 1781da9 commit 10ffbbd
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 117 deletions.
128 changes: 64 additions & 64 deletions sw/source/core/edit/autofmt.cxx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sw/source/core/edit/edatmisc.cxx
Expand Up @@ -48,7 +48,7 @@ void SwEditShell::ResetAttr( const std::set<sal_uInt16> &attrs, SwPaM* pPaM )
SwPaM* pCrsr = pPaM ? pPaM : GetCrsr( );

StartAllAction();
sal_Bool bUndoGroup = pCrsr->GetNext() != pCrsr;
bool bUndoGroup = pCrsr->GetNext() != pCrsr;
if( bUndoGroup )
{
GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_RESETATTR, NULL);
Expand Down
18 changes: 9 additions & 9 deletions sw/source/core/edit/edattr.cxx
Expand Up @@ -329,9 +329,9 @@ bool SwEditShell::HasFtns( bool bEndNotes ) const
{
const SwFmtFtn &rFtn = rIdxs[i]->GetFtn();
if ( bEndNotes == rFtn.IsEndNote() )
return sal_True;
return true;
}
return sal_False;
return false;
}


Expand Down Expand Up @@ -461,17 +461,17 @@ static inline sal_uInt16 lcl_SetScriptFlags( sal_uInt16 nType )
return nRet;
}

static sal_Bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
sal_uInt16 &rScrpt, sal_Bool bInSelection, sal_Bool bNum )
static bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
sal_uInt16 &rScrpt, bool bInSelection, bool bNum )
{
sal_Bool bRet = sal_False;
bool bRet = false;
const String& rTxt = rTNd.GetTxt();
String sExp;

// consider numbering
if ( bNum )
{
bRet = sal_False;
bRet = false;

if ( rTNd.IsInList() )
{
Expand All @@ -498,7 +498,7 @@ static sal_Bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
const SwTxtAttr* const pAttr = rTNd.GetTxtAttrForCharAt( nPos );
if (pAttr)
{
bRet = sal_True; // all other than fields can be
bRet = true; // all other than fields can be
// defined as weak-script ?
if ( RES_TXTATR_FIELD == pAttr->Which() )
{
Expand Down Expand Up @@ -575,7 +575,7 @@ sal_uInt16 SwEditShell::GetScriptType() const
else
nScript = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );

if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nPos, nRet, sal_False, sal_False ))
if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nPos, nRet, false, false ))
nRet |= lcl_SetScriptFlags( nScript );
}
}
Expand Down Expand Up @@ -611,7 +611,7 @@ sal_uInt16 SwEditShell::GetScriptType() const
pBreakIt->GetBreakIter()->getScriptType(
rTxt, nChg );

if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, sal_True,
if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, true,
0 == nChg && rTxt.Len() == nEndPos ) )
nRet |= lcl_SetScriptFlags( nScript );

Expand Down
6 changes: 3 additions & 3 deletions sw/source/core/edit/eddel.cxx
Expand Up @@ -200,7 +200,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
pDestShell->StartAllAction();
SwPosition *pPos = 0;
sal_Bool bRet = sal_False;
sal_Bool bFirstMove = sal_True;
bool bFirstMove = true;
SwNodeIndex aSttNdIdx( pDestShell->GetDoc()->GetNodes() );
xub_StrLen nSttCntIdx = 0;
// For block selection this list is filled with the insert positions
Expand Down Expand Up @@ -242,7 +242,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
// Anfangs-Position vom neuen Bereich merken
aSttNdIdx = pPos->nNode.GetIndex()-1;
nSttCntIdx = pPos->nContent.GetIndex();
bFirstMove = sal_False;
bFirstMove = false;
}

const bool bSuccess( GetDoc()->CopyRange( *PCURCRSR, *pPos, false ) );
Expand Down Expand Up @@ -281,7 +281,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
== pCmp->GetCntntNode(), "Point im falschen Node" );
OSL_ENSURE( pCmp->GetMark()->nContent.GetIdxReg()
== pCmp->GetCntntNode(sal_False), "Mark im falschen Node" );
sal_Bool bTst = *pCmp->GetPoint() == *pCmp->GetMark();
bool bTst = *pCmp->GetPoint() == *pCmp->GetMark();
(void) bTst;
} while( pDestShell->GetCrsr() != ( pCmp = (SwPaM*)pCmp->GetNext() ) );
}
Expand Down
8 changes: 4 additions & 4 deletions sw/source/core/edit/edfld.cxx
Expand Up @@ -350,10 +350,10 @@ void SwEditShell::UpdateFlds( SwField &rFld )
GetDoc()->UpdateFld(pTxtFld, rFld, pMsgHnt, sal_True);
}

// bOkay (statt return wg. EndAllAction) wird sal_False,
// bOkay (statt return wg. EndAllAction) wird false,
// 1) wenn nur ein Pam mehr als ein Feld enthaelt oder
// 2) bei gemischten Feldtypen
sal_Bool bOkay = sal_True;
bool bOkay = true;
sal_Bool bTblSelBreak = sal_False;

SwMsgPoolItem aHint( RES_TXTATR_FIELD ); // Such-Hint
Expand Down Expand Up @@ -381,7 +381,7 @@ void SwEditShell::UpdateFlds( SwField &rFld )
{
// wenn nur ein Pam mehr als ein Feld enthaelt ...
if( aPam.Start()->nContent != pCurStt->nContent )
bOkay = sal_False;
bOkay = false;

if( 0 != (pTxtFld = GetDocTxtFld( pCurStt )) )
{
Expand All @@ -391,7 +391,7 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// bei gemischten Feldtypen
if( pCurFld->GetTyp()->Which() !=
rFld.GetTyp()->Which() )
bOkay = sal_False;
bOkay = false;

bTblSelBreak = GetDoc()->UpdateFld(pTxtFld, rFld,
pMsgHnt, sal_False);
Expand Down
8 changes: 4 additions & 4 deletions sw/source/core/edit/edglbldc.cxx
Expand Up @@ -159,14 +159,14 @@ sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwPosition& rPos = *pCrsr->GetPoint();
rPos.nNode = rInsPos.GetDocPos();

sal_Bool bEndUndo = sal_False;
bool bEndUndo = false;
SwDoc* pMyDoc = GetDoc();
SwTxtNode *const pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( pTxtNd )
rPos.nContent.Assign( pTxtNd, 0 );
else
{
bEndUndo = sal_True;
bEndUndo = true;
pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
rPos.nNode--;
pMyDoc->AppendTxtNode( rPos );
Expand Down Expand Up @@ -200,15 +200,15 @@ sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwPosition& rPos = *pCrsr->GetPoint();
rPos.nNode = rInsPos.GetDocPos();

sal_Bool bEndUndo = sal_False;
bool bEndUndo = false;
SwDoc* pMyDoc = GetDoc();
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( pTxtNd && pTxtNd->GetTxt().Len() && rPos.nNode.GetIndex() + 1 !=
pMyDoc->GetNodes().GetEndOfContent().GetIndex() )
rPos.nContent.Assign( pTxtNd, 0 );
else
{
bEndUndo = sal_True;
bEndUndo = true;
pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
rPos.nNode--;
pMyDoc->AppendTxtNode( rPos );
Expand Down
20 changes: 10 additions & 10 deletions sw/source/core/edit/editsh.cxx
Expand Up @@ -133,7 +133,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )

// calculate cursor bidi level
SwCursor* pTmpCrsr = _GetCrsr();
const sal_Bool bDoNotSetBidiLevel = ! pTmpCrsr ||
const bool bDoNotSetBidiLevel = ! pTmpCrsr ||
( 0 != dynamic_cast<SwUnoCrsr*>(pTmpCrsr) );

if ( ! bDoNotSetBidiLevel )
Expand Down Expand Up @@ -613,7 +613,7 @@ String SwEditShell::Calculate()
aStr = rCC.lowercase( aStr );

sal_Unicode ch;
sal_Bool bValidFlds = sal_False;
bool bValidFlds = false;
xub_StrLen nPos = 0;

while( nPos < aStr.Len() )
Expand Down Expand Up @@ -641,7 +641,7 @@ String SwEditShell::Calculate()
GetDoc()->FldsToCalc( aCalc,
pStart->nNode.GetIndex(),
pStart->nContent.GetIndex() );
bValidFlds = sal_True;
bValidFlds = true;
}
(( aFormel += '(' ) +=
aCalc.GetStrResult( aCalc.VarLook( sVar )
Expand Down Expand Up @@ -719,30 +719,30 @@ sal_Bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, s
return sal_False;
StartAllAction();
GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_UI_INSERT_URLTXT, NULL);
sal_Bool bInsTxt = sal_True;
bool bInsTxt = true;

if( rStr.Len() )
{
SwPaM* pCrsr = GetCrsr();
if( pCrsr->HasMark() && *pCrsr->GetPoint() != *pCrsr->GetMark() )
{
// Selection vorhanden, MehrfachSelektion?
sal_Bool bDelTxt = sal_True;
bool bDelTxt = true;
if( pCrsr->GetNext() == pCrsr )
{
// einfach Selection -> Text ueberpruefen
String sTxt(comphelper::string::stripEnd(GetSelTxt(), ' '));
if( sTxt == rStr )
bDelTxt = bInsTxt = sal_False;
bDelTxt = bInsTxt = false;
}
else if( rFmt.GetValue() == rStr ) // Name und URL gleich?
bDelTxt = bInsTxt = sal_False;
bDelTxt = bInsTxt = false;

if( bDelTxt )
Delete();
}
else if( pCrsr->GetNext() != pCrsr && rFmt.GetValue() == rStr )
bInsTxt = sal_False;
bInsTxt = false;

if( bInsTxt )
{
Expand All @@ -752,7 +752,7 @@ sal_Bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, s
}
}
else
bInsTxt = sal_False;
bInsTxt = false;

SetAttr( rFmt );
if (bInsTxt && !IsCrsrPtAtEnd())
Expand Down Expand Up @@ -860,7 +860,7 @@ void SwEditShell::SetNumberingRestart()
if( nCurrNd <= nEndNd )
{
SwCntntFrm* pCntFrm;
sal_Bool bGoOn = sal_True;
bool bGoOn = true;
//iterate over all paragraphs
while( bGoOn )
{
Expand Down
8 changes: 4 additions & 4 deletions sw/source/core/edit/edlingu.cxx
Expand Up @@ -228,7 +228,7 @@ void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart,
if( pSh )
return;

sal_Bool bSetCurr;
bool bSetCurr;

pSh = pShell;

Expand Down Expand Up @@ -256,7 +256,7 @@ void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart,
}
else
{
bSetCurr = sal_False;
bSetCurr = false;
nCrsrCnt = 1;
pSh->Push();
pSh->SetLinguRange( eStart, eEnd );
Expand Down Expand Up @@ -546,7 +546,7 @@ uno::Any SwHyphIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
if( !pMySh )
return aHyphRet;

const sal_Bool bAuto = IsAuto();
const bool bAuto = IsAuto();
uno::Reference< XHyphenatedWord > xHyphWord;
bool bGoOn = false;
do {
Expand Down Expand Up @@ -1575,7 +1575,7 @@ bool SwSpellIter::SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammar
//the cursor has to be collapsed on the left to go to the start of the sentence - if sentence ends inside of the error
pCrsr->DeleteMark();
pCrsr->SetMark();
sal_Bool bStartSent = 0 != pMySh->GoStartSentence();
bool bStartSent = 0 != pMySh->GoStartSentence();
SpellContentPositions aDeletedRedlines = lcl_CollectDeletedRedlines(pMySh);
if(bStartSent)
{
Expand Down
12 changes: 6 additions & 6 deletions sw/source/core/edit/ednumber.cxx
Expand Up @@ -67,9 +67,9 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
return; // done, because by precondition everything is combined
}

sal_Bool bEnde;
bool bEnde;
do {
bEnde = sal_True;
bEnde = true;

// combine with predecessor?
if( nPos > 0 )
Expand All @@ -79,7 +79,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
|| rTmp.nEnd+1 == aRg.nStart )
{
aRg.nStart = rTmp.nStart;
bEnde = sal_False;
bEnde = false;
erase( begin() + --nPos ); // combine
}
// range contained in rTmp?
Expand All @@ -94,7 +94,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
rTmp.nStart == aRg.nEnd+1 )
{
aRg.nEnd = rTmp.nEnd;
bEnde = sal_False;
bEnde = false;
erase( begin() + nPos ); // combine
}

Expand Down Expand Up @@ -531,7 +531,7 @@ sal_Bool SwEditShell::IsProtectedOutlinePara() const
{
const SwOutlineNodes& rOutlNd = GetDoc()->GetNodes().GetOutLineNds();
SwNodePtr pNd = (SwNodePtr)&rNd;
sal_Bool bFirst = sal_True;
bool bFirst = true;
sal_uInt16 nPos;
int nLvl(0);
if( !rOutlNd.Seek_Entry( pNd, &nPos ) && nPos )
Expand All @@ -549,7 +549,7 @@ sal_Bool SwEditShell::IsProtectedOutlinePara() const
if( bFirst )
{
nLvl = nTmpLvl;
bFirst = sal_False;
bFirst = false;
}
else if( nLvl >= nTmpLvl )
break;
Expand Down
8 changes: 4 additions & 4 deletions sw/source/core/edit/edtab.cxx
Expand Up @@ -60,7 +60,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts
StartAllAction();
SwPosition* pPos = GetCrsr()->GetPoint();

sal_Bool bEndUndo = 0 != pPos->nContent.GetIndex();
bool bEndUndo = 0 != pPos->nContent.GetIndex();
if( bEndUndo )
{
StartUndo( UNDO_START );
Expand Down Expand Up @@ -179,7 +179,7 @@ void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTblOpts,

StartAllAction();

sal_Bool bEndUndo = 0 != pPos->nContent.GetIndex();
bool bEndUndo = 0 != pPos->nContent.GetIndex();
if( bEndUndo )
{
StartUndo( UNDO_START );
Expand Down Expand Up @@ -269,7 +269,7 @@ sal_Bool SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
aBoxes.insert( pBox );
}
} while( sal_False );
} while( false );
}

for (size_t n = 0; n < aBoxes.size(); ++n)
Expand Down Expand Up @@ -311,7 +311,7 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet )
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
aBoxes.insert( pBox );
}
} while( sal_False );
} while( false );
}

// beim setzen einer Formel keine Ueberpruefung mehr vornehmen!
Expand Down
10 changes: 5 additions & 5 deletions sw/source/core/edit/edtox.cxx
Expand Up @@ -191,7 +191,7 @@ sal_Bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pS
SwDoc* pMyDoc = GetDoc();
SwDocShell* pDocSh = pMyDoc->GetDocShell();

sal_Bool bInIndex = pTOX == GetCurTOX();
bool bInIndex = pTOX == GetCurTOX();
SET_CURR_SHELL( this );
StartAllAction();

Expand Down Expand Up @@ -347,10 +347,10 @@ void SwEditShell::ApplyAutoMark()
//
// SearchOptions to be used in loop below
//
sal_Bool bCaseSensitive = sal_True;
sal_Bool bWordOnly = sal_False;
sal_Bool bSrchInSel = sal_False;
sal_Bool bLEV_Relaxed = sal_True;
bool bCaseSensitive = true;
bool bWordOnly = false;
bool bSrchInSel = false;
bool bLEV_Relaxed = true;
sal_Int32 nLEV_Other = 2; // -> changedChars;
sal_Int32 nLEV_Longer = 3; //! -> deletedChars;
sal_Int32 nLEV_Shorter = 1; //! -> insertedChars;
Expand Down

0 comments on commit 10ffbbd

Please sign in to comment.