Kaydet (Commit) 541a7ad2 authored tarafından Andrzej Hunt's avatar Andrzej Hunt Kaydeden (comit) Tomaž Vajngerl

Make sure LOK is actually headless.

This prevents e.g. the document recovery dialog from trying to be shown.

Change-Id: I253720f7fa1abd1c053670434f8394473517b670
üst 6ee3c109
......@@ -677,6 +677,25 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
try
{
// We specifically need to make sure we have the "headless"
// command arg set (various code specifically checks via
// CommandLineArgs). We could alternatively add some other
// flag elsewhere to indicate headlessness, which would
// then be set from here or via CommandLineArgs.
// (The first argument is treated specially by osl_setCommandArgs
// however it is valid to make it \0 instead.)
char sName[] = "";
char sHeadless[] = "--headless";
char* pArgs[2] = { sName, sHeadless };
// If we've set up the command args elsewhere then we cannot do it
// again (as an assert will fire), this will be the case e.g.
// for unit tests (and possibly if UNO is being used in addition
// to LOK in an external program).
if (!osl_areCommandArgsSet())
{
osl_setCommandArgs(2, pArgs);
}
initialize_uno(aAppURL);
force_c_locale();
......
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