sw/source/core/layout/layact.cxx | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
New commits: commit 516f1e2ac2f03bee97ca05a56984bd5fc0f4ec8a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Jul 19 16:17:17 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Jul 19 22:17:20 2018 +0200 coverity#1438043 Logically dead code Change-Id: I5f9754b96e954a8295d8fa84b2337bc8deac9bc8 Reviewed-on: https://gerrit.libreoffice.org/57735 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index ea6bbebf3def..adf37d39cf40 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -442,19 +442,16 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) sal_uInt16 nPercentPageNum = 0; while ( (pPage && !IsInterrupt()) || m_nCheckPageNum != USHRT_MAX ) { - if ( !pPage && m_nCheckPageNum != USHRT_MAX && - (!pPage || pPage->GetPhyPageNum() >= m_nCheckPageNum) ) + if (!pPage && m_nCheckPageNum != USHRT_MAX) { - if ( !pPage || pPage->GetPhyPageNum() > m_nCheckPageNum ) - { - SwPageFrame *pPg = static_cast<SwPageFrame*>(m_pRoot->Lower()); - while ( pPg && pPg->GetPhyPageNum() < m_nCheckPageNum ) - pPg = static_cast<SwPageFrame*>(pPg->GetNext()); - if ( pPg ) - pPage = pPg; - if ( !pPage ) - break; - } + SwPageFrame *pPg = static_cast<SwPageFrame*>(m_pRoot->Lower()); + while (pPg && pPg->GetPhyPageNum() < m_nCheckPageNum) + pPg = static_cast<SwPageFrame*>(pPg->GetNext()); + if (pPg) + pPage = pPg; + if (!pPage) + break; + SwPageFrame *pTmp = pPage->GetPrev() ? static_cast<SwPageFrame*>(pPage->GetPrev()) : pPage; SetCheckPages( true ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits