sw/source/core/doc/docredln.cxx |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

New commits:
commit a05432f02b6441b66addc0f22f1b8444557ac37b
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Aug 19 19:00:49 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Aug 19 22:58:39 2024 +0200

    sw: remove duplicated check
    
    after 3a961b522a82d41a0a3cd09b7fbb9bde6b79f3d8
    "sw: use SAL_RET_MAYBENULL in GetTableBox()"
    
    Kudos to M. Stahl for flagging it
    
    Change-Id: I44879da9206a1c04869b22c7a7b3bb18955f1953
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172052
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index dd1350c0e133..f6ef057d4ae5 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -614,16 +614,14 @@ std::vector<std::unique_ptr<SwRangeRedline>> 
GetAllValidRanges(std::unique_ptr<S
 static void lcl_setRowNotTracked(SwNode& rNode)
 {
     SwDoc& rDoc = rNode.GetDoc();
-    if ( rDoc.GetIDocumentUndoRedo().DoesUndo() && rNode.GetTableBox() )
+    const SwTableBox* pTableBox = rNode.GetTableBox();
+    if ( rDoc.GetIDocumentUndoRedo().DoesUndo() && pTableBox )
     {
         SvxPrintItem aSetTracking(RES_PRINT, false);
-        if (const SwTableBox* pTableBox = rNode.GetTableBox())
-        {
-            SwNodeIndex aInsPos( *(pTableBox->GetSttNd()), 1);
-            SwCursor aCursor( SwPosition(aInsPos), nullptr );
-            ::sw::UndoGuard const 
undoGuard(rNode.GetDoc().GetIDocumentUndoRedo());
-            rDoc.SetRowNotTracked( aCursor, aSetTracking );
-        }
+        SwNodeIndex aInsPos( *(pTableBox->GetSttNd()), 1);
+        SwCursor aCursor( SwPosition(aInsPos), nullptr );
+        ::sw::UndoGuard const undoGuard(rNode.GetDoc().GetIDocumentUndoRedo());
+        rDoc.SetRowNotTracked( aCursor, aSetTracking );
     }
 }
 

Reply via email to