[Libreoffice-commits] core.git: desktop/source vcl/unx
Stephan Bergmann
sbergman at redhat.com
Wed Dec 10 09:29:18 PST 2014
desktop/source/lib/init.cxx | 4 ++--
vcl/unx/generic/plugadapt/salplug.cxx | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 68e2dd0dfbd7f1cec1771f68e65f46045365cf1f
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Dec 10 18:28:11 2014 +0100
Make IsHeadlessModeRequested hack work for LOK
Change-Id: I30bf474fc44b122c8b7218e187c822a8784783fd
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5a410e4..282cb99 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -740,6 +740,8 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
// CommandLineArgs):
desktop::Desktop::GetCommandLineArgs().setHeadless();
+ Application::EnableHeadlessMode(true);
+
// We could use InitVCL() here -- and used to before using soffice_main,
// however that now deals with the initialisation for us (and it's not
// possible to try to set up VCL twice.
@@ -773,8 +775,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
return false;
}
- Application::EnableHeadlessMode(true);
-
ErrorHandler::RegisterDisplay(aBasicErrorFunc);
SAL_INFO("lok", "LOK Initialized");
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index e2870f3..80b5acf 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -43,6 +43,9 @@ namespace {
// Application::EnableHeadlessMode has potentially been called:
bool IsHeadlessModeRequested()
{
+ if (Application::IsHeadlessModeEnabled()) {
+ return true;
+ }
sal_uInt32 n = rtl_getAppCommandArgCount();
for (sal_uInt32 i = 0; i < n; ++i) {
OUString arg;
More information about the Libreoffice-commits
mailing list