summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-12-06 20:27:29 +0100
committerEike Rathke <erack@redhat.com>2011-12-07 17:19:49 +0100
commit47e1017b76ea46d112a6752fbf954675ca021ee5 (patch)
tree31c3cfe47f0fe63c6ea4ebef74f80379f80bc0ce /framework
parent1cae5c183f122cc8de88786974ce7f6aa53fbd91 (diff)
Make dialogs fail with an exception in headless tests.
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/frame.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index a24404ffab1a..90d47d43d4c4 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -1887,10 +1887,9 @@ void SAL_CALL Frame::dispose() throw( css::uno::RuntimeException )
// (a) Do it after stopWindowListening(). May that force some active/deactive
// notifications which we doesn't need here realy.
// (b) Don't forget to save the old value of IsDialogCancelEnabled() to
- // restore it afterwards. We cannot call EnableDialogCancel( sal_False )
- // as we would kill the headless mode!
- sal_Bool bCancelDialogs( Application::IsDialogCancelEnabled() );
- Application::EnableDialogCancel( sal_True );
+ // restore it afterwards (to not kill headless mode).
+ Application::DialogCancelMode old = Application::GetDialogCancelMode();
+ Application::SetDialogCancelMode( Application::DIALOG_CANCEL_SILENT );
// We should be alone for ever and further dispose calls are rejected by lines before ...
// I hope it :-)
@@ -1969,7 +1968,7 @@ void SAL_CALL Frame::dispose() throw( css::uno::RuntimeException )
// Don't forget it restore old value -
// otherwhise no dialogs can be shown anymore in other frames.
- Application::EnableDialogCancel( bCancelDialogs );
+ Application::SetDialogCancelMode( old );
}
/*-****************************************************************************************************//**