Kaydet (Commit) 4dde5a62 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Check osl::LibreOfficeKit::isActive(), not Application::IsConsoleOnly()

Console-only is really orthogonal to other things; it has one specific meaning
that is relevant on OS X only, see svapp.hxx. Let's not overload it for
LibreOfficeKit things.

Change-Id: I8b94c3a4e6f938ad70f1555a12dac8596819e031
üst 8955af9b
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "dispatchwatcher.hxx" #include "dispatchwatcher.hxx"
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <stdio.h> #include <stdio.h>
#include <osl/lok.hxx>
#include <osl/process.h> #include <osl/process.h>
#include <unotools/bootstrap.hxx> #include <unotools/bootstrap.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
...@@ -460,13 +461,13 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread() ...@@ -460,13 +461,13 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
#ifndef ANDROID // On Android it might be that we still for some reason need the pipe? #ifndef ANDROID // On Android it might be that we still for some reason need the pipe?
// When console-only (which includes in LibreOfficeKit-based programs) we want to be totally // In LibreOfficeKit-based programs we want to be totally independent from any other LibreOffice
// independent from any other LibreOffice instance or LOKit-using program. Certainly no need for // instance or LOKit-using program. Certainly no need for any IPC pipes by definition, as we
// any IPC pipes by definition, as we don't have any reason to do any IPC. Why we even call this // don't have any reason to do any IPC. Why we even call this EnableOfficeIPCThread function
// EnableOfficeIPCThread function from LibreOfficeKit's lo_initialize() I am not completely // from LibreOfficeKit's lo_initialize() I am not completely sure, but that code, and this, is
// sure, but that code, and this, is such horrible crack that I don't want to change it too much. // such horrible crack that I don't want to change it too much.
if (Application::IsConsoleOnly()) if (osl::LibreOfficeKit::isActive())
{ {
// Setting nPipeMode to PIPEMODE_CREATED causes the trivial path to be taken below, starting // Setting nPipeMode to PIPEMODE_CREATED causes the trivial path to be taken below, starting
// the listeing thread. (Which will immediately finish, see the execute() function, but what // the listeing thread. (Which will immediately finish, see the execute() function, but what
...@@ -706,7 +707,7 @@ void OfficeIPCThread::execute() ...@@ -706,7 +707,7 @@ void OfficeIPCThread::execute()
#if HAVE_FEATURE_DESKTOP || defined(ANDROID) #if HAVE_FEATURE_DESKTOP || defined(ANDROID)
#ifndef ANDROID #ifndef ANDROID
if (Application::IsConsoleOnly()) if (osl::LibreOfficeKit::isActive())
return; return;
#endif #endif
......
...@@ -891,7 +891,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath) ...@@ -891,7 +891,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
desktop::Desktop::GetCommandLineArgs().setHeadless(); desktop::Desktop::GetCommandLineArgs().setHeadless();
Application::EnableHeadlessMode(true); Application::EnableHeadlessMode(true);
Application::EnableConsoleOnly();
// This is horrible crack. I really would want to go back to simply just call // This is horrible crack. I really would want to go back to simply just call
// InitVCL() here. The OfficeIPCThread thing is just horrible. // InitVCL() here. The OfficeIPCThread thing is just horrible.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment