Kaydet (Commit) e2ae01d4 authored tarafından Matteo Casalin's avatar Matteo Casalin

sal_Bool to bool

Change-Id: I6a1fb3daf5e41c55c2174ae5996302123e613511
üst 580dc29e
......@@ -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;
......
......@@ -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;
};
......
......@@ -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* ) {}
......
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment