summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-01-22 23:30:46 +0100
committerMichael Stahl <mstahl@redhat.com>2015-01-23 11:05:24 +0100
commitc5b6b206c0e80fae7de4d452334541d2198d41ba (patch)
tree9169f107f14468f786bbec1e443630151da9c28c /sw
parentea1d8c5ab3183f67c27683133d286725b4fa98bc (diff)
sw: redo check in SwFEShell::FindAnchorPos() a bit (related: fdo#87760)
The only valid non-txtnode return value for the SwPosition is the unmodified initial value (hopefully). Change-Id: Ib5789455576a20848dd7f0542bd520aa04040b90
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/frmedt/fefly1.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index bdae991b66ea..48f78e60197c 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -427,11 +427,12 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() );
Point aTmpPnt( rAbsPos );
GetLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState );
- if ( nAnchorId != FLY_AT_CHAR
- || !PosInsideInputFld( aPos ) )
+ if (aPos.nNode != GetDoc()->GetNodes().GetEndOfExtras().GetIndex()
+ && (nAnchorId != FLY_AT_CHAR || !PosInsideInputFld(aPos)))
{
SwCntntNode* pCNode = aPos.nNode.GetNode().GetCntntNode();
- pTxtFrm = pCNode ? pCNode->getLayoutFrm(GetLayout(), 0, &aPos, false) : NULL;
+ assert(pCNode);
+ pTxtFrm = pCNode->getLayoutFrm(GetLayout(), 0, &aPos, false);
}
}
const SwFrm *pNewAnch = NULL;