summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-08-27 13:01:02 +0200
committerobo <obo@openoffice.org>2010-08-27 13:01:02 +0200
commitfaf3732ff2f34712f6e974aa46f132cd734d22a5 (patch)
tree6da67e5f1d51fef35946c7e7d8431b383225812e
parent864045890b84b8307b673b39bad1540d102a6414 (diff)
masterfix OOO330: #i10000# solve merge problem / WaEooo/OOO330_m6
-rw-r--r--desktop/source/app/app.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index b326e0bf10..045970ea97 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1558,6 +1558,7 @@ void Desktop::Main()
std::auto_ptr<SvtLanguageOptions> pLanguageOptions;
std::auto_ptr<SvtPathOptions> pPathOptions;
+ Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
sal_Bool bRestartRequested( sal_False );
sal_Bool bUseSystemFileDialog(sal_True);
int nAcquireCount( 0 );
@@ -1761,7 +1762,6 @@ void Desktop::Main()
impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} impl_checkRecoveryState" );
- Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
{
::comphelper::ComponentContext aContext( xSMgr );
xRestartManager.set( aContext.getSingleton( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.OfficeRestartManager" ) ) ), UNO_QUERY );
@@ -1929,7 +1929,6 @@ void Desktop::Main()
// call Application::Execute to process messages in vcl message loop
RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" );
- Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
try
{
// The JavaContext contains an interaction handler which is used when
@@ -1937,9 +1936,10 @@ void Desktop::Main()
com::sun::star::uno::ContextLayer layer2(
new svt::JavaContext( com::sun::star::uno::getCurrentContext() ) );
- ::comphelper::ComponentContext aContext( xSMgr );
- xRestartManager.set( aContext.getSingleton( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.OfficeRestartManager" ) ) ), UNO_QUERY );
- if ( !xRestartManager.is() || !xRestartManager->isRestartRequested( sal_True ) )
+ // check whether the shutdown is caused by restart just before entering the Execute
+ bRestartRequested = bRestartRequested || ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
+
+ if ( !bRestartRequested )
{
// if this run of the office is triggered by restart, some additional actions should be done
DoRestartActionsIfNecessary( !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsNoQuickstart() );
@@ -1957,13 +1957,11 @@ void Desktop::Main()
OfficeIPCThread::SetDowning();
FatalError( MakeStartupErrorMessage(exAnyCfg.Message) );
}
-
- // check whether the shutdown is caused by restart
- sal_Bool bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
- if ( bRestartRequested )
- SetRestartState();
}
+ if ( bRestartRequested )
+ SetRestartState();
+
if (xGlobalBroadcaster.is())
{
css::document::EventObject aEvent;