[Libreoffice-commits] core.git: 3 commits - desktop/source include/LibreOfficeKit ios/source
jan Iversen
jani at libreoffice.org
Fri Jan 12 12:13:57 UTC 2018
desktop/source/lib/init.cxx | 2 +-
include/LibreOfficeKit/LibreOfficeKitInit.h | 19 +++++++++++--------
ios/source/LibreOfficeKit.c | 6 ------
3 files changed, 12 insertions(+), 15 deletions(-)
New commits:
commit e25d7cc9052cddbaed24cea8a2ea88d8d785d083
Author: jan Iversen <jani at libreoffice.org>
Date: Fri Jan 12 13:11:33 2018 +0100
iOS, removed hook reference
Change-Id: I9a9d9613313ac8d0e611f4d7f766c42ab71963e1
diff --git a/ios/source/LibreOfficeKit.c b/ios/source/LibreOfficeKit.c
index e9344ca89a2c..b403b356d171 100644
--- a/ios/source/LibreOfficeKit.c
+++ b/ios/source/LibreOfficeKit.c
@@ -18,12 +18,6 @@
#include "native-code.h"
-// Force reference to libreofficekit_hook
-extern __attribute__((used))
-LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_path);
-static __attribute__((used))
-LibreOfficeKit *(*foop)(const char *, const char *) = libreofficekit_hook_2;
-
// pointers to our instance
static LibreOfficeKit* kit;
static LibreOfficeKitDocument* document;
commit 162ea65aae8addf606d62bd4cace5c9246002964
Author: jan Iversen <jani at libreoffice.org>
Date: Fri Jan 12 13:08:59 2018 +0100
iOS, stop trying to do dynamic load in init()
LibreOfficeKit, tries traditionally to load a dylib, and
locate the symbols, for iOS this is already linked to a
single Kit.o.
Code is changed to a simple call
Change-Id: Ie94a447260cb3007e7e2b56c1b67896ad40d79d3
diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h
index a0c111a9e0e2..f33a9868cf26 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -68,7 +68,6 @@ extern "C"
{
(void)pPath;
}
-#endif // IOS
static void *lok_dlsym(void *Hnd, const char *pName)
{
@@ -79,6 +78,7 @@ extern "C"
{
return dlclose(Hnd);
}
+#endif // IOS
#else
@@ -165,12 +165,12 @@ extern "C"
}
#endif
+#if !defined(IOS)
static void *lok_dlopen( const char *install_path, char ** _imp_lib )
{
char *imp_lib;
void *dlhandle;
-#if !defined(IOS)
size_t partial_length, imp_lib_size;
struct stat dir_st;
@@ -233,14 +233,10 @@ static void *lok_dlopen( const char *install_path, char ** _imp_lib )
return NULL;
}
}
-#else
- (void)install_path;
- imp_lib = strdup("the app executable");
- dlhandle = RTLD_MAIN_ONLY;
-#endif
*_imp_lib = imp_lib;
return dlhandle;
}
+#endif
typedef LibreOfficeKit *(LokHookFunction)( const char *install_path);
@@ -248,10 +244,14 @@ typedef LibreOfficeKit *(LokHookFunction2)( const char *install_path, const char
typedef int (LokHookPreInit) ( const char *install_path, const char *user_profile_url );
+extern __attribute__ ((visibility("default")))
+ LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_path);
+
static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_profile_url )
{
- char *imp_lib;
+#if !defined(IOS)
void *dlhandle;
+ char *imp_lib;
LokHookFunction *pSym;
LokHookFunction2 *pSym2;
@@ -288,6 +288,9 @@ static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_p
// dlhandle is "leaked"
// coverity[leaked_storage]
return pSym2( install_path, user_profile_url );
+#else
+ return libreofficekit_hook_2( install_path, user_profile_url );
+#endif
}
static
commit 433063362df51e4b3e128f3c913070629793f148
Author: jan Iversen <jani at libreoffice.org>
Date: Fri Jan 12 13:06:37 2018 +0100
iOS, correct rc file name
the rc is called fundamentalrc and not sofficerc
Now it is getting loaded.
Change-Id: Id0aab9609f8499e194b21e2d8afa74525a5a1c62
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7b97d1beeca0..99c3f997ae68 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3438,7 +3438,7 @@ static bool initialize_uno(const OUString& aAppProgramURL)
{
#ifdef IOS
// For iOS we already hardcode the inifile as "rc" in the .app directory.
- rtl::Bootstrap::setIniFilename(aAppProgramURL + "/" SAL_CONFIGFILE("soffice"));
+ rtl::Bootstrap::setIniFilename(aAppProgramURL + "/" SAL_CONFIGFILE("fundamental"));
xContext = cppu::defaultBootstrap_InitialComponentContext(aAppProgramURL + "/rc");
#elif defined MACOSX
rtl::Bootstrap::setIniFilename(aAppProgramURL + "/../Resources/" SAL_CONFIGFILE("soffice"));
More information about the Libreoffice-commits
mailing list