sw/source/filter/ww8/docxattributeoutput.cxx |    2 +-
 sw/source/filter/ww8/wrtw8nds.cxx            |    4 ++--
 sw/source/filter/ww8/ww8par2.cxx             |    4 ++--
 sw/source/filter/xml/xmlimp.cxx              |    2 +-
 sw/source/ui/misc/bookmark.cxx               |    2 +-
 sw/source/uibase/dochdl/swdtflvr.cxx         |    4 ++--
 sw/source/uibase/lingu/hhcwrp.cxx            |    3 +--
 sw/source/uibase/shells/textfld.cxx          |    8 ++++----
 8 files changed, 14 insertions(+), 15 deletions(-)

New commits:
commit 5bbe546488508a77dc9ca090f2e50191a88c509c
Author:     Noel Grandin <[email protected]>
AuthorDate: Fri Aug 19 18:49:14 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sat Aug 20 09:50:35 2022 +0200

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

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 1543df719fec..a74692579a1f 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -393,7 +393,7 @@ static void 
checkAndWriteFloatingTables(DocxAttributeOutput& rDocxAttributeOutpu
         if (!pPosition || ! rExport.m_pCurPam->GetPointNode().GetTextNode())
             continue;
 
-        if (pPosition->nNode != 
rExport.m_pCurPam->GetPointNode().GetTextNode()->GetIndex())
+        if (pPosition->GetNode() != 
*rExport.m_pCurPam->GetPointNode().GetTextNode())
             continue;
 
         const SwNodeIndex* pStartNode = 
pFrameFormat->GetContent().GetContentIdx();
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 15e51affd20b..185b01aead79 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1570,7 +1570,7 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( 
sal_Int32 nPos )
     if( m_pCurRedline )
     {
         const SwPosition* pEnd = m_pCurRedline->End();
-        if (pEnd->nNode != m_rNode || pEnd->GetContentIndex() > nPos)
+        if (pEnd->GetNode() != m_rNode || pEnd->GetContentIndex() > nPos)
         {
             switch( m_pCurRedline->GetType() )
             {
@@ -2227,7 +2227,7 @@ bool MSWordExportBase::NeedTextNodeSplit( const 
SwTextNode& rNd, SwSoftPageBreak
             pos = it;
             while (auto const*const pMark = 
rIDMA.getFieldmarkFor(SwPosition(rNd, pos)))
             {
-                if (pMark->GetMarkEnd().nNode != rNd)
+                if (pMark->GetMarkEnd().GetNode() != rNd)
                 {
                     pos = rNd.Len(); // skip everything
                     break;
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 5e00e059700d..ecb757c0b89d 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2734,7 +2734,7 @@ void WW8TabDesc::ParkPaM()
     SwNodeOffset nSttNd = pTabBox2->GetSttIdx() + 1,
               nEndNd = pTabBox2->GetSttNd()->EndOfSectionIndex();
 
-    if (m_pIo->m_pPaM->GetPoint()->nNode != nSttNd)
+    if (m_pIo->m_pPaM->GetPoint()->GetNodeIndex() != nSttNd)
     {
         do
         {
@@ -2977,7 +2977,7 @@ void WW8TabDesc::SetPamInCell(short nWwCol, bool bPam)
     //want to reset the fmt properties
     SwNodeOffset nSttNd = m_pTabBox->GetSttIdx() + 1,
               nEndNd = m_pTabBox->GetSttNd()->EndOfSectionIndex();
-    if (m_pIo->m_pPaM->GetPoint()->nNode != nSttNd)
+    if (m_pIo->m_pPaM->GetPoint()->GetNodeIndex() != nSttNd)
     {
         do
         {
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index c10c8f9a1ba3..d773a1240c19 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -762,7 +762,7 @@ void SwXMLImport::endDocument()
                     // but only if one has been inserted and
                     // no endNode found to avoid removing section
                     if( pNextNd->CanJoinPrev(/* &pPos->nNode*/ ) && 
!endNodeFound &&
-                         *m_oSttNdIdx != pPos->nNode )
+                         *m_oSttNdIdx != pPos->GetNode() )
                     {
                         pNextNd->JoinPrev();
                     }
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 6ac9a12aedc6..89d353c20245 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -268,7 +268,7 @@ IMPL_LINK(SwInsertBookmarkDlg, EditedHdl, 
weld::TreeView::iter_string const&, rI
     bool bRet(false);
     if (pBookmark->GetMarkPos() != pBookmark->GetOtherMarkPos())
     {
-        if (pBookmark->GetMarkPos().nNode != 
pBookmark->GetOtherMarkPos().nNode)
+        if (pBookmark->GetMarkPos().GetNode() != 
pBookmark->GetOtherMarkPos().GetNode())
         {
             return false; // don't allow editing if it spans multiple nodes
         }
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index c4a172e73c62..a735c9dffc73 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1292,8 +1292,8 @@ void SwPasteContext::remember()
         return;
 
     // Set point to the previous node, so it is not moved.
-    const SwNodeIndex& rNodeIndex = pCursor->GetPoint()->nNode;
-    m_oPaM.emplace(rNodeIndex, rNodeIndex, SwNodeOffset(0), SwNodeOffset(-1));
+    const SwNode& rNode = pCursor->GetPoint()->GetNode();
+    m_oPaM.emplace(rNode, rNode, SwNodeOffset(0), SwNodeOffset(-1));
     m_nStartContent = pCursor->GetPoint()->GetContentIndex();
 }
 
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx 
b/sw/source/uibase/lingu/hhcwrp.cxx
index 344cfba96a3e..142399ed30c9 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -223,8 +223,7 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText,
         // remember cursor start position for later setting of the cursor
         const SwPosition *pStart = pCursor->Start();
         const sal_Int32 nStartIndex = pStart->GetContentIndex();
-        const SwNodeIndex aStartNodeIndex  = pStart->nNode;
-        SwTextNode *pStartTextNode = aStartNodeIndex.GetNode().GetTextNode();
+        SwTextNode *pStartTextNode = pStart->GetNode().GetTextNode();
 
         const sal_Int32  nIndices = pOffsets->getLength();
         const sal_Int32 *pIndices = pOffsets->getConstArray();
diff --git a/sw/source/uibase/shells/textfld.cxx 
b/sw/source/uibase/shells/textfld.cxx
index 833f5868a01d..fb1f00490391 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -697,8 +697,8 @@ FIELD_INSERT:
                 if(bSuccess)
                 {
                     IDocumentMarkAccess* pMarksAccess = 
rSh.GetDoc()->getIDocumentMarkAccess();
-                    SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, 
pCursorPos->GetPoint()->GetContentIndex() - vEnSpaces.getLength(),
-                                    pCursorPos->GetPoint()->nNode, 
pCursorPos->GetPoint()->GetContentIndex());
+                    SwPaM aFieldPam(pCursorPos->GetPoint()->GetNode(), 
pCursorPos->GetPoint()->GetContentIndex() - vEnSpaces.getLength(),
+                                    pCursorPos->GetPoint()->GetNode(), 
pCursorPos->GetPoint()->GetContentIndex());
                     pMarksAccess->makeFieldBookmark(aFieldPam, OUString(), 
ODF_FORMTEXT,
                             aFieldPam.Start());
                 }
@@ -751,8 +751,8 @@ FIELD_INSERT:
             if(bSuccess)
             {
                 IDocumentMarkAccess* pMarksAccess = 
rSh.GetDoc()->getIDocumentMarkAccess();
-                SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, 
pCursorPos->GetPoint()->GetContentIndex() - ODF_FORMFIELD_DEFAULT_LENGTH,
-                                pCursorPos->GetPoint()->nNode, 
pCursorPos->GetPoint()->GetContentIndex());
+                SwPaM aFieldPam(pCursorPos->GetPoint()->GetNode(), 
pCursorPos->GetPoint()->GetContentIndex() - ODF_FORMFIELD_DEFAULT_LENGTH,
+                                pCursorPos->GetPoint()->GetNode(), 
pCursorPos->GetPoint()->GetContentIndex());
                 sw::mark::IFieldmark* pFieldBM = 
pMarksAccess->makeFieldBookmark(aFieldPam, OUString(), ODF_FORMDATE,
                             aFieldPam.Start());
 

Reply via email to