diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2016-11-19 19:20:58 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-17 12:32:14 +0100 |
commit | bec45bc9f88545ec397c1f11f39f946087ee06fc (patch) | |
tree | ad5d4ee462714ddf3b89f0a30185db5b0357291e /sw/source/core/docnode | |
parent | 1c08313e1ef7fe3d753634fccdfcda31cc88691e (diff) |
tdf#104032: use correct text length
Reviewed-on: https://gerrit.libreoffice.org/30980
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 7c43cba9804e70b23b71783d362401c75f9caa54)
Change-Id: I16e6af179be3d7bee947c4054ae4fa6924b298f0
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r-- | sw/source/core/docnode/nodes.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index e5846b55c16d..1e0b282cfe43 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -1479,7 +1479,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) // move the content into the new node bool bOneNd = pStt->nNode == pEnd->nNode; const sal_Int32 nLen = - ( (bOneNd) ? pEnd->nContent.GetIndex() : pSrcNd->Len() ) + ( (bOneNd) ? std::min(pEnd->nContent.GetIndex(), pSrcNd->Len()) : pSrcNd->Len() ) - pStt->nContent.GetIndex(); if( !pEnd->nNode.GetNode().IsContentNode() ) |