Kaydet (Commit) 3b6a4c3b authored tarafından Oliver-Rainer Wittmann's avatar Oliver-Rainer Wittmann Kaydeden (comit) Caolán McNamara

Resolves: #i123979# treat application of new position due to...

content frame without height to next/previous content frame as restore to saved
position, if new position equals the saved one.

This avoid cursor traveling loops due to hidden content at the beginning/end of
the text document.

(cherry picked from commit 83510855)

Conflicts:
	sw/source/core/crsr/swcrsr.cxx

Change-Id: Ie8b6b80e9445d711bfce2143199c49ee238ce23e
üst 1484eee9
...@@ -347,18 +347,31 @@ sal_Bool SwCursor::IsSelOvr( int eFlags ) ...@@ -347,18 +347,31 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
} }
} }
SwCntntNode* pCNd; SwCntntNode* pCNd = (pFrm != NULL) ? (SwCntntNode*)pFrm->GetNode() : NULL;
if( pFrm && 0 != (pCNd = (SwCntntNode*)pFrm->GetNode()) ) if ( pCNd != NULL )
{ {
// set this CntntNode as new position // set this CntntNode as new position
rPtIdx = *pCNd; rPtIdx = *pCNd;
pNd = pCNd; pNd = pCNd;
// register ContentIndex: // assign corresponding ContentIndex
GetPoint()->nContent.Assign( pCNd, bGoNxt ? 0 : pCNd->Len() ); const sal_Int32 nTmpPos = bGoNxt ? 0 : pCNd->Len();
GetPoint()->nContent.Assign( pCNd, nTmpPos );
if( IsInProtectTable( sal_True ) ) if ( rPtIdx.GetIndex() == pSavePos->nNode
pFrm = 0; && nTmpPos == pSavePos->nCntnt )
{
// new position equals saved one
// --> trigger restore of saved pos by setting <pFrm> to NULL - see below
pFrm = NULL;
}
if ( IsInProtectTable( sal_True ) )
{
// new position in protected table
// --> trigger restore of saved pos by setting <pFrm> to NULL - see below
pFrm = NULL;
}
} }
} }
......
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