diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-07-15 14:13:35 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-11-17 19:19:34 +0100 |
commit | 7785d980d64fd2a98027d1f485de39c8280ba7e7 (patch) | |
tree | 2cb05797a906e2525c049278937770e7b4a7ff43 /sw | |
parent | 4b493442cc81d988b95ddab1b818de0aa0e7b7f9 (diff) |
Only change SwLayAction::m_bAgain via SetAgain
no logic change intended
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118983
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 3a5383892e1f0e22558cd56cb77d56a09c515b7a)
Change-Id: Ib0174f8040faa3efde7b9c5ba9b062bac5a35da3
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/layact.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/layact.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/layout/objectformattertxtfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 2 |
4 files changed, 12 insertions, 8 deletions
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 9240ef9d2a98..4e9a01d34830 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -146,7 +146,7 @@ public: void SetReschedule ( bool bNew ) { m_bReschedule = bNew; } void SetWaitAllowed ( bool bNew ) { m_bWaitAllowed = bNew; } - void SetAgain() { m_bAgain = true; } + void SetAgain(bool bAgain) { m_bAgain = bAgain; } void SetUpdateExpFields() {m_bUpdateExpFields = true; } inline void SetCheckPageNum( sal_uInt16 nNew ); diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index ae643be49d37..b4924390af50 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -276,12 +276,13 @@ SwLayAction::~SwLayAction() void SwLayAction::Reset() { + SetAgain(false); m_pOptTab = nullptr; m_nStartTicks = std::clock(); m_nInputType = VclInputFlags::NONE; m_nEndPage = m_nPreInvaPage = m_nCheckPageNum = USHRT_MAX; m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true; - m_bInput = m_bAgain = m_bNextCycle = m_bCalcLayout = m_bIdle = m_bReschedule = + m_bInput = m_bNextCycle = m_bCalcLayout = m_bIdle = m_bReschedule = m_bUpdateExpFields = m_bBrowseActionStop = false; } @@ -339,12 +340,15 @@ void SwLayAction::Action(OutputDevice* pRenderContext) SetCheckPages( false ); InternalAction(pRenderContext); - m_bAgain |= RemoveEmptyBrowserPages(); + if (RemoveEmptyBrowserPages()) + SetAgain(true); while ( IsAgain() ) { - m_bAgain = m_bNextCycle = false; + SetAgain(false); + m_bNextCycle = false; InternalAction(pRenderContext); - m_bAgain |= RemoveEmptyBrowserPages(); + if (RemoveEmptyBrowserPages()) + SetAgain(true); } m_pRoot->DeleteEmptySct(); @@ -635,7 +639,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext) { bool bOld = IsAgain(); m_pRoot->RemoveSuperfluous(); - m_bAgain = bOld; + SetAgain(bOld); } if ( IsAgain() ) { diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 1af4476d4946..88f0bc28904f 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -293,7 +293,7 @@ bool SwObjectFormatterTextFrame::DoFormatObjs() { // notify layout action, thus is can restart the layout process on // a previous page. - GetLayAction()->SetAgain(); + GetLayAction()->SetAgain(true); } else { diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index f3b80311c52f..68a0536fa2de 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -283,7 +283,7 @@ void SwPageFrame::DestroyImpl() SwViewShellImp *pImp = pSh->Imp(); pImp->SetFirstVisPageInvalid(); if ( pImp->IsAction() ) - pImp->GetLayAction().SetAgain(); + pImp->GetLayAction().SetAgain(true); // #i9719# - retouche area of page // including border and shadow area. const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT); |