summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-03-30 17:41:15 +0300
committerTor Lillqvist <tml@collabora.com>2015-03-30 17:49:06 +0300
commit4fe56f3b9af814430a28a1880799f450fb8146b9 (patch)
tree22fcd74d43b472061d395dfb1f0e251985f877d7 /desktop
parent72927f810ac2e6343a2fe78c39c286104ef80d9e (diff)
Merge the --invisible and --headless options
No need to have both. Change-Id: Ibd2f9f6d352ffb52bf43f4e1a4f69f60a60458ff
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx28
-rw-r--r--desktop/source/app/cmdlineargs.cxx9
-rw-r--r--desktop/source/app/cmdlineargs.hxx4
-rw-r--r--desktop/source/app/cmdlinehelp.cxx4
-rw-r--r--desktop/source/app/officeipcthread.cxx6
-rw-r--r--desktop/unx/source/args.c1
6 files changed, 20 insertions, 32 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() &&
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 9bbc36ffa29f..d66a3063cc1e 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -169,10 +169,6 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
{
m_minimized = true;
}
- else if ( oArg == "invisible" )
- {
- m_invisible = true;
- }
else if ( oArg == "norestore" )
{
m_norestore = true;
@@ -181,7 +177,8 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
{
m_nodefault = true;
}
- else if ( oArg == "headless" )
+ else if ( oArg == "invisible" ||
+ oArg == "headless" )
{
setHeadless();
}
@@ -591,10 +588,8 @@ void CommandLineArgs::InitParamValues()
m_minimized = false;
m_norestore = false;
#ifdef LIBO_HEADLESS
- m_invisible = true;
m_headless = true;
#else
- m_invisible = false;
m_headless = false;
#endif
m_quickstart = false;
diff --git a/desktop/source/app/cmdlineargs.hxx b/desktop/source/app/cmdlineargs.hxx
index 7b8c0da62dff..0d8b3626abdf 100644
--- a/desktop/source/app/cmdlineargs.hxx
+++ b/desktop/source/app/cmdlineargs.hxx
@@ -57,7 +57,6 @@ class CommandLineArgs: private boost::noncopyable
// Access to bool parameters
bool IsMinimized() const { return m_minimized;}
- bool IsInvisible() const { return m_invisible;}
bool IsNoRestore() const { return m_norestore;}
bool IsNoDefault() const { return m_nodefault;}
bool IsHeadless() const { return m_headless;}
@@ -111,7 +110,7 @@ class CommandLineArgs: private boost::noncopyable
// Special analyzed states (does not match directly to a command line parameter!)
bool IsEmpty() const { return m_bEmpty;}
- void setHeadless() { m_headless = true; m_invisible = true; }
+ void setHeadless() { m_headless = true; }
private:
void ParseCommandLine_Impl( Supplier& supplier );
@@ -120,7 +119,6 @@ class CommandLineArgs: private boost::noncopyable
boost::optional< OUString > m_cwdUrl;
bool m_minimized;
- bool m_invisible;
bool m_norestore;
bool m_headless;
bool m_quickstart;
diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index 61694b8f2791..5ebb929e2ea2 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -52,7 +52,6 @@ namespace desktop
"Options:\n";
const char aCmdLineHelp_left[] =
"--minimized \n"\
- "--invisible \n"\
"--norestore \n"\
"--quickstart \n"\
"--nologo \n"\
@@ -73,13 +72,12 @@ namespace desktop
"-n \n";
const char aCmdLineHelp_right[] =
"keep startup bitmap minimized.\n"\
- "no startup screen, no default document and no UI.\n"\
"suppress restart/restore after fatal errors.\n"\
"starts the quickstart service\n"\
"don't show startup screen.\n"\
"don't check for remote instances using the installation\n"\
"don't start with an empty document\n"\
- "like invisible but no user interaction at all.\n"\
+ "no startup screen, no default document and no user interaction.\n"\
"show this message and exit.\n"\
"display the version information.\n"\
"create new text document.\n"\
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index aec9b3c0f279..fad8a908f0fe 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -819,7 +819,7 @@ void OfficeIPCThread::execute()
cProcessed.reset();
pRequest->pcProcessed = &cProcessed;
- // Print requests are not dependent on the --invisible cmdline argument as they are
+ // Print requests are not dependent on the --headless cmdline argument as they are
// loaded with the "hidden" flag! So they are always checked.
pRequest->aPrintList = aCmdLineArgs->GetPrintList();
bDocRequestSent |= !pRequest->aPrintList.empty();
@@ -827,10 +827,10 @@ void OfficeIPCThread::execute()
pRequest->aPrinterName = aCmdLineArgs->GetPrinterName();
bDocRequestSent |= !( pRequest->aPrintToList.empty() || pRequest->aPrinterName.isEmpty() );
- if ( !rCurrentCmdLineArgs.IsInvisible() )
+ if ( !rCurrentCmdLineArgs.IsHeadless() )
{
// Read cmdline args that can open/create documents. As they would open a window
- // they are only allowed if the "--invisible" is currently not used!
+ // they are only allowed if the "--headless" is currently not used!
pRequest->aOpenList = aCmdLineArgs->GetOpenList();
bDocRequestSent |= !pRequest->aOpenList.empty();
pRequest->aViewList = aCmdLineArgs->GetViewList();
diff --git a/desktop/unx/source/args.c b/desktop/unx/source/args.c
index 34d3064abd16..2422aded64a0 100644
--- a/desktop/unx/source/args.c
+++ b/desktop/unx/source/args.c
@@ -34,7 +34,6 @@ static struct {
/* no splash */
{ "nologo", 1, 0, 0, 0, NULL },
{ "headless", 1, 0, 0, 0, NULL },
- { "invisible", 1, 0, 0, 0, NULL },
{ "quickstart", 1, 0, 0, 0, NULL },
{ "minimized", 1, 0, 0, 0, NULL },
{ "convert-to", 1, 0, 0, 0, NULL },