summaryrefslogtreecommitdiff
path: root/sw/source/core/text/itrcrsr.cxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-06-01 20:34:02 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-06-08 21:51:35 +0200
commit2c350b0caa5f152cae38f8aaf7af45a997a738fd (patch)
tree5f64eeffd5e8bdd6cd20ed2b25fa9b6a4f1d262c /sw/source/core/text/itrcrsr.cxx
parente7a03bc3f6a94c7e5ab2901dd7008be056658a94 (diff)
sw_redlinehide: trivial GetNode() in text
Change-Id: Ied6e80e30ced49b11952c44c36e86e8575e42c0f
Diffstat (limited to 'sw/source/core/text/itrcrsr.cxx')
-rw-r--r--sw/source/core/text/itrcrsr.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index b89ade928e9e..4103b8505b77 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1769,10 +1769,7 @@ bool SwTextFrame::FillSelection( SwSelectionList& rSelList, const SwRect& rRect
{
SwRect aRect( aTmpFrame );
aRect.Intersection( rRect );
- // rNode without const to create SwPaMs
- SwContentNode &rNode = const_cast<SwContentNode&>( *GetNode() );
- SwNodeIndex aIdx( rNode );
- SwPosition aPosL( aIdx, SwIndex( &rNode, 0 ) );
+ SwPosition aPosL( MapViewToModelPos(TextFrameIndex(0)) );
if( IsEmpty() )
{
SwPaM *pPam = new SwPaM( aPosL, aPosL );
@@ -1780,7 +1777,7 @@ bool SwTextFrame::FillSelection( SwSelectionList& rSelList, const SwRect& rRect
}
else if( aRect.HasArea() )
{
- sal_Int32 nOld = -1;
+ SwPosition aOld(aPosL.nNode.GetNodes().GetEndOfContent());
SwPosition aPosR( aPosL );
Point aPoint;
SwTextInfo aInf( const_cast<SwTextFrame*>(this) );
@@ -1844,11 +1841,11 @@ bool SwTextFrame::FillSelection( SwSelectionList& rSelList, const SwRect& rRect
// which could happen e.g. for field portions or fly frames
// a SwPaM will be inserted with these positions
if( GetCursorOfst( &aPosR, aPoint, &aState ) &&
- nOld != aPosL.nContent.GetIndex() )
+ aOld != aPosL)
{
SwPaM *pPam = new SwPaM( aPosL, aPosR );
rSelList.insertPaM( pPam );
- nOld = aPosL.nContent.GetIndex();
+ aOld = aPosL;
}
}
}