summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/unocore/unotext.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index f32836a11ff3..78cce4887deb 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1352,10 +1352,12 @@ SwXText::insertTextPortion(
if (!rText.isEmpty())
{
+ SwNodeIndex const nodeIndex(rCursor.GetPoint()->nNode, -1);
const sal_Int32 nContentPos = rCursor.GetPoint()->nContent.GetIndex();
SwUnoCursorHelper::DocInsertStringSplitCR(
*m_pImpl->m_pDoc, rCursor, rText, false);
SwUnoCursorHelper::SelectPam(rCursor, true);
+ rCursor.GetPoint()->nNode = SwNodeIndex(nodeIndex, +1);
rCursor.GetPoint()->nContent = nContentPos;
}