summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-02-19 17:32:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-02-19 20:16:00 +0000
commit9f0e9c7c52fe2685838cfd9f71a44105a3688d1d (patch)
tree4f5619236f53761a22cc6e5d2e8757fa27d55391
parentea32554ad0be02d3946eb19c96b2c29081ef66d9 (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 (cherry picked from commit fabc45a6a902c8988eff087831f8b2f84ea8ae6c) Reviewed-on: https://gerrit.libreoffice.org/22510 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 8fdc82442736..2138bf3e6d58 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4259,18 +4259,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