Kaydet (Commit) b9264a4f authored tarafından jp's avatar jp

IsSelOvr: skip over hidden paragraphs

üst e5dfee73
......@@ -2,9 +2,9 @@
*
* $RCSfile: swcrsr.cxx,v $
*
* $Revision: 1.7 $
* $Revision: 1.8 $
*
* last change: $Author: jp $ $Date: 2000-11-20 16:37:48 $
* last change: $Author: jp $ $Date: 2001-01-15 17:37:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -400,12 +400,41 @@ FASTBOOL SwCursor::IsSelOvr( int eFlags )
// neu: Bereiche ueberpruefen
const SwNode* pNd = &GetPoint()->nNode.GetNode();
if( pNd->IsCntntNode() && !((SwCntntNode*)pNd)->GetFrm() &&
0 == (SwUnoCrsr*)*this )
if( pNd->IsCntntNode() && 0 == (SwUnoCrsr*)*this )
{
DeleteMark();
RestoreSavePos();
return TRUE; // ohne Frames geht gar nichts!
const SwCntntFrm* pFrm = ((SwCntntNode*)pNd)->GetFrm();
if( pFrm && 0 == pFrm->Frm().Height() &&
0 != ( SELOVER_CHANGEPOS & eFlags ) )
{
// skip to the next / prev valida paragraph with a layout
SwNodeIndex& rPtIdx = GetPoint()->nNode;
int bGoNxt = pSavePos->nNode < rPtIdx.GetIndex();
while( 0 != ( pFrm = ( bGoNxt ? pFrm->GetNextCntntFrm()
: pFrm->GetPrevCntntFrm() )) &&
0 == pFrm->Frm().Height() )
;
SwCntntNode* pCNd;
if( pFrm && 0 != (pCNd = (SwCntntNode*)pFrm->GetNode()) )
{
// set this cntntNode as new position
rPtIdx = *pCNd;
// ContentIndex noch anmelden:
xub_StrLen nTmpPos = bGoNxt ? 0 : pCNd->Len();
GetPoint()->nContent.Assign( pCNd, nTmpPos );
// sollten wir in einer Tabelle gelandet sein?
if( IsInProtectTable( TRUE ) )
pFrm = 0;
}
}
if( !pFrm )
{
DeleteMark();
RestoreSavePos();
return TRUE; // ohne Frames geht gar nichts!
}
}
// darf der Cursor in geschuetzen "Nodes" stehen?
......
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