summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-02-19 17:32:48 +0100
committerMichael Stahl <mstahl@redhat.com>2016-02-19 17:48:10 +0100
commitfabc45a6a902c8988eff087831f8b2f84ea8ae6c (patch)
tree8112c3c8244fadd107441659f3c170e86491790d
parentf2984e95740cfbb9c74574f2a1225af3411d4901 (diff)
sw: tdf#63022 fix drag-and-drop of text in same paragraph
SplitNode() inserts new node before the existing one, so pEndTextNd and aRg.aEnd point one node too far. Change-Id: I6cea44fafd9d2b47e77e76892a260c5a8c6849fc
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 750dcbec8900..334e72c7602e 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4264,18 +4264,16 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
rPam.Move( fnMoveBackward, fnGoContent );
if( bChg )
rPam.Exchange();
-
- aRg.aEnd = pEnd->nNode;
- pEndTextNd = pEnd->nNode.GetNode().GetTextNode();
}
else if( rPos == *pEnd )
{
// The end was also moved
pEnd->nNode--;
pEnd->nContent.Assign( pDestTextNd, nContentEnd );
- aRg.aEnd = pEnd->nNode;
- pEndTextNd = pEnd->nNode.GetNode().GetTextNode();
}
+ // tdf#63022 always reset pEndTextNd after SplitNode
+ aRg.aEnd = pEnd->nNode;
+ pEndTextNd = pEnd->nNode.GetNode().GetTextNode();
}
NUMRULE_STATE