sw: remove duplicated check

after 3a961b522a
"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>
This commit is contained in:
Xisco Fauli 2024-08-19 19:00:49 +02:00
parent f019943851
commit a05432f02b

View file

@ -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 );
}
}