sw/source/core/draw/dcontact.cxx |    4 ++--
 sw/source/core/edit/acorrect.cxx |    6 +++---
 sw/source/core/edit/autofmt.cxx  |   26 +++++++++++++-------------
 3 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit da50929c074aaa1587cdaf6cfab7767ac776f6a4
Author:     Noel Grandin <[email protected]>
AuthorDate: Sun Aug 21 19:17:09 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Aug 22 12:27:57 2022 +0200

    use more SwPosition::GetNode
    
    Change-Id: Iba1207fd5006c3bd56f45da3c46b84f5e8c43340
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138646
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 8a76709d9ddf..048d841f6dd2 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1879,12 +1879,12 @@ void SwDrawContact::ConnectToLayout( const 
SwFormatAnchor* pAnch )
                             pModify = pCNd;
                         else
                         {
-                            const SwNodeIndex& rIdx = 
pAnch->GetContentAnchor()->nNode;
+                            const SwNode& rIdx = 
pAnch->GetContentAnchor()->GetNode();
                             SwFrameFormats& rFormats = 
*(pDrawFrameFormat->GetDoc()->GetSpzFrameFormats());
                             for( auto pFlyFormat : rFormats )
                             {
                                 if( pFlyFormat->GetContent().GetContentIdx() &&
-                                    rIdx == 
*(pFlyFormat->GetContent().GetContentIdx()) )
+                                    rIdx == 
pFlyFormat->GetContent().GetContentIdx()->GetNode() )
                                 {
                                     pModify = pFlyFormat;
                                     break;
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 40cb9bce01c9..130e9aa4f580 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -205,7 +205,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 
nSourceLength, const
     std::pair<SwTextNode *, sal_Int32> const 
pos(pFrame->MapViewToModel(TextFrameIndex(nPos)));
 
     SwPaM* pPam = &m_rCursor;
-    if (pPam->GetPoint()->nNode != *pos.first
+    if (pPam->GetPoint()->GetNode() != *pos.first
         || pPam->GetPoint()->nContent != pos.second)
     {
         pPam = new SwPaM(*pos.first, pos.second);
@@ -340,7 +340,7 @@ OUString const* SwAutoCorrDoc::GetPrevPara(bool const 
bAtNormalPos)
 
     if( bAtNormalPos || !m_oIndex )
     {
-        m_oIndex.emplace(m_rCursor.GetPoint()->nNode);
+        m_oIndex.emplace(m_rCursor.GetPoint()->GetNode());
     }
     sw::GotoPrevLayoutTextFrame(*m_oIndex, m_rEditSh.GetLayout());
 
@@ -459,7 +459,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, 
sal_Int32 nEndPos,
                 if( pPara )
                 {
                     OSL_ENSURE( !m_oIndex, "who has not deleted his Index?" );
-                    m_oIndex.emplace(m_rCursor.GetPoint()->nNode);
+                    m_oIndex.emplace(m_rCursor.GetPoint()->GetNode());
                     sw::GotoPrevLayoutTextFrame(*m_oIndex, 
m_rEditSh.GetLayout());
                 }
 
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 7e3f70640f77..b4812c3030db 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -220,7 +220,7 @@ class SwAutoFormat
 
 public:
     SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags aFlags,
-                SwNodeIndex const * pSttNd = nullptr, SwNodeIndex const * 
pEndNd = nullptr );
+                SwNode const * pSttNd = nullptr, SwNode const * pEndNd = 
nullptr );
 };
 
 static const sal_Unicode* StrChr( const sal_Unicode* pSrc, sal_Unicode c )
@@ -1194,7 +1194,7 @@ void SwAutoFormat::DeleteSelImpl(SwPaM & rDelPam, SwPaM & 
rPamToCorrect)
             p->MoveTo( &rPamToCorrect );
         } while( p != pPrev );
 
-        m_aNdIdx = aTmp.GetPoint()->nNode;
+        m_aNdIdx = aTmp.GetPoint()->GetNode();
         m_pCurTextNd = m_aNdIdx.GetNode().GetTextNode();
         m_pCurTextFrame = GetFrame(*m_pCurTextNd); // keep it up to date
     }
