diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-10 18:28:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-10 18:28:43 +0100 |
commit | 68e2dd0dfbd7f1cec1771f68e65f46045365cf1f (patch) | |
tree | 5a3bc343f940921b1da427b8cbca7523c4b20f2d | |
parent | 7594c0c29d8f81c74d3e181e0197cf31c492a42e (diff) |
Make IsHeadlessModeRequested hack work for LOK
Change-Id: I30bf474fc44b122c8b7218e187c822a8784783fd
-rw-r--r-- | desktop/source/lib/init.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/plugadapt/salplug.cxx | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 5a410e47e2b8..282cb9917881 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 e2870f39a8bd..80b5acf44722 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; |