[Libreoffice-commits] core.git: desktop/source desktop/unx sysui/desktop
Tor Lillqvist
tml at collabora.com
Mon Mar 30 07:50:02 PDT 2015
desktop/source/app/app.cxx | 28 +++++++++++++---------------
desktop/source/app/cmdlineargs.cxx | 9 ++-------
desktop/source/app/cmdlineargs.hxx | 4 +---
desktop/source/app/cmdlinehelp.cxx | 4 +---
desktop/source/app/officeipcthread.cxx | 6 +++---
desktop/unx/source/args.c | 1 -
sysui/desktop/man/libreoffice.1 | 19 +++----------------
7 files changed, 23 insertions(+), 48 deletions(-)
New commits:
commit 4fe56f3b9af814430a28a1880799f450fb8146b9
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Mar 30 17:41:15 2015 +0300
Merge the --invisible and --headless options
No need to have both.
Change-Id: Ibd2f9f6d352ffb52bf43f4e1a4f69f60a60458ff
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index bb352e2..cd15720 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 9bbc36f..d66a306 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 7b8c0da..0d8b362 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 61694b8..5ebb929 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 aec9b3c..fad8a90 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 34d3064..2422ade 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 },
diff --git a/sysui/desktop/man/libreoffice.1 b/sysui/desktop/man/libreoffice.1
index f91101b..5db40a24 100644
--- a/sysui/desktop/man/libreoffice.1
+++ b/sysui/desktop/man/libreoffice.1
@@ -7,7 +7,7 @@ libreoffice \- LibreOffice office suite
[\fB\-\-accept\=\fIaccept\-string\fR] [\fB\-\-base\fR] [\fB\-\-calc\fR]
[\fB\-\-convert\-to\fR output_file_extension[:output_filter_name] [\-\-outdir output_dir] \fIfile\fR]...
[\fB\-\-display \fIdisplay\fR] [\fB\-\-draw\fR] [\fB\-\-global\fR] [\fB\-\-headless\fR]
-[\fB\-\-help\fR|\fB\-h\fR|\fB\-?\fR] [\fB\-\-impress\fR] [\fB\-\-invisible\fR] [\fB\-\-infilter="<filter>"\fR]
+[\fB\-\-help\fR|\fB\-h\fR|\fB\-?\fR] [\fB\-\-impress\fR] [\fB\-\-infilter="<filter>"\fR]
[\fB\-\-math\fR] [\fB\-\-minimized\fR] [\fB\-n \fIfile\fR]... [\fB\-\-nodefault\fR]
[\fB\-\-nolockcheck\fR] [\fB\-\-nologo\fR] [\fB\-\-norestore\fR]
[\fB\-o \fIfile\fR]... [\fB\-p \fIfile\fR...]
@@ -90,13 +90,12 @@ Starts with a new Global document.
.TP
\fB\-\-headless\fR
-Starts in "headless mode", which allows using the application without user a
+Starts in invisible or "headless" mode, which allows using the application without user a
interface.
This special mode can be used when the application is controlled by external
clients via the API.
-It implies \-\-invisible and strictly ignores any GUI environment.
\-\-quickstart does not work with this parameter.
.TP
@@ -108,18 +107,6 @@ Lists LibreOffice command line parameters.
Starts with a new Impress document.
.TP
-\fB\-\-invisible\fR
-Starts in invisible mode.
-
-Neither the start\-up logo nor the initial program window will be visible.
-LO can be controlled and documents and dialogs can be opened via the API.
-
-When started with this parameter, it can only be quit using the taskmanager (Windows)
-or the kill command (UNIX based systems).
-
-\-\-quickstart does not work with this parameter.
-
-.TP
\fB\-\-infilter="<filter>"\fR
Force an input filter type if possible.
For example \-\-infilter="Calc Office Open XML" only
@@ -204,7 +191,7 @@ If a file name contains spaces, then it must be enclosed in quotation marks.
Starts LO with it's quick starter.
\fB\-\-quickstart disable the quick starter.
-Does not work with \-\-invisible or \-\-headless.
+Does not work with \-\-headless.
.TP
\fB\-\-show \fIImpress file\fR...
More information about the Libreoffice-commits
mailing list