summaryrefslogtreecommitdiffstats
path: root/ios/LibreOfficeLight
diff options
context:
space:
mode:
authorjan Iversen <jani@libreoffice.org>2017-10-11 11:58:32 +0200
committerjan Iversen <jani@libreoffice.org>2017-10-11 12:08:10 +0200
commit0df51086b71af8755f3eacca8a3c2dd1329fa191 (patch)
tree0a210f33fdb57c015653e9e3563618ca46153eb3 /ios/LibreOfficeLight
parentiOS, support for more 3rd party libraries (diff)
downloadcore-0df51086b71af8755f3eacca8a3c2dd1329fa191.tar.gz
core-0df51086b71af8755f3eacca8a3c2dd1329fa191.zip
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
Diffstat (limited to 'ios/LibreOfficeLight')
-rw-r--r--ios/LibreOfficeLight/LibreOfficeLight/LibreOfficeKit.mm11
1 files changed, 8 insertions, 3 deletions
diff --git a/ios/LibreOfficeLight/LibreOfficeLight/LibreOfficeKit.mm b/ios/LibreOfficeLight/LibreOfficeLight/LibreOfficeKit.mm
index 677386ce196b..501c21cea8ae 100644
--- a/ios/LibreOfficeLight/LibreOfficeLight/LibreOfficeKit.mm
+++ b/ios/LibreOfficeLight/LibreOfficeLight/LibreOfficeKit.mm
@@ -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;
}