summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-11-21 23:17:48 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-11-22 09:47:52 +0900
commit47002916baea9c8364733379685396ac3d1f4aac (patch)
treea3f3344558ff1b63fc23011e0bb4d06a50c2acff /sw
parent20553c9a932804b4759d0a5eda009e74cf538fde (diff)
sal_Bool to bool
Change-Id: Ib7d74ba8fe3cfc6cf9695d13a1537dacdceca627
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/docnode/node.cxx2
-rw-r--r--sw/source/core/docnode/node2lay.cxx24
-rw-r--r--sw/source/core/docnode/nodes.cxx48
-rw-r--r--sw/source/core/docnode/section.cxx10
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx14
-rw-r--r--sw/source/core/draw/dflyobj.cxx28
-rw-r--r--sw/source/core/draw/dview.cxx4
-rw-r--r--sw/source/core/edit/acorrect.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx120
9 files changed, 126 insertions, 126 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index a473084ebcad..48da03d19b04 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1106,7 +1106,7 @@ SwFmtColl *SwCntntNode::ChgFmtColl( SwFmtColl *pNewColl )
//FEATURE::CONDCOLL
// TODO: HACK: We need to recheck this condition according to the new template!
- if( sal_True /*pNewColl */ )
+ if( true /*pNewColl */ )
{
SetCondFmtColl( 0 );
}
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 013b478d57a3..1bafda384d30 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -51,10 +51,10 @@ class SwNode2LayImpl
SwModify* pMod;
std::vector<SwFrm*>* pUpperFrms; // To collect the Upper
sal_uLong nIndex; // The Index of the to-be-inserted Nodes
- sal_Bool bMaster : 1; // sal_True => only Master, sal_False => only Frames without Follow
- sal_Bool bInit : 1; // Did we already call First() at SwClient?
+ bool bMaster : 1; // true => only Master, false => only Frames without Follow
+ bool bInit : 1; // Did we already call First() at SwClient?
public:
- SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, sal_Bool bSearch );
+ SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearch );
~SwNode2LayImpl() { delete pIter; delete pUpperFrms; }
SwFrm* NextFrm(); // Returns the next "useful" Frame
SwLayoutFrm* UpperFrm( SwFrm* &rpFrm, const SwNode &rNode );
@@ -141,8 +141,8 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx)
}
-SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, sal_Bool bSearch )
- : pUpperFrms( NULL ), nIndex( nIdx ), bInit( sal_False )
+SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearch )
+ : pUpperFrms( NULL ), nIndex( nIdx ), bInit( false )
{
const SwNode* pNd;
if( bSearch || rNode.IsSectionNode() )
@@ -155,13 +155,13 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, sal_Bool bS
pNd = GoPreviousWithFrm( &aTmp );
if( !bSearch && pNd && rNode.GetIndex() > pNd->GetIndex() )
pNd = NULL; // Do not go over the limits
- bMaster = sal_False;
+ bMaster = false;
}
else
{
SwNodeIndex aTmp( rNode, -1 );
pNd = GoNextWithFrm( rNode.GetNodes(), &aTmp );
- bMaster = sal_True;
+ bMaster = true;
if( !bSearch && pNd && rNode.EndOfSectionIndex() < pNd->GetIndex() )
pNd = NULL; // Do not go over the limits
}
@@ -211,7 +211,7 @@ SwFrm* SwNode2LayImpl::NextFrm()
if( !bInit )
{
pRet = pIter->First();
- bInit = sal_True;
+ bInit = true;
}
else
pRet = pIter->Next();
@@ -352,7 +352,7 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong
OSL_ENSURE( pUpperFrms, "RestoreUpper without SaveUpper?" );
SwNode* pNd;
SwDoc *pDoc = rNds.GetDoc();
- sal_Bool bFirst = sal_True;
+ bool bFirst = true;
for( ; nStt < nEnd; ++nStt )
{
SwFrm* pNew = 0;
@@ -405,7 +405,7 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong
(*pUpperFrms)[x-2] = pNxt;
}
}
- bFirst = sal_False;
+ bFirst = false;
}
for( sal_uInt16 x = 0; x < pUpperFrms->size(); ++x )
{
@@ -434,12 +434,12 @@ SwFrm* SwNode2LayImpl::GetFrm( const Point* pDocPos,
SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx )
{
- pImpl = new SwNode2LayImpl( rNd, nIdx, sal_False );
+ pImpl = new SwNode2LayImpl( rNd, nIdx, false );
}
SwNode2Layout::SwNode2Layout( const SwNode& rNd )
{
- pImpl = new SwNode2LayImpl( rNd, rNd.GetIndex(), sal_True );
+ pImpl = new SwNode2LayImpl( rNd, rNd.GetIndex(), true );
pImpl->SaveUpperFrms();
}
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 0abaab8b4c05..1ae176bc59d2 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -118,7 +118,7 @@ SwNodes::~SwNodes()
{
SwNode *pNode;
SwNodeIndex aNdIdx( *this );
- while( sal_True )
+ while( true )
{
pNode = &aNdIdx.GetNode();
if( pNode == pEndOfContent )
@@ -148,7 +148,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
//JP 12.03.99: 63293 - Nodes vom RedlineBereich NIE aufnehmen
sal_uLong nNd = rInsPos.GetIndex();
- sal_Bool bInsOutlineIdx = !(
+ bool bInsOutlineIdx = !(
rNds.GetEndOfRedlines().StartOfSectionNode()->GetIndex() < nNd &&
nNd < rNds.GetEndOfRedlines().GetIndex() );
@@ -514,7 +514,7 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
//JP 12.03.99: 63293 - Nodes vom RedlineBereich NIE aufnehmen
sal_uLong nNd = aIdx.GetIndex();
- sal_Bool bInsOutlineIdx = !( rNodes.GetEndOfRedlines().
+ bool bInsOutlineIdx = !( rNodes.GetEndOfRedlines().
StartOfSectionNode()->GetIndex() < nNd &&
nNd < rNodes.GetEndOfRedlines().GetIndex() );
@@ -665,7 +665,7 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
aRg.aEnd--;
aIdx--;
- } while( sal_False );
+ } while( false );
}
else
{
@@ -1198,7 +1198,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
sal_Bool bSaveInNodesDel = bInNodesDel;
bInNodesDel = sal_True;
- sal_Bool bUpdateOutline = sal_False;
+ bool bUpdateOutline = false;
// bis alles geloescht ist
while( aRg.aStart < aRg.aEnd )
@@ -1227,7 +1227,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
{
// loesche die Gliederungs-Indizies.
pOutlineNds->erase(nIdxPos);
- bUpdateOutline = sal_True;
+ bUpdateOutline = true;
}
pTxtNode->InvalidateNumRule();
}
@@ -1289,7 +1289,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
if( pTxtNd->IsOutline())
{ // loesche die Gliederungs-Indizies.
pOutlineNds->erase( pTxtNd );
- bUpdateOutline = sal_True;
+ bUpdateOutline = true;
}
pTxtNd->InvalidateNumRule();
}
@@ -1613,8 +1613,8 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
SwNodeIndex aSttIdx( pStt->nNode );
SwTxtNode *const pSrcNd = aSttIdx.GetNode().GetTxtNode();
SwTxtNode * pDestNd = rPos.nNode.GetNode().GetTxtNode();
- sal_Bool bSplitDestNd = sal_True;
- sal_Bool bCopyCollFmt = pDestNd && !pDestNd->GetTxt().Len();
+ bool bSplitDestNd = true;
+ bool bCopyCollFmt = pDestNd && !pDestNd->GetTxt().Len();
if( pSrcNd )
{
@@ -1625,27 +1625,27 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
pDestNd = rNodes.MakeTxtNode( rPos.nNode, pSrcNd->GetTxtColl() );
rPos.nNode--;
rPos.nContent.Assign( pDestNd, 0 );
- bCopyCollFmt = sal_True;
+ bCopyCollFmt = true;
}
bSplitDestNd = pDestNd->Len() > rPos.nContent.GetIndex() ||
pEnd->nNode.GetNode().IsTxtNode();
// verschiebe jetzt noch den Inhalt in den neuen Node
- sal_Bool bOneNd = pStt->nNode == pEnd->nNode;
+ bool bOneNd = pStt->nNode == pEnd->nNode;
const xub_StrLen nLen =
( (bOneNd) ? pEnd->nContent.GetIndex() : pSrcNd->Len() )
- pStt->nContent.GetIndex();
if( !pEnd->nNode.GetNode().IsCntntNode() )
{
- bOneNd = sal_True;
+ bOneNd = true;
sal_uLong nSttNdIdx = pStt->nNode.GetIndex() + 1;
const sal_uLong nEndNdIdx = pEnd->nNode.GetIndex();
for( ; nSttNdIdx < nEndNdIdx; ++nSttNdIdx )
{
if( (*this)[ nSttNdIdx ]->IsCntntNode() )
{
- bOneNd = sal_False;
+ bOneNd = false;
break;
}
}
@@ -1657,7 +1657,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
{
if( !rPos.nContent.GetIndex() )
{
- bCopyCollFmt = sal_True;
+ bCopyCollFmt = true;
}
if( rNodes.IsDocNodes() )
{
@@ -1674,7 +1674,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
{
aEndIdx--;
}
- bSplitDestNd = sal_True;
+ bSplitDestNd = true;
pDestNd = rNodes[ rPos.nNode.GetIndex() - 1 ]->GetTxtNode();
if( nLen )
@@ -1693,7 +1693,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
SwDoc* const pInsDoc = pDestNd->GetDoc();
::sw::UndoGuard const undoGuard(pInsDoc->GetIDocumentUndoRedo());
pSrcNd->CopyCollFmt( *pDestNd );
- bCopyCollFmt = sal_False;
+ bCopyCollFmt = false;
}
if( bOneNd ) // das wars schon
@@ -1745,7 +1745,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
}
}
// am Ende steht noch ein leerer Text Node herum.
- bSplitDestNd = sal_True;
+ bSplitDestNd = true;
}
SwTxtNode* const pEndSrcNd = aEndIdx.GetNode().GetTxtNode();
@@ -2096,7 +2096,7 @@ SwStartNode* SwNodes::MakeTextSection( const SwNodeIndex & rWhere,
SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
int bSkipHidden, int bSkipProtect ) const
{
- int bFirst = sal_True;
+ bool bFirst = true;
SwNodeIndex aTmp( *pIdx );
const SwNode* pNd;
while( aTmp < Count() - 1 )
@@ -2109,11 +2109,11 @@ SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
(bSkipProtect && rSect.IsProtectFlag()) )
// dann diese Section ueberspringen
aTmp = *pNd->EndOfSectionNode();
- bFirst = sal_False;
+ bFirst = false;
}
else if( bFirst )
{
- bFirst = sal_False;
+ bFirst = false;
if( pNd->pStartOfSection->IsSectionNode() )
{
const SwSection& rSect = ((SwSectionNode*)pNd->
@@ -2141,7 +2141,7 @@ SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
}
}
++aTmp;
- bFirst = sal_False;
+ bFirst = false;
}
return 0;
}
@@ -2149,7 +2149,7 @@ SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
SwCntntNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
int bSkipHidden, int bSkipProtect ) const
{
- int bFirst = sal_True;
+ bool bFirst = true;
SwNodeIndex aTmp( *pIdx );
const SwNode* pNd;
while( aTmp > 0 )
@@ -2166,11 +2166,11 @@ SwCntntNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
// dann diese Section ueberspringen
aTmp = *pNd->StartOfSectionNode();
}
- bFirst = sal_False;
+ bFirst = false;
}
else if( bFirst )
{
- bFirst = sal_False;
+ bFirst = false;
if( pNd->pStartOfSection->IsSectionNode() )
{
const SwSection& rSect = ((SwSectionNode*)pNd->
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 1625561d0921..58110528f177 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -751,7 +751,7 @@ void SwSectionFmt::MakeFrms()
void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
- sal_Bool bClients = sal_False;
+ bool bClients = false;
sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{
@@ -799,7 +799,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
case RES_SECTION_RESETHIDDENFLAG:
case RES_FTN_AT_TXTEND:
- case RES_END_AT_TXTEND : bClients = sal_True;
+ case RES_END_AT_TXTEND : bClients = true;
// no break !!
case RES_SECTION_HIDDEN:
case RES_SECTION_NOT_HIDDEN:
@@ -1210,7 +1210,7 @@ int sw_FindDocShell( SfxObjectShellRef& xDocSh,
TypeId aType( TYPE(SwDocShell) );
SfxObjectShell* pShell = pDestSh;
- sal_Bool bFirst = 0 != pShell;
+ bool bFirst = 0 != pShell;
if( !bFirst )
// No DocShell passed, starting with the first from the DocShell list
@@ -1236,7 +1236,7 @@ int sw_FindDocShell( SfxObjectShellRef& xDocSh,
if( bFirst )
{
- bFirst = sal_False;
+ bFirst = false;
pShell = SfxObjectShell::GetFirst( &aType );
}
else
@@ -1416,7 +1416,7 @@ int sw_FindDocShell( SfxObjectShellRef& xDocSh,
if( sRange.Len() )
{
// Catch recursion
- sal_Bool bRecursion = sal_False;
+ bool bRecursion = false;
if( pSrcDoc == pDoc )
{
SwServerObjectRef refObj( (SwServerObject*)
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index 585ac2f14878..1c5bc7cff0b7 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -136,7 +136,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
return SUCCESS; // That's it!
}
- sal_Bool bUpdate = sal_False;
+ bool bUpdate = false;
sal_Bool bGraphicArrived = sal_False;
sal_Bool bGraphicPieceArrived = sal_False;
sal_Bool bDontNotify = sal_False;
@@ -183,7 +183,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
}
rGrfObj.SetGraphic( aGrf, rGrfObj.GetLink() );
- bUpdate = sal_True;
+ bUpdate = true;
// In order for the Node to have the right transparency status
// without having to access the graphic.
@@ -201,7 +201,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
((SwGrfNode*)pCntntNode)->SetTwipSize( Size(0,0) );
}
else if( pCntntNode->IsOLENode() )
- bUpdate = sal_True;
+ bUpdate = true;
ViewShell *pSh = 0;
SwEditShell* pESh = pDoc->GetEditShell( &pSh );
@@ -213,11 +213,11 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
{
SwMsgPoolItem aMsgHint( RES_GRAPHIC_PIECE_ARRIVED );
pCntntNode->ModifyNotification( &aMsgHint, &aMsgHint );
- bUpdate = sal_False;
+ bUpdate = false;
}
}
- static sal_Bool bInNotifyLinks = sal_False;
+ static bool bInNotifyLinks = false;
if( bUpdate && !bDontNotify && (!bSwapIn || bGraphicArrived) &&
!bInNotifyLinks)
{
@@ -239,7 +239,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
if ( bGraphicArrived )
{
// Notify all who are listening at the same link
- bInNotifyLinks = sal_True;
+ bInNotifyLinks = true;
const ::sfx2::SvBaseLinks& rLnks = pDoc->GetLinkManager().GetLinks();
for( sal_uInt16 n = rLnks.size(); n; )
@@ -273,7 +273,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
}
}
- bInNotifyLinks = sal_False;
+ bInNotifyLinks = false;
}
else
{
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 2db70e9620ce..c66ef1cb62bd 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -72,7 +72,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star;
-static sal_Bool bInResize = sal_False;
+static bool bInResize = false;
TYPEINIT1( SwFlyDrawObj, SdrObject )
TYPEINIT1( SwVirtFlyDrawObj, SdrVirtObj )
@@ -510,11 +510,11 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject() const
// be correct
if ( pShell && pShell->IsDrawingLayerPaintInProgress() )
{
- sal_Bool bDrawObject(sal_True);
+ bool bDrawObject(true);
if ( !SwFlyFrm::IsPaint( (SdrObject*)this, pShell ) )
{
- bDrawObject = sal_False;
+ bDrawObject = false;
}
if ( bDrawObject )
@@ -728,7 +728,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
RES_VERT_ORIENT, RES_HORI_ORIENT );
SwFmtHoriOrient aHori( pFmt->GetHoriOrient() );
SwFmtVertOrient aVert( pFmt->GetVertOrient() );
- sal_Bool bPut = sal_False;
+ bool bPut = false;
if( !GetFlyFrm()->IsFlyLayFrm() &&
::GetHtmlMode(pFmt->GetDoc()->GetDocShell()) )
@@ -737,7 +737,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
//Einzig einen Snap auf Links/Rechts bzw. Linker-/Rechter-Rand koennen
//wir versuchen.
const SwFrm* pAnch = GetFlyFrm()->GetAnchorFrm();
- sal_Bool bNextLine = sal_False;
+ bool bNextLine = false;
if( !GetFlyFrm()->IsAutoPos() || text::RelOrientation::PAGE_FRAME != aHori.GetRelationOrient() )
{
@@ -748,9 +748,9 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
else
{
- bNextLine = sal_True;
+ bNextLine = true;
//Horizontale Ausrichtung:
- const sal_Bool bLeftFrm =
+ const bool bLeftFrm =
aFlyRect.Left() < pAnch->Frm().Left() + pAnch->Prt().Left(),
bLeftPrt = aFlyRect.Left() + aFlyRect.Width() <
pAnch->Frm().Left() + pAnch->Prt().Width()/2;
@@ -761,7 +761,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
else
{
- const sal_Bool bRightFrm = aFlyRect.Left() >
+ const bool bRightFrm = aFlyRect.Left() >
pAnch->Frm().Left() + pAnch->Prt().Width();
aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
aHori.SetRelationOrient( bRightFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA );
@@ -771,7 +771,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
//Vertikale Ausrichtung bleibt grundsaetzlich schlicht erhalten,
//nur bei nicht automatischer Ausrichtung wird umgeschaltet.
- sal_Bool bRelChar = text::RelOrientation::CHAR == eRelVert;
+ bool bRelChar = text::RelOrientation::CHAR == eRelVert;
aVert.SetVertOrient( eVert != text::VertOrientation::NONE ? eVert :
GetFlyFrm()->IsFlyInCntFrm() ? text::VertOrientation::CHAR_CENTER :
bRelChar && bNextLine ? text::VertOrientation::CHAR_TOP : text::VertOrientation::TOP );
@@ -780,7 +780,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
else
aVert.SetRelationOrient( text::RelOrientation::PRINT_AREA );
aSet.Put( aVert );
- bPut = sal_True;
+ bPut = true;
}
//Automatische Ausrichtungen wollen wir moeglichst nicht verlieren.
@@ -791,14 +791,14 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
aHori.SetHoriOrient( eHori );
aHori.SetRelationOrient( eRelHori );
aSet.Put( aHori );
- bPut = sal_True;
+ bPut = true;
}
if ( text::VertOrientation::NONE != eVert )
{
aVert.SetVertOrient( eVert );
aVert.SetRelationOrient( eRelVert );
aSet.Put( aVert );
- bPut = sal_True;
+ bPut = true;
}
}
if ( bPut )
@@ -907,9 +907,9 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
}
else if ( aOutRect.TopLeft() != aNewPos )
aOutRect.SetPos( aNewPos );
- bInResize = sal_True;
+ bInResize = true;
NbcMove( Size( 0, 0 ) );
- bInResize = sal_False;
+ bInResize = false;
}
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 829ad2527dbf..637d80a45511 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -859,12 +859,12 @@ void SwDrawView::ModelHasChanged()
// will be fetched again (maybe textedit has ended).
OutlinerView* pView = GetTextEditOutlinerView();
Color aBackColor;
- sal_Bool bColorWasSaved(sal_False);
+ bool bColorWasSaved(false);
if(pView)
{
aBackColor = pView->GetBackgroundColor();
- bColorWasSaved = sal_True;
+ bColorWasSaved = true;
}
// call parent
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 1d1916d46ea2..8a985ce004a2 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -332,7 +332,7 @@ sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPo
eLang = (LanguageType)GetAppLanguage();
//JP 22.04.99: Bug 63883 - Sonderbehandlung fuer Punkte.
- sal_Bool bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
+ bool bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
'.' == pTxtNd->GetTxt().GetChar( nEndPos );
const SvxAutocorrWord* pFnd = rACorrect.SearchWordsInList(
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index cd33e464e6ee..e5ac1db0fc61 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -143,9 +143,9 @@ class SwAutoFormat
IS_ENDE
} eStat;
- sal_Bool bEnde : 1;
- sal_Bool bEmptyLine : 1;
- sal_Bool bMoreLines : 1;
+ bool bEnde : 1;
+ bool bEmptyLine : 1;
+ bool bMoreLines : 1;
// ------------- private methods -----------------------------
@@ -161,8 +161,8 @@ class SwAutoFormat
}
- sal_Bool IsSpace( const sal_Unicode c ) const
- { return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */) ? sal_True : sal_False; }
+ 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 );
String GoNextPara();
@@ -170,7 +170,7 @@ class SwAutoFormat
// TxtNode methods
const SwTxtNode* GetNextNode() const;
- sal_Bool IsEmptyLine( const SwTxtNode& rNd ) const
+ bool IsEmptyLine( const SwTxtNode& rNd ) const
{ return 0 == rNd.GetTxt().Len() ||
rNd.GetTxt().Len() == GetLeadingBlanks( rNd.GetTxt() ); }
@@ -216,7 +216,7 @@ class SwAutoFormat
// execute AutoCorrect on current TextNode
void AutoCorrect( xub_StrLen nSttPos = 0 );
- sal_Bool CanJoin( const SwTxtNode* pTxtNd ) const
+ bool CanJoin( const SwTxtNode* pTxtNd ) const
{
return !bEnde && pTxtNd &&
!IsEmptyLine( *pTxtNd ) &&
@@ -234,10 +234,10 @@ class SwAutoFormat
sal_Bool DoTable();
void _SetRedlineTxt( sal_uInt16 nId );
- sal_Bool SetRedlineTxt( sal_uInt16 nId )
- { if( aFlags.bWithRedlining ) _SetRedlineTxt( nId ); return sal_True; }
- sal_Bool ClearRedlineTxt()
- { if( aFlags.bWithRedlining ) pDoc->SetAutoFmtRedlineComment(0); return sal_True; }
+ bool SetRedlineTxt( sal_uInt16 nId )
+ { if( aFlags.bWithRedlining ) _SetRedlineTxt( nId ); return true; }
+ bool ClearRedlineTxt()
+ { if( aFlags.bWithRedlining ) pDoc->SetAutoFmtRedlineComment(0); return true; }
public:
SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
@@ -320,14 +320,14 @@ String SwAutoFormat::GoNextPara()
//has to be checed twice before and after incrementation
if( aNdIdx.GetIndex() >= aEndNdIdx.GetIndex() )
{
- bEnde = sal_True;
+ bEnde = true;
return aEmptyStr;
}
aNdIdx++;
if( aNdIdx.GetIndex() >= aEndNdIdx.GetIndex() )
{
- bEnde = sal_True;
+ bEnde = true;
return aEmptyStr;
}
else
@@ -339,7 +339,7 @@ String SwAutoFormat::GoNextPara()
// EndNode : at the end, terminate
if( pNewNd->IsEndNode() )
{
- bEnde = sal_True;
+ bEnde = true;
return aEmptyStr;
}
else if( pNewNd->IsTableNode() )
@@ -830,7 +830,7 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
}
else if( rCC.isAlpha( rTxt, nPos ) )
{
- sal_Bool bIsUpper =
+ bool bIsUpper =
0 != ( i18n::KCharacterType::UPPER &
rCC.getCharacterType( rTxt, nPos ));
sal_Unicode cLow = rCC.lowercase(rTxt, nPos, 1)[0], cNumTyp;
@@ -909,7 +909,7 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
{
// roemische Zahlen: checke ob das gueltige Zeichen sind
sal_uInt16 nVal;
- sal_Bool bError = sal_False;
+ bool bError = false;
switch( cLow )
{
case 'm': nVal = 1000; goto CHECK_ROMAN_1;
@@ -934,14 +934,14 @@ CHECK_ROMAN_1:
nMod5 == (2 * nVal) )
nStart = nStart + nVal;
else
- bError = sal_True;
+ bError = true;
}
break;
CHECK_ROMAN_5:
{
if( ( nStart / nVal ) & 1 )
- bError = sal_True;
+ bError = true;
else
{
int nMod = nStart % nVal;
@@ -951,20 +951,20 @@ CHECK_ROMAN_5:
else if( 0 == nMod )
nStart = nStart + nVal;
else
- bError = sal_True;
+ bError = true;
}
}
break;
case 'i':
if( nStart % 5 >= 3 )
- bError = sal_True;
+ bError = true;
else
nStart += 1;
break;
default:
- bError = sal_True;
+ bError = true;
}
if( bError )
@@ -1309,7 +1309,7 @@ void SwAutoFormat::BuildIndent()
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_INDENT );
// lese alle nachfolgenden Absaetze die zu diesem Einzug gehoeren
- sal_Bool bBreak = sal_True;
+ bool bBreak = true;
if( bMoreLines )
DelMoreLinesBlanks( sal_True );
else
@@ -1347,7 +1347,7 @@ void SwAutoFormat::BuildTextIndent()
{
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_TEXT_INDENT);
// lese alle nachfolgenden Absaetze die zu diesem Einzug gehoeren
- sal_Bool bBreak = sal_True;
+ bool bBreak = true;
if( bMoreLines )
DelMoreLinesBlanks( sal_True );
else
@@ -1387,7 +1387,7 @@ void SwAutoFormat::BuildText()
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_TEXT );
// lese alle nachfolgenden Absaetze die zu diesem Text
// ohne Einzug gehoeren
- sal_Bool bBreak = sal_True;
+ bool bBreak = true;
if( bMoreLines )
DelMoreLinesBlanks();
else
@@ -1425,7 +1425,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
{
SetRedlineTxt( STR_AUTOFMTREDL_SET_NUMBULET );
- sal_Bool bBreak = sal_True;
+ bool bBreak = true;
// als erstes den akt. Einzug bestimmen und die Framebreite bestimmen
SwTwips nFrmWidth = pAktTxtFrm->Prt().Width();;
@@ -1449,7 +1449,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
sal_Bool bRTL = pEditShell->IsInRightToLeftText();
DeleteAktPara( sal_True, sal_True );
- sal_Bool bChgBullet = sal_False, bChgEnum = sal_False;
+ bool bChgBullet = false, bChgEnum = false;
xub_StrLen nAutoCorrPos = 0;
// falls die Numerierung gesetzt werden, die akt. besorgen
@@ -1476,7 +1476,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
{
SwCharFmt* pCFmt = pDoc->GetCharFmtFromPool(
RES_POOLCHR_BUL_LEVEL );
- bChgBullet = sal_True;
+ bChgBullet = true;
// wurde das Format schon mal angepasst?
if( !aRule.GetNumFmt( nLvl ) )
{
@@ -1533,7 +1533,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
}
else
{
- bChgBullet = sal_True;
+ bChgBullet = true;
SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_BUL_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 )) );
}
}
@@ -1549,7 +1549,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
if( USHRT_MAX != ( nDigitLevel = GetDigitLevel( *pAktTxtNd, nTxtStt,
&aPreFix, &aPostFix, &aNumTypes )) )
{
- bChgEnum = sal_True;
+ bChgEnum = true;
// Ebene 0 und Einrueckung dann wird die Ebene durch den linken
// Einzug und der default NumEinrueckung bestimmt.
@@ -1614,7 +1614,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
}
// passt alles vollstaendig in den Frame?
- sal_Bool bDefStep = nFrmWidth < (nSpaceSteps * MAXLEVEL);
+ bool bDefStep = nFrmWidth < (nSpaceSteps * MAXLEVEL);
for( ; n < MAXLEVEL; ++n )
{
SwNumFmt aFmt( aRule.Get( n ) );
@@ -1633,7 +1633,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
else if( !aFlags.bAFmtByInput )
SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_NUM_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 ) ));
else
- bChgEnum = sal_False;
+ bChgEnum = false;
}
if( bChgEnum || bChgBullet )
@@ -1741,7 +1741,7 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
// Einrueckung in der 2.Zeile)
// lese alle nachfolgenden Absaetze die zu dieser Aufzaehlung gehoeren
- sal_Bool bBreak = sal_True;
+ bool bBreak = true;
xub_StrLen nSpacePos, nTxtPos = GetBigIndent( nSpacePos );
if( bMoreLines )
DelMoreLinesBlanks( sal_True );
@@ -1757,12 +1757,12 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
if( nTxtPos )
{
const String& rStr = pAktTxtNd->GetTxt();
- sal_Bool bInsTab = sal_True;
+ bool bInsTab = true;
if( '\t' == rStr.GetChar( nSpacePos+1 )) // ein Tab, das belassen wir
{
--nSpacePos;
- bInsTab = sal_False;
+ bInsTab = false;
}
xub_StrLen nSpaceStt = nSpacePos;
@@ -1773,7 +1773,7 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
if( bInsTab && '\t' == rStr.GetChar( nSpaceStt ) ) // ein Tab, das belassen wir
{
++nSpaceStt;
- bInsTab = sal_False;
+ bInsTab = false;
}
@@ -1875,7 +1875,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( nPos >= pTxt->Len() )
return;
- sal_Bool bGetLanguage = aFlags.bChgOrdinalNumber ||
+ bool bGetLanguage = aFlags.bChgOrdinalNumber ||
aFlags.bChgToEnEmDash || aFlags.bSetINetAttr ||
aFlags.bCptlSttWrd || aFlags.bCptlSttSntnc ||
aFlags.bAddNonBrkSpace;
@@ -1913,7 +1913,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
{
SetRedlineTxt( STR_AUTOFMTREDL_TYPO );
aDelPam.GetPoint()->nContent = nPos;
- sal_Bool bSetHardBlank = sal_False;
+ bool bSetHardBlank = false;
String sReplace( pATst->GetQuote( aACorrDoc,
nPos, cChar, sal_True ));
@@ -1923,7 +1923,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( 2 == sReplace.Len() && ' ' == sReplace.GetChar( 1 ))
{
sReplace.Erase( 1 );
- bSetHardBlank = sal_True;
+ bSetHardBlank = true;
}
pDoc->ReplaceRange( aDelPam, sReplace, false );
@@ -1964,7 +1964,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( !aFInfo.IsBullet( nPos ))
{
SetRedlineTxt( STR_AUTOFMTREDL_TYPO );
- sal_Bool bSetHardBlank = sal_False;
+ bool bSetHardBlank = false;
aDelPam.GetPoint()->nContent = nPos;
String sReplace( pATst->GetQuote( aACorrDoc,
nPos, cChar, sal_False ));
@@ -1972,7 +1972,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( 2 == sReplace.Len() && ' ' == sReplace.GetChar( 0 ))
{
sReplace.Erase( 0, 1 );
- bSetHardBlank = sal_True;
+ bSetHardBlank = true;
}
aDelPam.SetMark();
@@ -2172,10 +2172,10 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( aFlags.bSetNumRule && !aFlags.bAFmtByInput )
aFlags.bSetNumRule = sal_False;
- sal_Bool bReplaceStyles = !aFlags.bAFmtByInput || aFlags.bReplaceStyles;
+ bool bReplaceStyles = !aFlags.bAFmtByInput || aFlags.bReplaceStyles;
const SwTxtNode* pNxtNd = 0;
- sal_Bool bNxtEmpty = sal_False;
+ bool bNxtEmpty = false;
sal_Bool bNxtAlpha = sal_False;
sal_uInt16 nNxtLevel = 0;
@@ -2194,9 +2194,9 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
IsNoAlphaLine( *pNxtNd );
}
else
- bEmptyLine = sal_True; // am Dokument Anfang
+ bEmptyLine = true; // am Dokument Anfang
- bEnde = sal_False;
+ bEnde = false;
// setze die Werte fuer die Prozent-Anzeige
nEndNdIdx = aEndNdIdx.GetIndex();
@@ -2221,7 +2221,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// wenn mehrere Zeilen, dann erstmal nicht mit
// dem nachfolgenden Absatz zusammenfassen.
- bMoreLines = sal_False;
+ bMoreLines = false;
nLastCalcHeadLvl = nLastCalcEnumLvl = 0;
nLastHeadLvl = nLastEnumLvl = USHRT_MAX;
@@ -2249,7 +2249,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
{
if( aFlags.bDelEmptyNode && !HasObjects( *pAktTxtNd ) )
{
- bEmptyLine = sal_True;
+ bEmptyLine = true;
sal_uLong nOldCnt = pDoc->GetNodes().Count();
DelEmptyLine();
// wurde wiklich ein Node geloescht ?
@@ -2284,7 +2284,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( !DoUnderline() && bReplaceStyles )
{
SetColl( RES_POOLCOLL_STANDARD, sal_True );
- bEmptyLine = sal_True;
+ bEmptyLine = true;
}
eStat = READ_NEXT_PARA;
}
@@ -2297,7 +2297,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( pAktTxtNd->GetNumRule() )
{
// in Numerierung nichts machen, zum naechsten
- bEmptyLine = sal_False;
+ bEmptyLine = false;
eStat = READ_NEXT_PARA;
// loesche alle Blanks am Anfang/Ende
// und alle mitten drin
@@ -2350,7 +2350,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// nie zusammenfassen, so belassen
// (Opt. vielleicht als Ausnahmen nur Einzug)
- bMoreLines = sal_True;
+ bMoreLines = true;
if( bReplaceStyles )
{
@@ -2377,14 +2377,14 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
nNxtLevel = CalcLevel( *pNxtNd );
if( !bEmptyLine && HasBreakAttr( *pAktTxtNd ) )
- bEmptyLine = sal_True;
+ bEmptyLine = true;
if( !bNxtEmpty && HasBreakAttr( *pNxtNd ) )
- bNxtEmpty = sal_True;
+ bNxtEmpty = true;
}
else
{
- bNxtEmpty = sal_False; // sal_True;
+ bNxtEmpty = false; // true;
bNxtAlpha = sal_False;
nNxtLevel = 0;
}
@@ -2402,7 +2402,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( !DelLeadingBlanks( sClrStr ).Len() )
{
- bEmptyLine = sal_True;
+ bEmptyLine = true;
eStat = READ_NEXT_PARA;
break; // naechsten Absatz lesen
}
@@ -2412,7 +2412,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
IsBlanksInString( *pAktTxtNd ) )
break;
- bEmptyLine = sal_False;
+ bEmptyLine = false;
String sEndClrStr( sClrStr );
xub_StrLen nLen = DelTrailingBlanks( sEndClrStr ).Len();
@@ -2466,7 +2466,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
case TST_ENUMERIC:
{
- bEmptyLine = sal_False;
+ bEmptyLine = false;
if( IsEnumericChar( *pAktTxtNd ))
{
if( nLevel >= MAXLEVEL )
@@ -2560,7 +2560,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// erstmal: wurden schon mal entsprechende Vorlagen
// vergeben, so behalte die bei, gehe zum
// naechsten Node.
- bEmptyLine = sal_False;
+ bEmptyLine = false;
eStat = READ_NEXT_PARA;
// loesche alle Blanks am Anfang/Ende
// und alle mitten drin
@@ -2596,7 +2596,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
break;
case IS_ENDE:
- bEnde = sal_True;
+ bEnde = true;
break;
}
}
@@ -2662,13 +2662,13 @@ void SwEditShell::AutoFmtBySplitNode()
StartAllAction();
StartUndo( UNDO_AUTOFORMAT );
- sal_Bool bRange = sal_False;
+ bool bRange = false;
pCrsr->SetMark();
SwIndex* pCntnt = &pCrsr->GetMark()->nContent;
if( pCntnt->GetIndex() )
{
*pCntnt = 0;
- bRange = sal_True;
+ bRange = true;
}
else
{
@@ -2679,7 +2679,7 @@ void SwEditShell::AutoFmtBySplitNode()
{
pCntnt->Assign( pTxtNd, 0 );
pCrsr->GetMark()->nNode = aNdIdx;
- bRange = sal_True;
+ bRange = true;
}
}