summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-04-14 14:51:11 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2021-04-14 19:42:28 +0200
commitd6483eeafcf8183f437afaeaf4c241416faf8e44 (patch)
tree2acfc59d4d8ef577445fd1d2a00daaf76ddbe97a /sw
parentb524e0f2636d7983dd5aba32b2fd3e61e08aac56 (diff)
IsInput is equal to IsInterrupt, so drop it
Nobody is really interested in the reason for the interrupt. And since we already checked IsInterrupt() to get in this branch, mbFormatContentOnInterrupt is always true. Also because we want to finish layouting the current page, especially on Idle, according to commit aa355eeec8c5526c68b17d15192aef94062607d7 ("#i42586# ... - finish format of current page on interrupt."), so must ignore many (all?) IsInterrupt() checks. Change-Id: Ic1d576130a605348a86115ebeb1f016d8163c6f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114095 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/inc/layact.hxx5
-rw-r--r--sw/source/core/layout/layact.cxx12
2 files changed, 8 insertions, 9 deletions
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index f46c090dbb20..2457dfa55a23 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -84,7 +84,7 @@ class SwLayAction
bool m_bCalcLayout; // Complete reformatting?
bool m_bAgain; // For the automatically repeated Action if Pages are deleted
bool m_bNextCycle; // Reset on the first invalid Page
- bool m_bInput; // For terminating processing on input
+ bool m_bInterrupt; // For terminating processing on interrupt
bool m_bIdle; // True if the LayAction was triggered by the Idler
bool m_bReschedule; // Call Reschedule depending on Progress?
bool m_bCheckPages; // Run CheckPageDescs() or delay it
@@ -137,12 +137,11 @@ public:
bool IsWaitAllowed() const { return m_bWaitAllowed; }
bool IsNextCycle() const { return m_bNextCycle; }
- bool IsInput() const { return m_bInput; }
bool IsPaint() const { return m_bPaint; }
bool IsIdle() const { return m_bIdle; }
bool IsReschedule() const { return m_bReschedule; }
bool IsPaintExtraData() const { return m_bPaintExtraData;}
- bool IsInterrupt() const { return IsInput(); }
+ bool IsInterrupt() const { return m_bInterrupt; }
VclInputFlags GetInputType() const { return m_nInputType; }
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index c75dd034978c..e3063d59ff21 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -91,8 +91,8 @@ void SwLayAction::CheckWaitCursor()
// Time over already?
inline void SwLayAction::CheckIdleEnd()
{
- if ( !IsInput() )
- m_bInput = bool(GetInputType()) && Application::AnyInput( GetInputType() );
+ if (!IsInterrupt())
+ m_bInterrupt = bool(GetInputType()) && Application::AnyInput(GetInputType());
}
void SwLayAction::SetStatBar( bool bNew )
@@ -267,7 +267,7 @@ SwLayAction::SwLayAction( SwRootFrame *pRt, SwViewShellImp *pI ) :
{
m_bPaintExtraData = ::IsExtraData( m_pImp->GetShell()->GetDoc() );
m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true;
- m_bInput = m_bAgain = m_bNextCycle = m_bCalcLayout = m_bIdle = m_bReschedule =
+ m_bInterrupt = m_bAgain = m_bNextCycle = m_bCalcLayout = m_bIdle = m_bReschedule =
m_bUpdateExpFields = m_bBrowseActionStop = m_bActionInProgress = false;
// init new flag <mbFormatContentOnInterrupt>.
mbFormatContentOnInterrupt = false;
@@ -289,7 +289,7 @@ void SwLayAction::Reset()
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_bInterrupt = m_bAgain = m_bNextCycle = m_bCalcLayout = m_bIdle = m_bReschedule =
m_bUpdateExpFields = m_bBrowseActionStop = false;
m_pCurPage = nullptr;
}
@@ -573,7 +573,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
pPage->InvalidateFlyLayout();
pPage->InvalidateFlyContent();
if ( IsBrowseActionStop() )
- m_bInput = true;
+ m_bInterrupt = true;
}
}
if( bNoLoop )
@@ -687,7 +687,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
pPg = pPg ? static_cast<SwPageFrame*>(pPg->GetPrev()) : pPage;
// set flag for interrupt content formatting
- mbFormatContentOnInterrupt = IsInput();
+ mbFormatContentOnInterrupt = true;
tools::Long nBottom = rVis.Bottom();
// #i42586# - format current page, if idle action is active
// This is an optimization for the case that the interrupt is created by