summaryrefslogtreecommitdiff
path: root/framework/source/services/desktop.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-02-09 12:57:20 +0000
committerRüdiger Timm <rt@openoffice.org>2006-02-09 12:57:20 +0000
commitd7badaae7cdf7a19eb4336aa95b5a09ff73ebfb4 (patch)
treebaa6322881438ca8d366ecd99621809335edcffd /framework/source/services/desktop.cxx
parent9d0614eef80f5ac8c3d700c7cd452206408ffa55 (diff)
INTEGRATION: CWS fwk32 (1.58.46); FILE MERGED
2006/01/30 14:46:20 mav 1.58.46.1: #120410# fix from AS: controller should reactivate the window if closing failed
Diffstat (limited to 'framework/source/services/desktop.cxx')
-rw-r--r--framework/source/services/desktop.cxx27
1 files changed, 18 insertions, 9 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 6040c210dee0..26be71da6ae1 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: desktop.cxx,v $
*
- * $Revision: 1.58 $
+ * $Revision: 1.59 $
*
- * last change: $Author: rt $ $Date: 2005-11-11 12:06:44 $
+ * last change: $Author: rt $ $Date: 2006-02-09 13:57:20 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -534,14 +534,17 @@ sal_Bool SAL_CALL Desktop::terminate() throw( css::uno::RuntimeException )
// Terminate allow showing of UI ... so it can ask a controller
// if it agree with a close. If it disagree .. stop terminate!
css::uno::Reference< css::frame::XController > xController( xTask->getController(), css::uno::UNO_QUERY );
- sal_Bool bSuspended = (
- (! xController.is() ) ||
- ( xController->suspend(sal_True))
- );
- if (!bSuspended)
+ sal_Bool bReactivateController = sal_False;
+ if (xController.is())
{
- bTaskVeto = sal_True;
- continue;
+ sal_Bool bSuspended = xController->suspend(sal_True);
+ if (!bSuspended)
+ {
+ bTaskVeto = sal_True;
+ continue;
+ }
+ else
+ bReactivateController = sal_True;
}
css::uno::Reference< css::util::XCloseable > xClose(xTask, css::uno::UNO_QUERY);
@@ -560,6 +563,12 @@ sal_Bool SAL_CALL Desktop::terminate() throw( css::uno::RuntimeException )
// Any internal process of this task disagree with our request.
// Safe this state and break this loop. Following task willn't be asked!
bTaskVeto = sal_True;
+
+ if (
+ (bReactivateController) &&
+ (xController.is() )
+ )
+ xController->suspend(sal_False);
}
// It doesnt matter if this task was closed sucesfully or not.