diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-12-06 20:27:29 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-12-06 20:28:56 +0100 |
commit | 2a9c1d1a75b7d4e79dfbc6be3dada1a1e959e58e (patch) | |
tree | a1f99c2b4ab4806bc117d8552fbd2e8472bf4e90 /framework | |
parent | f547b2c4788439380c3202407c251153be0c5b8e (diff) |
Make dialogs fail with an exception in headless tests.
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/services/frame.cxx | 9 |
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 ); } /*-****************************************************************************************************//** |