summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-10-30 13:45:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-10-31 20:36:08 +0100
commitae323dfc4c031289d341a4152fc756c1433ea2e1 (patch)
treebd7c3de12cb5cb14cbe0d74c7c2ea9e1cf929b8e /sw
parent9c1ed3d4396400e2be30c74a6c9af89cf4cc80b7 (diff)
tdf#126788 inline createTextCursorByRange into this call site
Change-Id: I1ee91ff56f4c5e0c0182f67a9c321e914ec6cd77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142039 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/xml/xmltbli.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 4be7ca9f5f7a..755ee6428b83 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -2715,9 +2715,13 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
const auto pNewCursor(pDoc->CreateUnoCursor(SwPosition( *pCNd )));
rtl::Reference<SwXTextRange> xTextRange = new SwXTextRange(*pNewCursor, xParent,
SwXTextRange::RANGE_IN_CELL);
- Reference < XTextCursor > xTextCursor =
- xParent->createTextCursorByRange( xTextRange );
- GetImport().GetTextImport()->SetCursor( xTextCursor );
+ DBG_TESTSOLARMUTEX();
+ SwUnoInternalPaM aPam(*pDoc);
+ ::sw::XTextRangeToSwPaM(aPam, xTextRange);
+ rtl::Reference<SwXTextCursor> xTextCursor =
+ new SwXTextCursor(*pDoc, xParent, CursorType::TableText,
+ *aPam.GetPoint(), aPam.GetMark());
+ GetImport().GetTextImport()->SetCursor( static_cast<XWordCursor*>(xTextCursor.get()) );
}
}