[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jul 19 20:17:48 UTC 2018
sw/source/core/layout/layact.cxx | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
New commits:
commit 516f1e2ac2f03bee97ca05a56984bd5fc0f4ec8a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 19 16:17:17 2018 +0100
Commit: Caolán McNamara <caolanm at 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 <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at 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 );
More information about the Libreoffice-commits
mailing list