sw/source/core/docnode/nodes.cxx | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-)
New commits: commit ab8ebc65af13873cccb89f56d1027521f6d0f87e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Mar 7 11:38:47 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Mar 9 10:28:51 2023 +0000 remove dead code in SwNodes::FindPrvNxtFrameNode ever since commit af4e20426ad24c6f2c0164b37472f2b7b54ecd30 Author: Michael Stahl <michael.st...@allotropia.de> Date: Tue Dec 21 15:19:33 2021 +0100 tdf#135061 sw_redlinehide: create frames following hidden table Specifically, remove the line pFrameNd = &aIdx.GetNode(); because the pFrameNd is then immediately overwritten with nullptr. Also re-indent the resulting code and removing an unnecessary block scope. Change-Id: Ic4d40ee7835ed73038eba9da7ec72670cf0b97b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148384 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 16fb8eb5ecd1..988d74297dfb 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -2320,28 +2320,25 @@ SwNode* SwNodes::FindPrvNxtFrameNode( const SwNode& rFrameNd, // should have ended up in the first text node in the table and // then checked it's in a table? { - aIdx = pEnd->GetIndex() + 1; + aIdx = pEnd->GetIndex() + 1; - pFrameNd = &aIdx.GetNode(); - { - pFrameNd = nullptr; + pFrameNd = nullptr; - // is there some sectionnodes before a tablenode? - while( aIdx.GetNode().IsSectionNode() ) - { - const SwSection& rSect = aIdx.GetNode(). - GetSectionNode()->GetSection(); - if( rSect.IsHiddenFlag() ) - aIdx = aIdx.GetNode().EndOfSectionIndex()+1; - else - ++aIdx; - } - if( aIdx.GetNode().IsTableNode() ) - { - pFrameNd = &aIdx.GetNode(); - assert(!"this isn't dead code?"); - } - } + // is there some sectionnodes before a tablenode? + while( aIdx.GetNode().IsSectionNode() ) + { + const SwSection& rSect = aIdx.GetNode(). + GetSectionNode()->GetSection(); + if( rSect.IsHiddenFlag() ) + aIdx = aIdx.GetNode().EndOfSectionIndex()+1; + else + ++aIdx; + } + if( aIdx.GetNode().IsTableNode() ) + { + pFrameNd = &aIdx.GetNode(); + assert(!"this isn't dead code?"); + } } } }