summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2013-06-08 21:56:55 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2013-06-08 21:59:18 +0200
commit43941d9a5313fcd7fe39a61bd2eace64f7743486 (patch)
tree058abd67432fd69df63825d85ee1539469d764b7 /sw
parentbe8d06266fab13f200bae2aa1f0e953e517232cb (diff)
sal_Bool to bool and some cleanup
Change-Id: I4b20be1a3558e6b48a224e37e7f50944bb6bd237
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/pam.hxx24
-rw-r--r--sw/source/core/crsr/crsrsh.cxx2
-rw-r--r--sw/source/core/crsr/pam.cxx77
-rw-r--r--sw/source/core/crsr/paminit.cxx1
-rw-r--r--sw/source/core/crsr/swcrsr.cxx19
-rw-r--r--sw/source/core/doc/docbm.cxx2
-rw-r--r--sw/source/core/doc/docedt.cxx4
-rw-r--r--sw/source/core/doc/docnum.cxx2
-rw-r--r--sw/source/core/doc/docredln.cxx2
-rw-r--r--sw/source/core/docnode/ndcopy.cxx2
-rw-r--r--sw/source/core/docnode/ndsect.cxx8
-rw-r--r--sw/source/core/docnode/nodes.cxx7
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2
-rw-r--r--sw/source/core/inc/pamtyp.hxx15
-rw-r--r--sw/source/core/unocore/unoidx.cxx2
-rw-r--r--sw/source/core/unocore/unoportenum.cxx4
-rw-r--r--sw/source/filter/ww1/fltshell.cxx4
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx2
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx2
-rw-r--r--sw/source/ui/uno/unotxvw.cxx4
20 files changed, 91 insertions, 94 deletions
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 29fb08225817..54c20b1d8d2c 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -139,7 +139,7 @@ typedef SwMoveFnCollection* SwMoveFn;
SW_DLLPUBLIC extern SwMoveFn fnMoveForward; ///< SwPam::Move()/Find() default argument.
SW_DLLPUBLIC extern SwMoveFn fnMoveBackward;
-typedef sal_Bool (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove );
+typedef bool (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove );
SW_DLLPUBLIC extern SwGoInDoc fnGoDoc;
extern SwGoInDoc fnGoSection;
SW_DLLPUBLIC extern SwGoInDoc fnGoNode;
@@ -182,8 +182,8 @@ public:
SwPaM& operator=( const SwPaM & );
/// Movement of cursor.
- sal_Bool Move( SwMoveFn fnMove = fnMoveForward,
- SwGoInDoc fnGo = fnGoCntnt );
+ bool Move( SwMoveFn fnMove = fnMoveForward,
+ SwGoInDoc fnGo = fnGoCntnt );
/// Search.
bool Find( const com::sun::star::util::SearchOptions& rSearchOpt,
@@ -271,10 +271,10 @@ public:
/**
Normalizes PaM, i.e. sort point and mark.
- @param bPointFirst sal_True: If the point is behind the mark then swap.
- sal_False: If the mark is behind the point then swap.
+ @param bPointFirst true: If the point is behind the mark then swap.
+ false: If the mark is behind the point then swap.
*/
- SwPaM & Normalize(sal_Bool bPointFirst = sal_True);
+ SwPaM & Normalize(bool bPointFirst = true);
/// @return the document (SwDoc) at which the PaM is registered
SwDoc* GetDoc() const { return m_pPoint->nNode.GetNode().GetDoc(); }
@@ -285,14 +285,16 @@ public:
{ return bOne ? m_Bound1 : m_Bound2; }
/// Get number of page which contains cursor.
- sal_uInt16 GetPageNum( sal_Bool bAtPoint = sal_True, const Point* pLayPos = 0 );
+ sal_uInt16 GetPageNum( bool bAtPoint = true, const Point* pLayPos = 0 );
/** Is in something protected (readonly) or selection contains
something protected. */
bool HasReadonlySel( bool bFormView, bool bAnnotationMode = false ) const;
- sal_Bool ContainsPosition(const SwPosition & rPos)
- { return *Start() <= rPos && rPos <= *End(); }
+ bool ContainsPosition(const SwPosition & rPos)
+ {
+ return *Start() <= rPos && rPos <= *End();
+ }
DECL_FIXEDMEMPOOL_NEWDEL(SwPaM);
@@ -301,8 +303,8 @@ public:
};
-sal_Bool CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, sal_Bool );
-sal_Bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove );
+bool CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, bool bChkSection );
+bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove );
#endif // _PAM_HXX
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index d3f65cf73b00..c8ed632429cb 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -700,7 +700,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, sal_Bool bOnlyText, bool bBlock )
else
{
// SSelection over not allowed sections or if in header/footer -> different
- if( !CheckNodesRange( aPos.nNode, pCrsr->GetMark()->nNode, sal_True )
+ if( !CheckNodesRange( aPos.nNode, pCrsr->GetMark()->nNode, true )
|| ( pFrm && !pFrm->Frm().IsInside( pCrsr->GetMkPos() ) ))
return bRet;
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 4e8bf0bb7c48..cb89473467fe 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -212,14 +212,14 @@ static CHKSECTION lcl_TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, const SwNode
}
-static sal_Bool lcl_ChkOneRange( CHKSECTION eSec, sal_Bool bChkSections,
+static bool lcl_ChkOneRange( CHKSECTION eSec, bool bChkSections,
const SwNode& rBaseEnd, sal_uLong nStt, sal_uLong nEnd )
{
if( eSec != Chk_Both )
- return sal_False;
+ return false;
if( !bChkSections )
- return sal_True;
+ return true;
// search the surrounding section
const SwNodes& rNds = rBaseEnd.GetNodes();
@@ -228,11 +228,11 @@ static sal_Bool lcl_ChkOneRange( CHKSECTION eSec, sal_Bool bChkSections,
pNd = pNd->StartOfSectionNode();
if( pNd == rNds[ nEnd ]->StartOfSectionNode() )
- return sal_True; // same StartNode, same section
+ return true; // same StartNode, same section
// already on a base node => error
if( !pNd->StartOfSectionIndex() )
- return sal_False;
+ return false;
while( ( pTmp = pNd->StartOfSectionNode())->EndOfSectionNode() !=
&rBaseEnd )
@@ -240,17 +240,18 @@ static sal_Bool lcl_ChkOneRange( CHKSECTION eSec, sal_Bool bChkSections,
sal_uLong nSttIdx = pNd->GetIndex(), nEndIdx = pNd->EndOfSectionIndex();
return nSttIdx <= nStt && nStt <= nEndIdx &&
- nSttIdx <= nEnd && nEnd <= nEndIdx ? sal_True : sal_False;
+ nSttIdx <= nEnd && nEnd <= nEndIdx;
}
-sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd, sal_Bool bChkSection )
+bool CheckNodesRange( const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd, bool bChkSection )
{
const SwNodes& rNds = rStt.GetNodes();
sal_uLong nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex();
CHKSECTION eSec = lcl_TstIdx( nStt, nEnd, rNds.GetEndOfContent() );
- if( Chk_None != eSec ) return eSec == Chk_Both ? sal_True : sal_False;
+ if( Chk_None != eSec )
+ return eSec == Chk_Both;
eSec = lcl_TstIdx( nStt, nEnd, rNds.GetEndOfAutotext() );
if( Chk_None != eSec )
@@ -272,7 +273,7 @@ sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
return lcl_ChkOneRange( eSec, bChkSection,
rNds.GetEndOfRedlines(), nStt, nEnd );
- return sal_False; // somewhere in between => error
+ return false; // somewhere in between => error
}
@@ -299,7 +300,7 @@ SwCntntNode* GoNextNds( SwNodeIndex* pIdx, sal_Bool bChk )
if( pNd )
{
if( bChk && 1 != aIdx.GetIndex() - pIdx->GetIndex() &&
- !CheckNodesRange( *pIdx, aIdx, sal_True ) )
+ !CheckNodesRange( *pIdx, aIdx, true ) )
pNd = 0;
else
*pIdx = aIdx;
@@ -315,7 +316,7 @@ SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, sal_Bool bChk )
if( pNd )
{
if( bChk && 1 != pIdx->GetIndex() - aIdx.GetIndex() &&
- !CheckNodesRange( *pIdx, aIdx, sal_True ) )
+ !CheckNodesRange( *pIdx, aIdx, true ) )
pNd = 0;
else
*pIdx = aIdx;
@@ -494,9 +495,9 @@ void SwPaM::Exchange()
#endif
/// movement of cursor
-sal_Bool SwPaM::Move( SwMoveFn fnMove, SwGoInDoc fnGo )
+bool SwPaM::Move( SwMoveFn fnMove, SwGoInDoc fnGo )
{
- sal_Bool bRet = (*fnGo)( *this, fnMove );
+ const bool bRet = (*fnGo)( *this, fnMove );
m_bIsInFrontOfLabel = false;
@@ -537,7 +538,7 @@ SwPaM* SwPaM::MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg )
return pPam;
}
-SwPaM & SwPaM::Normalize(sal_Bool bPointFirst)
+SwPaM & SwPaM::Normalize(bool bPointFirst)
{
if (HasMark())
if ( ( bPointFirst && *m_pPoint > *m_pMark) ||
@@ -550,7 +551,7 @@ SwPaM & SwPaM::Normalize(sal_Bool bPointFirst)
}
/// return page number at cursor (for reader and page bound frames)
-sal_uInt16 SwPaM::GetPageNum( sal_Bool bAtPoint, const Point* pLayPos )
+sal_uInt16 SwPaM::GetPageNum( bool bAtPoint, const Point* pLayPos )
{
const SwCntntFrm* pCFrm;
const SwPageFrm *pPg;
@@ -592,7 +593,7 @@ static const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm )
/// is in protected section or selection surrounds something protected
bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
{
- bool bRet = sal_False;
+ bool bRet = false;
Point aTmpPt;
const SwCntntNode *pNd;
const SwCntntFrm *pFrm;
@@ -608,13 +609,13 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
if( pFrm && ( pFrm->IsProtected() ||
( bFormView && 0 == ( pSttEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
- bRet = sal_True;
+ bRet = true;
else if( pNd )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
(bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
- bRet = sal_True;
+ bRet = true;
}
if( !bRet && HasMark() && GetPoint()->nNode != GetMark()->nNode )
@@ -626,13 +627,13 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
if( pFrm && ( pFrm->IsProtected() ||
( bFormView && 0 == ( pEndEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
- bRet = sal_True;
+ bRet = true;
else if( pNd )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
(bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
- bRet = sal_True;
+ bRet = true;
}
if ( !bRet && bFormView )
@@ -640,7 +641,7 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
// Check if start and end frame are inside the _same_
// edit-in-readonly-environment. Otherwise we better return 'true'
if ( pSttEIRFrm != pEndEIRFrm )
- bRet = sal_True;
+ bRet = true;
}
// protected section in selection
@@ -672,7 +673,7 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
if( nSttIdx <= nIdx && nEndIdx >= nIdx &&
rCntnt.GetCntntIdx()->GetNode().GetNodes().IsDocNodes() )
{
- bRet = sal_True;
+ bRet = true;
break;
}
}
@@ -713,7 +714,7 @@ bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const
{
// Unhandled fieldmarks case shouldn't be edited manually to avoid breaking anything
if ( ( pA == pB ) && bUnhandledMark )
- bRet = sal_True;
+ bRet = true;
// Allow editing of commented ranges.
else if (!bCommentrangeMark)
{
@@ -877,59 +878,59 @@ void GoEndSection( SwPosition * pPos )
-sal_Bool GoInDoc( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInDoc( SwPaM & rPam, SwMoveFn fnMove )
{
(*fnMove->fnDoc)( rPam.GetPoint() );
- return sal_True;
+ return true;
}
-sal_Bool GoInSection( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInSection( SwPaM & rPam, SwMoveFn fnMove )
{
(*fnMove->fnSections)( (SwPosition*)rPam.GetPoint() );
- return sal_True;
+ return true;
}
-sal_Bool GoInNode( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInNode( SwPaM & rPam, SwMoveFn fnMove )
{
SwCntntNode *pNd = (*fnMove->fnNds)( &rPam.GetPoint()->nNode, sal_True );
if( pNd )
rPam.GetPoint()->nContent.Assign( pNd,
::GetSttOrEnd( fnMove == fnMoveForward, *pNd ) );
- return 0 != pNd;
+ return pNd;
}
-sal_Bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CHARS ))
- return sal_True;
+ return true;
return GoInNode( rPam, fnMove );
}
-sal_Bool GoInCntntCells( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInCntntCells( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CELLS ))
- return sal_True;
+ return true;
return GoInNode( rPam, fnMove );
}
-sal_Bool GoInCntntSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInCntntSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CHARS | CRSR_SKIP_HIDDEN ) )
- return sal_True;
+ return true;
return GoInNode( rPam, fnMove );
}
-sal_Bool GoInCntntCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
+bool GoInCntntCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CELLS | CRSR_SKIP_HIDDEN ) )
- return sal_True;
+ return true;
return GoInNode( rPam, fnMove );
}
diff --git a/sw/source/core/crsr/paminit.cxx b/sw/source/core/crsr/paminit.cxx
index 2093c3e9420a..17fe0e0660f0 100644
--- a/sw/source/core/crsr/paminit.cxx
+++ b/sw/source/core/crsr/paminit.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <pam.hxx>
#include <pamtyp.hxx>
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 73a9edd60f0f..af9dd9010b12 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -200,7 +200,7 @@ bool SwTableCursor::IsSelOvrCheck(int eFlags)
&& HasMark() )
{
SwNodeIndex aOldPos( rNds, GetSavePos()->nNode );
- if( !CheckNodesRange( aOldPos, GetPoint()->nNode, sal_True ))
+ if( !CheckNodesRange( aOldPos, GetPoint()->nNode, true ))
{
GetPoint()->nNode = aOldPos;
GetPoint()->nContent.Assign( GetCntntNode(), GetSavePos()->nCntnt );
@@ -256,8 +256,8 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
}
int bIsValidPos = 0 != pCNd;
- sal_Bool bValidNodesRange = bIsValidPos &&
- ::CheckNodesRange( rPtIdx, aIdx, sal_True );
+ const bool bValidNodesRange = bIsValidPos &&
+ ::CheckNodesRange( rPtIdx, aIdx, true );
if( !bValidNodesRange )
{
rPtIdx = pSavePos->nNode;
@@ -385,7 +385,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
return sal_False;
// check for invalid sections
- if( !::CheckNodesRange( GetMark()->nNode, GetPoint()->nNode, sal_True ))
+ if( !::CheckNodesRange( GetMark()->nNode, GetPoint()->nNode, true ))
{
DeleteMark();
RestoreSavePos();
@@ -454,7 +454,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
// we permit these
if( pMyNd->IsCntntNode() &&
::CheckNodesRange( GetMark()->nNode,
- GetPoint()->nNode, sal_True ))
+ GetPoint()->nNode, true ))
{
// table in table
const SwTableNode* pOuterTableNd = pMyNd->FindTableNode();
@@ -1604,8 +1604,7 @@ sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
{
SwNodeIndex aOldNodeIdx( GetPoint()->nNode );
- bool bSuccess = Move( fnMove, fnGo );
- if ( !bSuccess )
+ if ( !Move( fnMove, fnGo ) )
break;
// If we were located inside a covered cell but our position has been
@@ -1643,8 +1642,7 @@ sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
GetPoint()->nContent.Assign( pCntntNode, nTmpPos );
// Redo the move:
- bSuccess = Move( fnMove, fnGo );
- if ( !bSuccess )
+ if ( !Move( fnMove, fnGo ) )
break;
}
}
@@ -1779,8 +1777,7 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
}
// It is allowed to move footnotes in other footnotes but not sections
- const sal_Bool bChkRange = pFrm->IsInFtn() && !HasMark()
- ? sal_False : sal_True;
+ const bool bChkRange = pFrm->IsInFtn() && !HasMark();
const SwPosition aOldPos( *GetPoint() );
sal_Bool bInReadOnly = IsReadOnlyAvailable();
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index ab8319998cfd..d7f74ef63a22 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1135,7 +1135,7 @@ void SaveBookmark::SetInDoc(
}
if(!aPam.HasMark()
- || CheckNodesRange(aPam.GetPoint()->nNode, aPam.GetMark()->nNode, sal_True))
+ || CheckNodesRange(aPam.GetPoint()->nNode, aPam.GetMark()->nNode, true))
{
::sw::mark::IBookmark* const pBookmark = dynamic_cast< ::sw::mark::IBookmark* >(pDoc->getIDocumentMarkAccess()->makeMark(aPam, m_aName, m_eOrigBkmType));
if(pBookmark)
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index f169ae5a5172..c3ebae4974a0 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -924,7 +924,7 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
// the manipulated range.
// If there's no content anymore, set it to the StartNode (that's
// always there).
- sal_Bool bNullCntnt = !aSavePam.Move( fnMoveBackward, fnGoCntnt );
+ const bool bNullCntnt = !aSavePam.Move( fnMoveBackward, fnGoCntnt );
if( bNullCntnt )
{
aSavePam.GetPoint()->nNode--;
@@ -2168,7 +2168,7 @@ bool SwDoc::ReplaceRange( SwPaM& rPam, const String& rStr,
::std::vector<xub_StrLen> Breaks;
SwPaM aPam( *rPam.GetMark(), *rPam.GetPoint() );
- aPam.Normalize(sal_False);
+ aPam.Normalize(false);
if (aPam.GetPoint()->nNode != aPam.GetMark()->nNode)
{
aPam.Move(fnMoveBackward);
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 038f01eea263..2be80a9437b4 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1935,7 +1935,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv )
/* aInsPos points to the non-content node. Move it to
the previous content node. */
SwPaM aInsPam(aInsPos);
- sal_Bool bMoved = aInsPam.Move(fnMoveBackward);
+ const bool bMoved = aInsPam.Move(fnMoveBackward);
OSL_ENSURE(bMoved, "No content node found!");
if (bMoved)
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index a6a92a144543..11e6c6b64ccc 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -3825,7 +3825,7 @@ bool SwDoc::IsInRedlines(const SwNode & rNode) const
SwPaM aPam(SwPosition(*rEndOfRedlines.StartOfSectionNode()),
SwPosition(rEndOfRedlines));
- return aPam.ContainsPosition(aPos) ? true : false;
+ return aPam.ContainsPosition(aPos);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index deefc128203d..7df0ae4e5d9c 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -884,7 +884,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// Move the PaM one node back from the insert position, so that
// the position doesn't get moved
pCopyPam->SetMark();
- sal_Bool bCanMoveBack = pCopyPam->Move(fnMoveBackward, fnGoCntnt);
+ bool bCanMoveBack = pCopyPam->Move(fnMoveBackward, fnGoCntnt);
// If the position was shifted from more than one node, an end node has been skipped
bool bAfterTable = false;
if ((rPos.nNode.GetIndex() - pCopyPam->GetPoint()->nNode.GetIndex()) > 1)
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 9c389f1b906a..a071de55637c 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -131,13 +131,13 @@ static void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSectionData& rSectionData,
{
SwNodeIndex aIdx( rStt );
if( !rNds.GoPrevSection( &aIdx, sal_True, sal_False ) ||
- !CheckNodesRange( rStt, aIdx, sal_True ) ||
+ !CheckNodesRange( rStt, aIdx, true ) ||
// #i21457#
!lcl_IsInSameTblBox( rNds, rStt, true ))
{
aIdx = rEnd;
if( !rNds.GoNextSection( &aIdx, sal_True, sal_False ) ||
- !CheckNodesRange( rEnd, aIdx, sal_True ) ||
+ !CheckNodesRange( rEnd, aIdx, true ) ||
// #i21457#
!lcl_IsInSameTblBox( rNds, rEnd, false ))
{
@@ -1206,13 +1206,13 @@ void SwSectionNode::DelFrms()
{
SwNodeIndex aIdx( *this );
if( !rNds.GoPrevSection( &aIdx, sal_True, sal_False ) ||
- !CheckNodesRange( *this, aIdx, sal_True ) ||
+ !CheckNodesRange( *this, aIdx, true ) ||
// #i21457#
!lcl_IsInSameTblBox( rNds, *this, true ))
{
aIdx = *EndOfSectionNode();
if( !rNds.GoNextSection( &aIdx, sal_True, sal_False ) ||
- !CheckNodesRange( *EndOfSectionNode(), aIdx, sal_True ) ||
+ !CheckNodesRange( *EndOfSectionNode(), aIdx, true ) ||
// #i21457#
!lcl_IsInSameTblBox( rNds, *EndOfSectionNode(), false ))
{
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 543aa24d1f76..61c309829977 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -42,9 +42,6 @@
#include <docsh.hxx>
#include <svl/smplhint.hxx>
-extern sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd, sal_Bool bChkSection );
-
typedef std::vector<SwStartNode*> SwSttNdPtrs;
@@ -2230,7 +2227,7 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
// suche nach vorne/hinten nach einem Content Node
else if( 0 != ( pFrmNd = GoPrevSection( &aIdx, sal_True, sal_False )) &&
- ::CheckNodesRange( aIdx, rFrmIdx, sal_True ) &&
+ ::CheckNodesRange( aIdx, rFrmIdx, true ) &&
// nach vorne nie aus der Tabelle hinaus!
pFrmNd->FindTableNode() == pTableNd &&
// Bug 37652: nach hinten nie aus der Tabellenzelle hinaus!
@@ -2252,7 +2249,7 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
// JP 19.09.93: aber nie die Section dafuer verlassen !!
if( ( pEnd && ( pFrmNd = &aIdx.GetNode())->IsCntntNode() ) ||
( 0 != ( pFrmNd = GoNextSection( &aIdx, sal_True, sal_False )) &&
- ::CheckNodesRange( aIdx, rFrmIdx, sal_True ) &&
+ ::CheckNodesRange( aIdx, rFrmIdx, true ) &&
( pFrmNd->FindTableNode() == pTableNd &&
// Bug 37652: nach hinten nie aus der Tabellenzelle hinaus!
(!pFrmNd->FindTableNode() || pFrmNd->FindTableBoxStartNode()
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 7fc3756b5ec7..f8cebfe4249f 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -807,7 +807,7 @@ void SwFEShell::Insert( const String& rGrfName, const String& rFltName,
if( !pAnchor->GetPageNum() )
{
pAnchor->SetPageNum( pCursor->GetPageNum(
- sal_True, &pCursor->GetPtPos() ) );
+ true, &pCursor->GetPtPos() ) );
}
break;
default :
diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx
index 5796c33b1bed..b20c4e9794a6 100644
--- a/sw/source/core/inc/pamtyp.hxx
+++ b/sw/source/core/inc/pamtyp.hxx
@@ -21,7 +21,6 @@
#define _PAMTYP_HXX
#include <unotools/textsearch.hxx>
-#include <pam.hxx>
#include <node.hxx>
#include <tools/string.hxx>
@@ -36,13 +35,13 @@ void GoStartDoc( SwPosition*);
void GoEndDoc( SwPosition*);
void GoStartSection( SwPosition*);
void GoEndSection( SwPosition*);
-sal_Bool GoInDoc( SwPaM&, SwMoveFn);
-sal_Bool GoInSection( SwPaM&, SwMoveFn);
-sal_Bool GoInNode( SwPaM&, SwMoveFn);
-sal_Bool GoInCntnt( SwPaM&, SwMoveFn);
-sal_Bool GoInCntntCells( SwPaM&, SwMoveFn);
-sal_Bool GoInCntntSkipHidden( SwPaM&, SwMoveFn);
-sal_Bool GoInCntntCellsSkipHidden( SwPaM&, SwMoveFn);
+bool GoInDoc( SwPaM&, SwMoveFn);
+bool GoInSection( SwPaM&, SwMoveFn);
+bool GoInNode( SwPaM&, SwMoveFn);
+bool GoInCntnt( SwPaM&, SwMoveFn);
+bool GoInCntntCells( SwPaM&, SwMoveFn);
+bool GoInCntntSkipHidden( SwPaM&, SwMoveFn);
+bool GoInCntntCellsSkipHidden( SwPaM&, SwMoveFn);
const SwTxtAttr* GetFrwrdTxtHint( const SwpHints&, sal_uInt16&, xub_StrLen );
const SwTxtAttr* GetBkwrdTxtHint( const SwpHints&, sal_uInt16&, xub_StrLen );
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 4dcb59b94e8c..cda70a19a7a9 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1917,7 +1917,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
// n.b.: toxmarks must have either alternative text or an extent
if (bMark && rMark.GetAlternativeText().Len())
{
- rPam.Normalize(sal_True);
+ rPam.Normalize(true);
rPam.DeleteMark();
bMark = false;
}
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 5bfac66fadd1..a7a0dec29ada 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -785,7 +785,7 @@ lcl_ExportHints(
xParent, pUnoCrsr, *pAttr, false);
if (bIsPoint) // consume CH_TXTATR!
{
- pUnoCrsr->Normalize(sal_False);
+ pUnoCrsr->Normalize(false);
pUnoCrsr->DeleteMark();
xRef = xTmp;
}
@@ -1091,7 +1091,7 @@ lcl_CreatePortions(
{
if (pUnoCrsr->HasMark())
{
- pUnoCrsr->Normalize(sal_False);
+ pUnoCrsr->Normalize(false);
pUnoCrsr->DeleteMark();
}
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 634d4bc9ff21..c78c0a48cf38 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -140,11 +140,11 @@ bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, bool bCheck,
}
rRegion.GetPoint()->nContent.Assign(pCNd, rPtPos.m_nCntnt);
OSL_ENSURE( CheckNodesRange( rRegion.Start()->nNode,
- rRegion.End()->nNode, sal_True ),
+ rRegion.End()->nNode, true ),
"atttribute or similar crosses section-boundaries" );
if( bCheck )
return CheckNodesRange( rRegion.Start()->nNode,
- rRegion.End()->nNode, sal_True );
+ rRegion.End()->nNode, true );
else
return true;
}
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index b4f85a540016..e1118e0153b3 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -647,7 +647,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
else if ( bIgnoreRedlines ||
!CheckNodesRange( aPaM.GetPoint()->nNode,
aPaM.GetMark()->nNode,
- sal_True ) )
+ true ) )
{
// ignore redline (e.g. file loaded in insert mode):
// delete 'deleted' redlines and forget about the whole thing
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 84e2930e497b..5dd294390dd2 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -176,7 +176,7 @@ static SwPrintUIOptions * lcl_GetPrintUIOptions(
if (pSh)
{
SwPaM* pShellCrsr = pSh->GetCrsr();
- nCurrentPage = pShellCrsr->GetPageNum(sal_True, 0);
+ nCurrentPage = pShellCrsr->GetPageNum(true, 0);
}
else if (!bSwSrcView)
{
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index cefcc8bc5243..98adb3a5f67f 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -1307,12 +1307,12 @@ sal_Bool SwXTextViewCursor::jumpToStartOfPage(void) throw( uno::RuntimeException
sal_Int16 SwXTextViewCursor::getPage(void) throw( uno::RuntimeException )
{
SolarMutexGuard aGuard;
- short nRet = 0;
+ sal_Int16 nRet = 0;
if(m_pView)
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- nRet = (short)pShellCrsr->GetPageNum( sal_True, 0 );
+ nRet = static_cast<sal_Int16>(pShellCrsr->GetPageNum( true, 0 ));
}
else
throw uno::RuntimeException();