Kaydet (Commit) 0df51086 authored tarafından jan Iversen's avatar jan Iversen

iOS, make linking of LO dependent

Added a flag to remove need for LO in app, this allows faster change
of UI changes.

Change-Id: Iad3be518733cbd3ce092eebab76f8f66e91e579d
üst dd292ad0
......@@ -9,16 +9,16 @@
#include <TargetConditionals.h>
#define LOK_USE_UNSTABLE_API
#include <LibreOfficeKit/LibreOfficeKitInit.h>
#include <osl/process.h>
#include <unicode/udata.h>
#include <unicode/ucnv.h>
//#define NO_LO
// generated by solenv/bin/native-code.py:
#ifndef NO_LO
#include "native-code.mm"
// Force reference to libreofficekit_hook
extern "C" __attribute__((used)) void *libreofficekit_hook(const char *);
static __attribute__((used)) void *(*foop)(const char *) = libreofficekit_hook;
......@@ -26,6 +26,7 @@ static __attribute__((used)) void *(*foop)(const char *) = libreofficekit_hook;
// pointers to our instance
static LibreOfficeKit* kit;
static LibreOfficeKitDocument* document;
#endif
......@@ -38,15 +39,19 @@ extern "C" int BridgeLOkit_Init(const char *path)
strcpy(bufUserPath + strlen(path), "/user");
// Initialize LibreOfficeKit
#ifndef NO_LO
if (!kit)
kit = lok_init_2(path, bufUserPath);
#endif
return 0;
}
int LOkit_open(char *file)
{
#ifndef NO_LO
document = kit->pClass->documentLoad(kit, file);
document->pClass->initializeForRendering(document, "");
#endif
return 0;
}
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