summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-05-06 22:12:21 +0200
committerMichael Stahl <mstahl@redhat.com>2014-05-06 22:18:01 +0200
commita2e1505cf6ca0fdbe713e0cb86005a7577d125fa (patch)
tree858152cf44ee1c51fc3acc673380c4ea43569042 /sw
parent83c0018dba00ae0c0cf5b179cfc7a47ce08ff2b7 (diff)
SwViewShell: try to catch errors of calling CalcLayout without action
Change-Id: I0352d543b7ce1ae6cd23d929ad5c9cbaeb1563bf
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/view/viewsh.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 83c1437d02f8..305412d31836 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -887,6 +887,10 @@ void SwViewShell::ChgNumberDigits()
void SwViewShell::CalcLayout()
{
+ // extremely likely to be a Bad Idea to call this without StartAction
+ // (except the Page Preview apparently only has a non-subclassed ViewShell)
+ assert((typeid(*this) == typeid(SwViewShell)) || mnStartAction);
+
SET_CURR_SHELL( this );
SwWait aWait( *GetDoc()->GetDocShell(), true );