sw/inc/doc.hxx                     |    2 +-
 sw/source/core/doc/docglos.cxx     |    2 +-
 sw/source/core/docnode/ndtbl.cxx   |    4 ++--
 sw/source/core/edit/editsh.cxx     |    4 ++--
 sw/source/core/frmedt/fecopy.cxx   |    4 ++--
 sw/source/core/unocore/unotext.cxx |    4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit dc454ce52d157caefef7c87cb51472c1d881d7fb
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Aug 20 14:34:19 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Aug 20 16:48:43 2022 +0200

    SwNodeIndex->SwNode in ClearBoxNumAttrs
    
    Change-Id: I7f1bd63bd151b4a00fed23c5507e8474428dc829
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138586
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 05afd162cdd1..3bea82ab60ae 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1267,7 +1267,7 @@ public:
     // Check if box has numerical value. Change format of box if required.
     void ChkBoxNumFormat( SwTableBox& rCurrentBox, bool bCallUpdate );
     void SetTableBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet );
-    void ClearBoxNumAttrs( const SwNodeIndex& rNode );
+    void ClearBoxNumAttrs( SwNode& rNode );
     void ClearLineNumAttrs( SwPosition const & rPos );
 
     bool InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx
index a51b4ad2e5b3..96f40fa8c8f4 100644
--- a/sw/source/core/doc/docglos.cxx
+++ b/sw/source/core/doc/docglos.cxx
@@ -183,7 +183,7 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const 
OUString& rEntry,
                 {
                     // We copy more than one Node to the current Box.
                     // However, we have to remove the BoxAttributes then.
-                    ClearBoxNumAttrs( rInsPos.nNode );
+                    ClearBoxNumAttrs( rInsPos.GetNode() );
                 }
 
                 SwDontExpandItem aACD;
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index edcbf151ce31..8070e65985db 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -4239,9 +4239,9 @@ void SwDoc::ClearLineNumAttrs( SwPosition const & rPos )
     pTextNode->SetAttr( rSet );
 }
 
-void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
+void SwDoc::ClearBoxNumAttrs( SwNode& rNode )
 {
-    SwStartNode* pSttNd = rNode.GetNode().FindSttNodeByType( 
SwTableBoxStartNode );
+    SwStartNode* pSttNd = rNode.FindSttNodeByType( SwTableBoxStartNode );
     if( nullptr == pSttNd ||
         SwNodeOffset(2) != pSttNd->EndOfSectionIndex() - pSttNd->GetIndex())
         return;
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index dba5382d7e33..7a6e08bf76d2 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -188,7 +188,7 @@ void SwEditShell::SplitNode( bool bAutoFormat, bool 
bCheckTableStart )
     for(SwPaM& rPaM : GetCursor()->GetRingContainer())
     {
         // Here, a table cell becomes a normal text cell.
-        GetDoc()->ClearBoxNumAttrs( rPaM.GetPoint()->nNode );
+        GetDoc()->ClearBoxNumAttrs( rPaM.GetPoint()->GetNode() );
         GetDoc()->getIDocumentContentOperations().SplitNode( *rPaM.GetPoint(), 
bCheckTableStart );
     }
 
@@ -210,7 +210,7 @@ bool SwEditShell::AppendTextNode()
 
     for(SwPaM& rPaM : GetCursor()->GetRingContainer())
     {
-        GetDoc()->ClearBoxNumAttrs( rPaM.GetPoint()->nNode );
+        GetDoc()->ClearBoxNumAttrs( rPaM.GetPoint()->GetNode() );
         bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( 
*rPaM.GetPoint()) || bRet;
     }
 
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index e641e6b67fba..e67852b2d5ce 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -943,7 +943,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable)
             {
                 // if more than one node will be copied into a cell
                 // the box attributes have to be removed
-                GetDoc()->ClearBoxNumAttrs( rInsPos.nNode );
+                GetDoc()->ClearBoxNumAttrs( rInsPos.GetNode() );
             }
             {
                 SwNodeIndex aIndexBefore(rInsPos.GetNode());
@@ -1078,7 +1078,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable)
                 {
                     // Copy more than 1 node in the current box. But
                     // then the BoxAttribute should be removed
-                    GetDoc()->ClearBoxNumAttrs( rInsPos.nNode );
+                    GetDoc()->ClearBoxNumAttrs( rInsPos.GetNode() );
                 }
 
                 // **
diff --git a/sw/source/core/unocore/unotext.cxx 
b/sw/source/core/unocore/unotext.cxx
index b2822157407e..21980c053fff 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -429,12 +429,12 @@ SwXText::insertControlCharacter(
     {
         case text::ControlCharacter::PARAGRAPH_BREAK :
             // a table cell now becomes an ordinary text cell!
-            m_pImpl->m_pDoc->ClearBoxNumAttrs(aPam.GetPoint()->nNode);
+            m_pImpl->m_pDoc->ClearBoxNumAttrs(aPam.GetPoint()->GetNode());
             
m_pImpl->m_pDoc->getIDocumentContentOperations().SplitNode(*aPam.GetPoint(), 
false);
             break;
         case text::ControlCharacter::APPEND_PARAGRAPH:
         {
-            m_pImpl->m_pDoc->ClearBoxNumAttrs(aPam.GetPoint()->nNode);
+            m_pImpl->m_pDoc->ClearBoxNumAttrs(aPam.GetPoint()->GetNode());
             
m_pImpl->m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPam.GetPoint());
 
             const uno::Reference<lang::XUnoTunnel> xRangeTunnel(

Reply via email to