sw/source/filter/xml/xmltbli.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit 9c1ed3d4396400e2be30c74a6c9af89cf4cc80b7 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Oct 30 13:25:32 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Oct 31 20:35:29 2022 +0100 tdf#126788 inline CreateParentXText into this call site Change-Id: Ib2defa8789180924405f29432736f7e03f80b9c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142038 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 0ebda388c152..4be7ca9f5f7a 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -2710,14 +2710,13 @@ const SwStartNode *SwXMLTableContext::InsertTableSection( m_pBox1->m_pStartNode = pStNd; SwContentNode *pCNd = pDoc->GetNodes()[ pStNd->GetIndex() + 1 ] ->GetContentNode(); - SwPosition aPos( *pCNd ); - - Reference < XText > xText = ::sw::CreateParentXText(*pDoc, aPos); - const auto pNewCursor(pDoc->CreateUnoCursor(aPos)); - rtl::Reference<SwXTextRange> xTextRange = new SwXTextRange(*pNewCursor, xText, + SwFrameFormat *const pTableFormat = m_pTableNode->GetTable().GetFrameFormat(); + rtl::Reference<SwXCell> xParent = SwXCell::CreateXCell( pTableFormat, m_pBox1 ); + const auto pNewCursor(pDoc->CreateUnoCursor(SwPosition( *pCNd ))); + rtl::Reference<SwXTextRange> xTextRange = new SwXTextRange(*pNewCursor, xParent, SwXTextRange::RANGE_IN_CELL); Reference < XTextCursor > xTextCursor = - xText->createTextCursorByRange( xTextRange ); + xParent->createTextCursorByRange( xTextRange ); GetImport().GetTextImport()->SetCursor( xTextCursor ); } }