@@ -1978,7 +1978,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
 
                 if( m_aFlags.bWithRedlining )
                 {
-                    m_aNdIdx = m_aDelPam.GetPoint()->nNode;
+                    m_aNdIdx = m_aDelPam.GetPoint()->GetNode();
                     m_pCurTextNd = m_aNdIdx.GetNode().GetTextNode();
                     m_pCurTextFrame = GetFrame( *m_pCurTextNd );
                     pText = &m_pCurTextFrame->GetText();
@@ -2032,7 +2032,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
 
                         if( m_aFlags.bWithRedlining )
                         {
-                            m_aNdIdx = m_aDelPam.GetPoint()->nNode;
+                            m_aNdIdx = m_aDelPam.GetPoint()->GetNode();
                             m_pCurTextNd = m_aNdIdx.GetNode().GetTextNode();
                             m_pCurTextFrame = GetFrame( *m_pCurTextNd );
                             pText = &m_pCurTextFrame->GetText();
@@ -2074,7 +2074,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
                         {
                             if( m_aFlags.bWithRedlining )
                             {
-                                m_aNdIdx = m_aDelPam.GetPoint()->nNode;
+                                m_aNdIdx = m_aDelPam.GetPoint()->GetNode();
                                 m_pCurTextNd = 
m_aNdIdx.GetNode().GetTextNode();
                                 m_pCurTextFrame = GetFrame( *m_pCurTextNd );
                                 pText = &m_pCurTextFrame->GetText();
@@ -2147,7 +2147,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
 
                 if( m_aFlags.bWithRedlining )
                 {
-                    m_aNdIdx = m_aDelPam.GetPoint()->nNode;
+                    m_aNdIdx = m_aDelPam.GetPoint()->GetNode();
                     m_pCurTextNd = m_aNdIdx.GetNode().GetTextNode();
                     m_pCurTextFrame = GetFrame( *m_pCurTextNd );
                     pText = &m_pCurTextFrame->GetText();
@@ -2164,7 +2164,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
                 nPos = 
m_pCurTextFrame->MapModelToViewPos(*m_aDelPam.GetPoint());
                 if( m_aFlags.bWithRedlining )
                 {
-                    m_aNdIdx = m_aDelPam.GetPoint()->nNode;
+                    m_aNdIdx = m_aDelPam.GetPoint()->GetNode();
                     m_pCurTextNd = m_aNdIdx.GetNode().GetTextNode();
                     m_pCurTextFrame = GetFrame( *m_pCurTextNd );
                     pText = &m_pCurTextFrame->GetText();
@@ -2214,7 +2214,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
 
                 if( m_aFlags.bWithRedlining )
                 {
-                    m_aNdIdx = m_aDelPam.GetPoint()->nNode;
+                    m_aNdIdx = m_aDelPam.GetPoint()->GetNode();
                     m_pCurTextNd = m_aNdIdx.GetNode().GetTextNode();
                     m_pCurTextFrame = GetFrame( *m_pCurTextNd );
                     pText = &m_pCurTextFrame->GetText();
@@ -2229,7 +2229,7 @@ void SwAutoFormat::AutoCorrect(TextFrameIndex nPos)
 }
 
 SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags aFlags,
-                            SwNodeIndex const * pSttNd, SwNodeIndex const * 
pEndNd )
+                            SwNode const * pSttNd, SwNode const * pEndNd )
     : m_aFlags(std::move( aFlags )),
     m_aDelPam( pEdShell->GetDoc()->GetNodes().GetEndOfExtras() ),
     m_aNdIdx( pEdShell->GetDoc()->GetNodes().GetEndOfExtras(), 
SwNodeOffset(+1) ),
@@ -2718,8 +2718,8 @@ void SwEditShell::AutoFormat( const SvxSwAutoFormatFlags* 
pAFlags )
         {
             if( rPaM.HasMark() )
             {
-                SwAutoFormat aFormat( this, aAFFlags, &(rPaM.Start()->nNode),
-                                     &(rPaM.End()->nNode) );
+                SwAutoFormat aFormat( this, aAFFlags, &rPaM.Start()->GetNode(),
+                                     &rPaM.End()->GetNode() );
             }
         }
     }
@@ -2770,8 +2770,8 @@ void SwEditShell::AutoFormatBySplitNode()
 
         SvxSwAutoFormatFlags aAFFlags = *GetAutoFormatFlags(); // use default 
values so far
 
-        SwAutoFormat aFormat( this, std::move(aAFFlags), 
&pCursor->GetMark()->nNode,
-                                &pCursor->GetPoint()->nNode );
+        SwAutoFormat aFormat( this, std::move(aAFFlags), 
&pCursor->GetMark()->GetNode(),
+                                &pCursor->GetPoint()->GetNode() );
         SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect();
         if( pACorr && !pACorr->IsAutoCorrFlag( ACFlags::CapitalStartSentence | 
ACFlags::CapitalStartWord |
                                 ACFlags::AddNonBrkSpace | 
ACFlags::ChgOrdinalNumber | ACFlags::TransliterateRTL |

Reply via email to