summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-11-23 11:06:51 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-11-23 21:45:53 +0900
commit10ffbbd269ae14677e7fced9da0268146faae919 (patch)
tree82bff2982503c144081cc33e95cb1610f5ded12b /sw
parent1781da99f62454df0fc04da1f4013528ea9fff96 (diff)
sal_Bool to bool
Change-Id: I5f454a00d10264adc0c7312459ca0a7ad261c3ad
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/edit/autofmt.cxx128
-rw-r--r--sw/source/core/edit/edatmisc.cxx2
-rw-r--r--sw/source/core/edit/edattr.cxx18
-rw-r--r--sw/source/core/edit/eddel.cxx6
-rw-r--r--sw/source/core/edit/edfld.cxx8
-rw-r--r--sw/source/core/edit/edglbldc.cxx8
-rw-r--r--sw/source/core/edit/editsh.cxx20
-rw-r--r--sw/source/core/edit/edlingu.cxx8
-rw-r--r--sw/source/core/edit/ednumber.cxx12
-rw-r--r--sw/source/core/edit/edtab.cxx8
-rw-r--r--sw/source/core/edit/edtox.cxx10
-rw-r--r--sw/source/core/edit/edundo.cxx6
12 files changed, 117 insertions, 117 deletions
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index e5ac1db0fc61..8c3096b11bd1 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -164,9 +164,9 @@ class SwAutoFormat
bool IsSpace( const sal_Unicode c ) const
{ return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */); }
- void SetColl( sal_uInt16 nId, sal_Bool bHdLineOrText = sal_False );
+ void SetColl( sal_uInt16 nId, bool bHdLineOrText = false );
String GoNextPara();
- sal_Bool HasObjects( const SwNode& rNd );
+ bool HasObjects( const SwNode& rNd );
// TxtNode methods
const SwTxtNode* GetNextNode() const;
@@ -187,7 +187,7 @@ class SwAutoFormat
xub_StrLen GetLeadingBlanks( const String& rStr ) const;
xub_StrLen GetTrailingBlanks( const String& rStr ) const;
- sal_Bool IsFirstCharCapital( const SwTxtNode& rNd ) const;
+ bool IsFirstCharCapital( const SwTxtNode& rNd ) const;
sal_uInt16 GetDigitLevel( const SwTxtNode& rTxtNd, xub_StrLen& rPos,
String* pPreFix = 0, String* pPostFix = 0,
String* pNumTypes = 0 ) const;
@@ -201,16 +201,16 @@ class SwAutoFormat
void BuildNegIndent( SwTwips nSpaces );
void BuildHeadLine( sal_uInt16 nLvl );
- sal_Bool HasSelBlanks( SwPaM& rPam ) const;
- sal_Bool HasBreakAttr( const SwTxtNode& ) const;
+ bool HasSelBlanks( SwPaM& rPam ) const;
+ bool HasBreakAttr( const SwTxtNode& ) const;
void DeleteSel( SwPaM& rPam );
- sal_Bool DeleteAktNxtPara( const String& rNxtPara );
+ bool DeleteAktNxtPara( const String& rNxtPara );
// delete in the node start and/or end
- void DeleteAktPara( sal_Bool bStart = sal_True, sal_Bool nEnd = sal_True );
- void DelEmptyLine( sal_Bool bTstNextPara = sal_True );
+ void DeleteAktPara( bool bStart = true, bool nEnd = true );
+ void DelEmptyLine( bool bTstNextPara = true );
// when using multiline paragraphs delete the "left" and/or
// "right" margins
- void DelMoreLinesBlanks( sal_Bool bWithLineBreaks = sal_False );
+ void DelMoreLinesBlanks( bool bWithLineBreaks = false );
// delete the previous paragraph
void DelPrevPara();
// execute AutoCorrect on current TextNode
@@ -228,10 +228,10 @@ class SwAutoFormat
}
// is a dot at the end ??
- sal_Bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
+ bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
- sal_Bool DoUnderline();
- sal_Bool DoTable();
+ bool DoUnderline();
+ bool DoTable();
void _SetRedlineTxt( sal_uInt16 nId );
bool SetRedlineTxt( sal_uInt16 nId )
@@ -361,11 +361,11 @@ String SwAutoFormat::GoNextPara()
return pAktTxtNd->GetTxt();
}
-sal_Bool SwAutoFormat::HasObjects( const SwNode& rNd )
+bool SwAutoFormat::HasObjects( const SwNode& rNd )
{
// Is there something bound to the paragraph in the paragraph
// like borders, DrawObjects, ...
- sal_Bool bRet = sal_False;
+ bool bRet = false;
const SwFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
for( sal_uInt16 n = 0; n < rFmts.size(); ++n )
{
@@ -374,7 +374,7 @@ sal_Bool SwAutoFormat::HasObjects( const SwNode& rNd )
rAnchor.GetCntntAnchor() &&
&rAnchor.GetCntntAnchor()->nNode.GetNode() == &rNd )
{
- bRet = sal_True;
+ bRet = true;
break;
}
}
@@ -544,10 +544,10 @@ sal_Bool SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
-sal_Bool SwAutoFormat::DoUnderline()
+bool SwAutoFormat::DoUnderline()
{
if( !aFlags.bSetBorder )
- return sal_False;
+ return false;
const sal_Unicode* pStr = pAktTxtNd->GetTxt().GetBuffer();
int eState = 0;
@@ -564,12 +564,12 @@ sal_Bool SwAutoFormat::DoUnderline()
case '~': eTmp = 5; break;
case '#': eTmp = 6; break;
default:
- return sal_False;
+ return false;
}
if( 0 == eState )
eState = eTmp;
else if( eState != eTmp )
- return sal_False;
+ return false;
++nCnt;
++pStr;
@@ -578,7 +578,7 @@ sal_Bool SwAutoFormat::DoUnderline()
if( 2 < nCnt )
{
// dann unterstreiche mal den vorherigen Absatz, wenn es diesen gibt!
- DelEmptyLine( sal_False );
+ DelEmptyLine( false );
aDelPam.SetMark();
aDelPam.GetMark()->nContent = 0;
@@ -627,11 +627,11 @@ sal_Bool SwAutoFormat::DoUnderline()
}
-sal_Bool SwAutoFormat::DoTable()
+bool SwAutoFormat::DoTable()
{
if( !aFlags.bCreateTable || !aFlags.bAFmtByInput ||
pAktTxtNd->FindTableNode() )
- return sal_False;
+ return false;
const String& rTmp = pAktTxtNd->GetTxt();
xub_StrLen nSttPlus = GetLeadingBlanks( rTmp );
@@ -641,7 +641,7 @@ sal_Bool SwAutoFormat::DoTable()
if( 2 > nEndPlus - nSttPlus ||
( '+' != ( cChar = rTmp.GetChar( nSttPlus )) && '|' != cChar ) ||
( '+' != ( cChar = rTmp.GetChar( nEndPlus - 1)) && '|' != cChar ))
- return sal_False;
+ return false;
SwTxtFrmInfo aInfo( pAktTxtFrm );
@@ -666,7 +666,7 @@ sal_Bool SwAutoFormat::DoTable()
break;
default:
- return sal_False;
+ return false;
}
if( ++n == nEndPlus )
break;
@@ -761,7 +761,7 @@ xub_StrLen SwAutoFormat::GetTrailingBlanks( const String& rStr ) const
}
-sal_Bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
+bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
{
const String& rTxt = rNd.GetTxt();
for( xub_StrLen n = 0, nEnd = rTxt.Len(); n < nEnd; ++n )
@@ -774,7 +774,7 @@ sal_Bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
0 != ( i18n::KCharacterType::UPPER &
nCharType );
}
- return sal_False;
+ return false;
}
@@ -1019,7 +1019,7 @@ CHECK_ROMAN_5:
}
-void SwAutoFormat::SetColl( sal_uInt16 nId, sal_Bool bHdLineOrText )
+void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText )
{
aDelPam.DeleteMark();
aDelPam.GetPoint()->nNode = aNdIdx;
@@ -1056,7 +1056,7 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, sal_Bool bHdLineOrText )
}
-sal_Bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
+bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
{
// noch ein Blank am Anfang oder Ende ?
// nicht loeschen, wird wieder eingefuegt.
@@ -1075,38 +1075,38 @@ sal_Bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
( ' ' == pTxtNd->GetTxt().GetChar( nBlnkPos )))
pPos->nContent++;
else
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
-sal_Bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const
+bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const
{
const SfxItemSet* pSet = rTxtNd.GetpSwAttrSet();
if( !pSet )
- return sal_False;
+ return false;
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem )
&& SVX_BREAK_NONE != ((SvxFmtBreakItem*)pItem)->GetBreak() )
- return sal_True;
+ return true;
if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False, &pItem )
&& ((SwFmtPageDesc*)pItem)->GetPageDesc()
&& nsUseOnPage::PD_NONE != ((SwFmtPageDesc*)pItem)->GetPageDesc()->GetUseOn() )
- return sal_True;
- return sal_False;
+ return true;
+ return false;
}
// ist ein Punkt am Ende ??
-sal_Bool SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
+bool SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
{
const String& rStr = rTxtNd.GetTxt();
xub_StrLen n = rStr.Len();
if( !n )
- return sal_True;
+ return true;
while( --n && IsSpace( rStr.GetChar( n ) ) )
;
@@ -1115,7 +1115,7 @@ sal_Bool SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
// loesche im Node Anfang oder/und Ende
-void SwAutoFormat::DeleteAktPara( sal_Bool bStart, sal_Bool bEnd )
+void SwAutoFormat::DeleteAktPara( bool bStart, bool bEnd )
{
if( aFlags.bAFmtByInput
? aFlags.bAFmtByInpDelSpacesAtSttEnd
@@ -1174,7 +1174,7 @@ void SwAutoFormat::DeleteSel( SwPaM& rDelPam )
pEditShell->DeleteSel( rDelPam );
}
-sal_Bool SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
+bool SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
{
// Loesche Blanks am Ende vom akt. und am Anfang vom naechsten
aDelPam.DeleteMark();
@@ -1197,7 +1197,7 @@ sal_Bool SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
// noch ein Blank am Anfang oder Ende ?
// nicht loeschen, wird wieder eingefuegt.
- sal_Bool bHasBlnks = HasSelBlanks( aDelPam );
+ bool bHasBlnks = HasSelBlanks( aDelPam );
if( *aDelPam.GetPoint() != *aDelPam.GetMark() )
DeleteSel( aDelPam );
@@ -1207,7 +1207,7 @@ sal_Bool SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
}
-void SwAutoFormat::DelEmptyLine( sal_Bool bTstNextPara )
+void SwAutoFormat::DelEmptyLine( bool bTstNextPara )
{
SetRedlineTxt( STR_AUTOFMTREDL_DEL_EMPTY_PARA );
// Loesche Blanks den leeren Absatz
@@ -1247,7 +1247,7 @@ void SwAutoFormat::DelEmptyLine( sal_Bool bTstNextPara )
}
-void SwAutoFormat::DelMoreLinesBlanks( sal_Bool bWithLineBreaks )
+void SwAutoFormat::DelMoreLinesBlanks( bool bWithLineBreaks )
{
if( aFlags.bAFmtByInput
? aFlags.bAFmtByInpDelSpacesBetweenLines
@@ -1266,7 +1266,7 @@ void SwAutoFormat::DelMoreLinesBlanks( sal_Bool bWithLineBreaks )
pNxt = (SwPaM*)aDelPam.GetNext();
if( pNxt->HasMark() && *pNxt->GetPoint() != *pNxt->GetMark() )
{
- sal_Bool bHasBlnks = HasSelBlanks( *pNxt );
+ bool bHasBlnks = HasSelBlanks( *pNxt );
DeleteSel( *pNxt );
if( !bHasBlnks )
{
@@ -1277,7 +1277,7 @@ void SwAutoFormat::DelMoreLinesBlanks( sal_Bool bWithLineBreaks )
if( pNxt == &aDelPam )
break;
delete pNxt;
- } while( sal_True );
+ } while( true );
aDelPam.DeleteMark();
}
@@ -1311,7 +1311,7 @@ void SwAutoFormat::BuildIndent()
// lese alle nachfolgenden Absaetze die zu diesem Einzug gehoeren
bool bBreak = true;
if( bMoreLines )
- DelMoreLinesBlanks( sal_True );
+ DelMoreLinesBlanks( true );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
@@ -1338,7 +1338,7 @@ void SwAutoFormat::BuildIndent()
!CalcLevel( *pNxtNd ) );
}
}
- DeleteAktPara( sal_True, sal_True );
+ DeleteAktPara( true, true );
AutoCorrect();
}
@@ -1349,7 +1349,7 @@ void SwAutoFormat::BuildTextIndent()
// lese alle nachfolgenden Absaetze die zu diesem Einzug gehoeren
bool bBreak = true;
if( bMoreLines )
- DelMoreLinesBlanks( sal_True );
+ DelMoreLinesBlanks( true );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
@@ -1377,7 +1377,7 @@ void SwAutoFormat::BuildTextIndent()
pNxtNd = GetNextNode();
}
}
- DeleteAktPara( sal_True, sal_True );
+ DeleteAktPara( true, true );
AutoCorrect();
}
@@ -1394,7 +1394,7 @@ void SwAutoFormat::BuildText()
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
IsSentenceAtEnd( *pAktTxtNd );
- SetColl( RES_POOLCOLL_TEXT, sal_True );
+ SetColl( RES_POOLCOLL_TEXT, true );
if( !bBreak )
{
SetRedlineTxt( STR_AUTOFMTREDL_DEL_MORELINES );
@@ -1416,7 +1416,7 @@ void SwAutoFormat::BuildText()
break;
}
}
- DeleteAktPara( sal_True, sal_True );
+ DeleteAktPara( true, true );
AutoCorrect();
}
@@ -1447,7 +1447,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
IsBlanksInString( *pAktTxtNd ) ||
IsSentenceAtEnd( *pAktTxtNd );
sal_Bool bRTL = pEditShell->IsInRightToLeftText();
- DeleteAktPara( sal_True, sal_True );
+ DeleteAktPara( true, true );
bool bChgBullet = false, bChgEnum = false;
xub_StrLen nAutoCorrPos = 0;
@@ -1728,7 +1728,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
if(!pNxtNd || pCurrNode == pNxtNd)
break;
}
- DeleteAktPara( sal_False, sal_True );
+ DeleteAktPara( false, true );
AutoCorrect( nAutoCorrPos );
}
@@ -1744,7 +1744,7 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
bool bBreak = true;
xub_StrLen nSpacePos, nTxtPos = GetBigIndent( nSpacePos );
if( bMoreLines )
- DelMoreLinesBlanks( sal_True );
+ DelMoreLinesBlanks( true );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
( !nTxtPos && IsBlanksInString( *pAktTxtNd )) ||
@@ -1816,7 +1816,7 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
pNxtNd = GetNextNode();
}
}
- DeleteAktPara( sal_True, sal_True );
+ DeleteAktPara( true, true );
AutoCorrect();
}
@@ -1832,14 +1832,14 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
pDoc->SetAutoFmtRedlineComment( &sTxt );
}
- SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_HEADLINE1 + nLvl ), sal_True );
+ SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_HEADLINE1 + nLvl ), true );
if( aFlags.bAFmtByInput )
{
SwTxtFmtColl& rNxtColl = pAktTxtNd->GetTxtColl()->GetNextTxtFmtColl();
DelPrevPara();
- DeleteAktPara( sal_True, sal_False );
+ DeleteAktPara( true, false );
DeleteAktNxtPara( aEmptyStr );
aDelPam.DeleteMark();
@@ -1849,7 +1849,7 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
}
else
{
- DeleteAktPara( sal_True, sal_True );
+ DeleteAktPara( true, true );
AutoCorrect();
}
}
@@ -1946,7 +1946,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
}
}
- int bCallACorr = sal_False;
+ bool bCallACorr = false;
int bBreak = 0;
if( nPos && IsSpace( pTxt->GetChar( nPos-1 )))
nLastBlank = nPos;
@@ -2071,15 +2071,15 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( nPos == nSttPos )
{
if( ++nPos == pTxt->Len() )
- bCallACorr = sal_True;
+ bCallACorr = true;
}
else
- bCallACorr = sal_True;
+ bCallACorr = true;
if( bCallACorr )
{
- bCallACorr = sal_False;
+ bCallACorr = false;
aDelPam.GetPoint()->nContent = nPos;
SetRedlineTxt( STR_AUTOFMTREDL_USE_REPLACE );
if( aFlags.bAutoCorrect &&
@@ -2283,7 +2283,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// geloescht werden!
if( !DoUnderline() && bReplaceStyles )
{
- SetColl( RES_POOLCOLL_STANDARD, sal_True );
+ SetColl( RES_POOLCOLL_STANDARD, true );
bEmptyLine = true;
}
eStat = READ_NEXT_PARA;
@@ -2302,7 +2302,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// loesche alle Blanks am Anfang/Ende
// und alle mitten drin
//JP 29.04.98: erstmal nur alle "mitten drin".
- DelMoreLinesBlanks( sal_False );
+ DelMoreLinesBlanks( false );
break;
}
@@ -2565,7 +2565,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// loesche alle Blanks am Anfang/Ende
// und alle mitten drin
//JP 29.04.98: erstmal nur alle "mitten drin".
- DelMoreLinesBlanks( sal_False );
+ DelMoreLinesBlanks( false );
// behandel die harte Attributierung
if( pAktTxtNd->HasSwAttrSet() )
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 5f66a04ecad9..69a16904326c 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -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);
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 14206cd8fdf1..51219619e328 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -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;
}
@@ -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() )
{
@@ -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() )
{
@@ -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 );
}
}
@@ -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 );
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index 7749871d75e0..4797e66298b7 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -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
@@ -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 ) );
@@ -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() ) );
}
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index 08b6b786b6a7..19e4dda5a72a 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -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
@@ -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 )) )
{
@@ -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);
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index 7881d5d113ff..2f5290d3746d 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -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 );
@@ -200,7 +200,7 @@ 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 !=
@@ -208,7 +208,7 @@ sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
rPos.nContent.Assign( pTxtNd, 0 );
else
{
- bEndUndo = sal_True;
+ bEndUndo = true;
pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
rPos.nNode--;
pMyDoc->AppendTxtNode( rPos );
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 9199073aea5f..dfccfa97b729 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -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 )
@@ -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() )
@@ -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 )
@@ -719,7 +719,7 @@ 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() )
{
@@ -727,22 +727,22 @@ sal_Bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, s
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 )
{
@@ -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())
@@ -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 )
{
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 9c9c3709d327..626862755acb 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -228,7 +228,7 @@ void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart,
if( pSh )
return;
- sal_Bool bSetCurr;
+ bool bSetCurr;
pSh = pShell;
@@ -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 );
@@ -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 {
@@ -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)
{
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 1f0294ef7580..7f88f3170634 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -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 )
@@ -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?
@@ -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
}
@@ -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 )
@@ -549,7 +549,7 @@ sal_Bool SwEditShell::IsProtectedOutlinePara() const
if( bFirst )
{
nLvl = nTmpLvl;
- bFirst = sal_False;
+ bFirst = false;
}
else if( nLvl >= nTmpLvl )
break;
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 2a8445398862..13dc561589a4 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -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 );
@@ -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 );
@@ -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)
@@ -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!
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index a0273d7a8b89..faae4a342c92 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -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();
@@ -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;
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index 8a701c0d0dfa..3c4e1c0a2719 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -111,7 +111,7 @@ bool SwEditShell::Undo(sal_uInt16 const nCount)
// current undo state was not saved
::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
- sal_Bool bRet = sal_False;
+ bool bRet = false;
StartAllAction();
{
@@ -170,7 +170,7 @@ bool SwEditShell::Redo(sal_uInt16 const nCount)
{
SET_CURR_SHELL( this );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
// undo state was not saved
::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
@@ -221,7 +221,7 @@ bool SwEditShell::Repeat(sal_uInt16 const nCount)
{
SET_CURR_SHELL( this );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
StartAllAction();
try {