sw/source/core/doc/DocumentFieldsManager.cxx |    3 +--
 sw/source/core/doc/DocumentLayoutManager.cxx |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 1988782c8131d307aff14bdaf7feabd8a5bc3214
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Sep 25 19:18:47 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Sep 25 21:00:24 2022 +0200

    use more SwPosition::SetContent
    
    part of the process of hiding the internals of SwPosition
    
    Change-Id: Idc0b3c68d8f2c560868eacf5679e8a1f133cf80b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140574
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx 
b/sw/source/core/doc/DocumentFieldsManager.cxx
index 448d821b54df..a0eb50754f0c 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -509,8 +509,7 @@ bool DocumentFieldsManager::UpdateField(SwTextField * 
pDstTextField, SwField & r
     {
         if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
         {
-            SwPosition aPosition( pDstTextField->GetTextNode() );
-            aPosition.nContent = pDstTextField->GetStart();
+            SwPosition aPosition( pDstTextField->GetTextNode(), 
pDstTextField->GetStart() );
 
             m_rDoc.GetIDocumentUndoRedo().AppendUndo(
                 std::make_unique<SwUndoFieldFromDoc>( aPosition, *pDstField, 
rSrcField, pMsgHint, bUpdateFields) );
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx 
b/sw/source/core/doc/DocumentLayoutManager.cxx
index add587bd790c..bbe90610e8b9 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -302,8 +302,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat 
*pFormat )
                 {
                     // don't delete, set pointer to 0
                     
const_cast<SwFormatFlyCnt&>(pAttr->GetFlyCnt()).SetFlyFormat();
-                    SwContentIndex aIdx( pPos->nContent );
-                    pTextNd->EraseText( aIdx, 1 );
+                    pTextNd->EraseText( *pPos, 1 );
                 }
             }
         }

Reply via email to