diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/bundled/include/LibreOfficeKit/LibreOfficeKit.h index ebc112fb7..7492fcc7a 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h @@ -302,6 +302,7 @@ struct _LibreOfficeKitDocumentClass /// @see lok::Document::postExtTextInputEvent void (*postExtTextInputEvent) (LibreOfficeKitDocument* pThis, + unsigned nWindowId, int nType, const char* pText); diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx index 098356089..55e29ebda 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -540,12 +540,14 @@ public: /** * Post the text input from external input window, like IME * + * @param nWindowId Specify the window id to post the input event to. If + * nWindow is 0, the event is posted into the document * @param nType see LibreOfficeKitExtTextInputType * @param pText Text for LOK_EXT_TEXTINPUT */ - void postExtTextInputEvent(int nType, const char* pText) + void postExtTextInputEvent(unsigned nWindowId, int nType, const char* pText) { - mpDoc->pClass->postExtTextInputEvent(mpDoc, nType, pText); + mpDoc->pClass->postExtTextInputEvent(mpDoc, nWindowId, nType, pText); } #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h index ccbc3b96b..b90aa6279 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -563,7 +563,7 @@ typedef enum * - "invalidate" - the area as described by "rectangle" is invalidated * Clients must request the new area * - "cursor_invalidate" - cursor is invalidated. New position is in "rectangle" - * - "cursor_visible" - cursor visible status is changed. Status is availabe + * - "cursor_visible" - cursor visible status is changed. Status is available * in "visible" field * - "close" - window is closed */ diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h b/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h index a0c111a9e..ce5054ac9 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h @@ -68,7 +68,6 @@ extern "C" { (void)pPath; } -#endif // IOS static void *lok_dlsym(void *Hnd, const char *pName) { @@ -79,10 +78,10 @@ extern "C" { return dlclose(Hnd); } +#endif // IOS #else - #pragma warning(disable:4996) #if !defined WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif @@ -165,12 +164,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 +232,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 +243,16 @@ typedef LibreOfficeKit *(LokHookFunction2)( const char *install_path, const char typedef int (LokHookPreInit) ( const char *install_path, const char *user_profile_url ); +#if defined(IOS) +extern __attribute__ ((visibility("default"))) + LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_path); +#endif + 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 +289,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