summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-05-06 22:15:58 +0200
committerMichael Stahl <mstahl@redhat.com>2014-05-06 22:18:02 +0200
commit3ed4078ad2e1bb35829b118a5067ad3a43365bbc (patch)
tree65284a563234b47b660440ae4f24cb9cc27875b9
parenta2e1505cf6ca0fdbe713e0cb86005a7577d125fa (diff)
SwLayAction: there can be only one, so assert that
Requires tweaking the SwLayIdle code a bit, where an action is kept alive a bit after it's done, which would trigger the assertion. Change-Id: Ic5c8f90bc101b9d73cfde9691b2bbf405a001393
-rw-r--r--sw/source/core/layout/layact.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index f32831d28caf..9f8de677efb3 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -300,6 +300,7 @@ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewImp *pI ) :
// OD 14.04.2003 #106346# - init new flag <mbFormatCntntOnInterrupt>.
mbFormatCntntOnInterrupt = false;
+ assert(!pImp->pLayAct); // there can be only one SwLayAction
pImp->pLayAct = this; // register there
}
@@ -2169,11 +2170,15 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
pSh = (SwViewShell*)pSh->GetNext();
} while ( pSh != pImp->GetShell() );
- SwLayAction aAction( pRoot, pImp );
- aAction.SetInputType( VCL_INPUT_ANY );
- aAction.SetIdle( true );
- aAction.SetWaitAllowed( false );
- aAction.Action();
+ bool bInterrupt(false);
+ {
+ SwLayAction aAction( pRoot, pImp );
+ aAction.SetInputType( VCL_INPUT_ANY );
+ aAction.SetIdle( true );
+ aAction.SetWaitAllowed( false );
+ aAction.Action();
+ bInterrupt = aAction.IsInterrupt();
+ }
// Further start/end actions only happen if there were paints started
// somewhere or if the visibility of the CharRects has changed.
@@ -2263,7 +2268,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
} while ( pSh != pImp->GetShell() );
}
- if ( !aAction.IsInterrupt() )
+ if (!bInterrupt)
{
if ( !DoIdleJob( WORD_COUNT, false ) )
if ( !DoIdleJob( SMART_TAGS, false ) )