summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/swcrsr.hxx4
-rw-r--r--sw/inc/viscrs.hxx10
-rw-r--r--sw/source/core/crsr/swcrsr.cxx14
-rw-r--r--sw/source/core/crsr/viscrs.cxx16
4 files changed, 22 insertions, 22 deletions
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index e29c960fd335..0b71ec5caf16 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -196,8 +196,8 @@ public:
/** Restore cursor state to the one saved by SwCrsrSaveState **/
void RestoreSavePos();
- // sal_True: cursor can be set at this position.
- virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
+ // true: cursor can be set at this position.
+ virtual bool IsAtValidPos( bool bPoint = true ) const;
// Is cursor allowed in ready only ranges?
virtual bool IsReadOnlyAvailable() const;
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 525e8f633ad4..89a0ffcc6c93 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -151,8 +151,8 @@ public:
bool UpDown( bool bUp, sal_uInt16 nCnt = 1 );
- // sal_True: Cursor can be set to this position.
- virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
+ // true: Cursor can be set to this position.
+ virtual bool IsAtValidPos( bool bPoint = true ) const;
virtual bool IsReadOnlyAvailable() const;
@@ -175,7 +175,7 @@ public:
virtual void FillRects(); // For table and normal cursor.
// Check if SPoint is within table SSelection.
- sal_Bool IsInside( const Point& rPt ) const;
+ bool IsInside( const Point& rPt ) const;
virtual void SetMark();
virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
@@ -183,8 +183,8 @@ public:
virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
- // sal_True: Cursor can be set to this position.
- virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
+ // true: Cursor can be set to this position.
+ virtual bool IsAtValidPos( bool bPoint = true ) const;
};
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 43a77ee140ec..26b655108631 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -686,7 +686,7 @@ SetPrevCrsr:
}
/// Return <true> if cursor can be set to this position
-sal_Bool SwCursor::IsAtValidPos( sal_Bool bPoint ) const
+bool SwCursor::IsAtValidPos( bool bPoint ) const
{
const SwDoc* pDoc = GetDoc();
const SwPosition* pPos = bPoint ? GetPoint() : GetMark();
@@ -695,23 +695,23 @@ sal_Bool SwCursor::IsAtValidPos( sal_Bool bPoint ) const
if( pNd->IsCntntNode() && !((SwCntntNode*)pNd)->getLayoutFrm( pDoc->GetCurrentLayout() ) &&
!dynamic_cast<const SwUnoCrsr*>(this) )
{
- return sal_False;
+ return false;
}
// #i45129# - in UI-ReadOnly everything is allowed
if( !pDoc->GetDocShell() || !pDoc->GetDocShell()->IsReadOnlyUI() )
- return sal_True;
+ return true;
- sal_Bool bCrsrInReadOnly = IsReadOnlyAvailable();
+ const bool bCrsrInReadOnly = IsReadOnlyAvailable();
if( !bCrsrInReadOnly && pNd->IsProtect() )
- return sal_False;
+ return false;
const SwSectionNode* pSectNd = pNd->FindSectionNode();
if( pSectNd && (pSectNd->GetSection().IsHiddenFlag() ||
( !bCrsrInReadOnly && pSectNd->GetSection().IsProtectFlag() )))
- return sal_False;
+ return false;
- return sal_True;
+ return true;
}
void SwCursor::SaveTblBoxCntnt( const SwPosition* ) {}
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 42c5562fa149..a6f349bda9c1 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -137,7 +137,7 @@ void SwVisCrsr::_SetPosAndShow()
if( rNode.IsTxtNode() )
{
const SwTxtNode& rTNd = *rNode.GetTxtNode();
- const SwFrm* pFrm = rTNd.getLayoutFrm( m_pCrsrShell->GetLayout(), 0, 0, sal_False );
+ const SwFrm* pFrm = rTNd.getLayoutFrm( m_pCrsrShell->GetLayout(), 0, 0, false );
if ( pFrm )
{
const SwScriptInfo* pSI = ((SwTxtFrm*)pFrm)->GetScriptInfo();
@@ -630,13 +630,13 @@ bool SwShellCrsr::UpDown( bool bUp, sal_uInt16 nCnt )
}
// if <true> than the cursor can be set to the position.
-sal_Bool SwShellCrsr::IsAtValidPos( sal_Bool bPoint ) const
+bool SwShellCrsr::IsAtValidPos( bool bPoint ) const
{
if( GetShell() && ( GetShell()->IsAllProtect() ||
GetShell()->GetViewOptions()->IsReadonly() ||
( GetShell()->Imp()->GetDrawView() &&
GetShell()->Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() )))
- return sal_True;
+ return true;
return SwCursor::IsAtValidPos( bPoint );
}
@@ -726,11 +726,11 @@ void SwShellTableCrsr::FillRects()
}
// Check if the SPoint is within the Table-SSelection.
-sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
+bool SwShellTableCrsr::IsInside( const Point& rPt ) const
{
// Calculate the new rectangles. If the cursor is still "parked" do nothing
if (m_SelectedBoxes.empty() || bParked || !GetPoint()->nNode.GetIndex())
- return sal_False;
+ return false;
SwNodes& rNds = GetDoc()->GetNodes();
for (size_t n = 0; n < m_SelectedBoxes.size(); ++n)
@@ -745,12 +745,12 @@ sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
pFrm = pFrm->GetUpper();
OSL_ENSURE( pFrm, "Node not in a table" );
if( pFrm && pFrm->Frm().IsInside( rPt ) )
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
-sal_Bool SwShellTableCrsr::IsAtValidPos( sal_Bool bPoint ) const
+bool SwShellTableCrsr::IsAtValidPos( bool bPoint ) const
{
return SwShellCrsr::IsAtValidPos( bPoint );
}