diff options
-rw-r--r-- | sw/source/core/layout/layact.cxx | 41 |
1 files changed, 10 insertions, 31 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index a54c20d6e7cf..422b8aee0c46 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -484,37 +484,13 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) m_pOptTab = nullptr; // No Shortcut for Idle or CalcLayout - if ( !IsIdle() && !IsComplete() && IsShortCut( pPage ) ) - { - m_pRoot->DeleteEmptySct(); - if (lcl_isLayoutLooping()) return; - if ( !IsInterrupt() && - (m_pRoot->IsSuperfluous() || m_pRoot->IsAssertFlyPages()) ) - { - if ( m_pRoot->IsAssertFlyPages() ) - m_pRoot->AssertFlyPages(); - if ( m_pRoot->IsSuperfluous() ) - { - bool bOld = IsAgain(); - m_pRoot->RemoveSuperfluous(); - m_bAgain = bOld; - } - if (lcl_isLayoutLooping()) return; - pPage = static_cast<SwPageFrame*>(m_pRoot->Lower()); - while ( pPage && !pPage->IsInvalid() && !pPage->IsInvalidFly() ) - pPage = static_cast<SwPageFrame*>(pPage->GetNext()); - while ( pPage && pPage->GetNext() && - pPage->GetPhyPageNum() < nFirstPageNum ) - pPage = static_cast<SwPageFrame*>(pPage->GetNext()); - continue; - } - break; - } - else - { - m_pRoot->DeleteEmptySct(); - if (lcl_isLayoutLooping()) return; + const bool bTakeShortcut = !IsIdle() && !IsComplete() && IsShortCut(pPage); + + m_pRoot->DeleteEmptySct(); + if (lcl_isLayoutLooping()) return; + if (!bTakeShortcut) + { while ( !IsInterrupt() && !IsNextCycle() && ((pPage->GetSortedObjs() && pPage->IsInvalidFly()) || pPage->IsInvalid()) ) { @@ -630,7 +606,8 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) } CheckIdleEnd(); } - if ( !pPage && !IsInterrupt() && + + if ((bTakeShortcut || !pPage) && !IsInterrupt() && (m_pRoot->IsSuperfluous() || m_pRoot->IsAssertFlyPages()) ) { if ( m_pRoot->IsAssertFlyPages() ) @@ -649,6 +626,8 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) pPage->GetPhyPageNum() < nFirstPageNum ) pPage = static_cast<SwPageFrame*>(pPage->GetNext()); } + else if (bTakeShortcut) + break; } if ( IsInterrupt() && pPage ) { |