sw/source/core/layout/pagechg.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
New commits: commit e10888cbb3bba4e0dff954566fd0f3721be3e5ab Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Mar 30 19:55:20 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Mar 30 22:18:04 2022 +0200 unroll this typical writer-style multi condition if statement no logic change intended Change-Id: Iebb8df604aa69829536e3cab10b33056e4cdf78e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132331 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 73a003223495..e09c1a265e2c 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1339,13 +1339,19 @@ namespace pPage->PreparePage( bFootnote ); // If the sibling has no body text, destroy it as long as it is no footnote page. - if ( pSibling && !pSibling->IsFootnotePage() && - !pSibling->FindFirstBodyContent() && - (!pRefPage || !isDeleteForbidden(pSibling)) ) + if (!pSibling) + return true; + if (pSibling->IsFootnotePage()) + return true; + if (pSibling->FindFirstBodyContent()) + return true; + + if (!pRefPage || !isDeleteForbidden(pSibling)) { pRoot->RemovePage( pRefSibling, SwRemoveResult::Next ) ; return false; } + return true; } }