sw/source/filter/xml/xmltbli.cxx |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit ae86dfdc05545ca4ec67f0434737baa92892b79f
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Nov 1 10:04:24 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Nov 1 11:25:38 2022 +0100

    tdf#126788 inline the SwXTextRange into this call site
    
    Change-Id: If91b5e952152fdb829ff936f2f82b4c5e6aa7bea
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142091
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 755ee6428b83..44ae125d30b0 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -2705,19 +2705,14 @@ const SwStartNode 
*SwXMLTableContext::InsertTableSection(
                                                  pColl );
         // Consider the case that a table is defined without a row.
         if( !pPrevSttNd && m_pBox1 != nullptr )
-
         {
             m_pBox1->m_pStartNode = pStNd;
             SwContentNode *pCNd = pDoc->GetNodes()[ pStNd->GetIndex() + 1 ]
                                                             ->GetContentNode();
             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);
             DBG_TESTSOLARMUTEX();
-            SwUnoInternalPaM aPam(*pDoc);
-            ::sw::XTextRangeToSwPaM(aPam, xTextRange);
+            SwPaM aPam(*pCNd, *pCNd);
             rtl::Reference<SwXTextCursor> xTextCursor =
                 new SwXTextCursor(*pDoc, xParent, CursorType::TableText,
                 *aPam.GetPoint(), aPam.GetMark());

Reply via email to