diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-03-30 17:41:15 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-03-30 17:49:06 +0300 |
commit | 4fe56f3b9af814430a28a1880799f450fb8146b9 (patch) | |
tree | 22fcd74d43b472061d395dfb1f0e251985f877d7 /desktop/source/app/app.cxx | |
parent | 72927f810ac2e6343a2fe78c39c286104ef80d9e (diff) |
Merge the --invisible and --headless options
No need to have both.
Change-Id: Ibd2f9f6d352ffb52bf43f4e1a4f69f60a60458ff
Diffstat (limited to 'desktop/source/app/app.cxx')
-rw-r--r-- | desktop/source/app/app.cxx | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index bb352e2ed204..cd15720a6419 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -439,8 +439,7 @@ void FatalError(const OUString& sMessage) static bool ShouldSuppressUI(const CommandLineArgs& rCmdLine) { - return rCmdLine.IsInvisible() || - rCmdLine.IsHeadless() || + return rCmdLine.IsHeadless() || rCmdLine.IsQuickstart(); } @@ -1365,7 +1364,7 @@ int Desktop::Main() // there is no other instance using our data files from a remote host m_xLockfile.reset(new Lockfile); - if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() && + if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsNoLockcheck() && !m_xLockfile->check( Lockfile_execWarning )) { // Lockfile exists, and user clicked 'no' @@ -1501,7 +1500,7 @@ int Desktop::Main() true); if ( !pExecGlobals->bRestartRequested ) { - if ((!rCmdLineArgs.WantsToLoadDocument() && !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsQuickstart()) && + if ((!rCmdLineArgs.WantsToLoadDocument() && !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsQuickstart()) && (SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) && (!bExistsRecoveryData ) && (!bExistsSessionData ) && @@ -1533,7 +1532,7 @@ int Desktop::Main() SetSplashScreenProgress(60); #if ENABLE_TELEPATHY - bool bListen = rCmdLineArgs.IsInvisible(); + bool bListen = rCmdLineArgs.IsHeadless(); TeleManager::init( bListen ); #endif @@ -1550,7 +1549,7 @@ int Desktop::Main() SetSplashScreenProgress(80); - if ( !bTerminateRequested && !rCmdLineArgs.IsInvisible() && + if ( !bTerminateRequested && !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsNoQuickstart() ) InitializeQuickstartMode( xContext ); @@ -1599,7 +1598,7 @@ int Desktop::Main() if ( !pExecGlobals->bRestartRequested ) { // if this run of the office is triggered by restart, some additional actions should be done - DoRestartActionsIfNecessary( !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsNoQuickstart() ); + DoRestartActionsIfNecessary( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsNoQuickstart() ); Execute(); } @@ -2373,7 +2372,7 @@ void Desktop::OpenClients() if ( xList->hasElements() ) return; - if ( rArgs.IsQuickstart() || rArgs.IsInvisible() || Application::AnyInput( VclInputFlags::APPEVENT ) ) + if ( rArgs.IsQuickstart() || rArgs.IsHeadless() || Application::AnyInput( VclInputFlags::APPEVENT ) ) // soffice was started as tray icon ... return; @@ -2498,7 +2497,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) createAcceptor(rAppEvent.GetStringData()); break; case ApplicationEvent::TYPE_APPEAR: - if ( !GetCommandLineArgs().IsInvisible() ) + if ( !GetCommandLineArgs().IsHeadless() ) { Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); @@ -2552,7 +2551,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) case ApplicationEvent::TYPE_OPEN: { const CommandLineArgs& rCmdLine = GetCommandLineArgs(); - if ( !rCmdLine.IsInvisible() && !rCmdLine.IsTerminateAfterInit() ) + if ( !rCmdLine.IsHeadless() && !rCmdLine.IsTerminateAfterInit() ) { ProcessDocumentsRequest* pDocsRequest = new ProcessDocumentsRequest( rCmdLine.getCwdUrl()); @@ -2573,7 +2572,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) case ApplicationEvent::TYPE_PRINT: { const CommandLineArgs& rCmdLine = GetCommandLineArgs(); - if ( !rCmdLine.IsInvisible() && !rCmdLine.IsTerminateAfterInit() ) + if ( !rCmdLine.IsHeadless() && !rCmdLine.IsTerminateAfterInit() ) { ProcessDocumentsRequest* pDocsRequest = new ProcessDocumentsRequest( rCmdLine.getCwdUrl()); @@ -2596,13 +2595,13 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) } break; case ApplicationEvent::TYPE_QUICKSTART: - if ( !GetCommandLineArgs().IsInvisible() ) + if ( !GetCommandLineArgs().IsHeadless() ) { // If the office has been started the second time its command line arguments are sent through a pipe // connection to the first office. We want to reuse the quickstart option for the first office. // NOTICE: The quickstart service must be initialized inside the "main thread", so we use the // application events to do this (they are executed inside main thread)!!! - // Don't start quickstart service if the user specified "--invisible" on the command line! + // Don't start quickstart service if the user specified "--headless" on the command line! Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); css::office::Quickstart::createStart(xContext, true/*Quickstart*/); } @@ -2648,8 +2647,7 @@ void Desktop::OpenSplashScreen() { const CommandLineArgs &rCmdLine = GetCommandLineArgs(); // Show intro only if this is normal start (e.g. no server, no quickstart, no printing ) - if ( !rCmdLine.IsInvisible() && - !rCmdLine.IsHeadless() && + if ( !rCmdLine.IsHeadless() && !rCmdLine.IsQuickstart() && !rCmdLine.IsMinimized() && !rCmdLine.IsNoLogo() && |