diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-08-19 19:00:49 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-08-19 22:58:39 +0200 |
commit | a05432f02b6441b66addc0f22f1b8444557ac37b (patch) | |
tree | c0eced3054536e17aaaa01dbddedb8558650ccf8 /sw | |
parent | f019943851e138fc3a73fcc9a9692f83d50f1e51 (diff) |
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
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 ); } } |