[Libreoffice-commits] online.git: bundled/include

Andras Timar andras.timar at collabora.com
Thu Feb 15 09:13:10 UTC 2018


 bundled/include/LibreOfficeKit/LibreOfficeKit.h      |    1 
 bundled/include/LibreOfficeKit/LibreOfficeKit.hxx    |    6 +++--
 bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h |    2 -
 bundled/include/LibreOfficeKit/LibreOfficeKitInit.h  |   22 +++++++++++--------
 4 files changed, 19 insertions(+), 12 deletions(-)

New commits:
commit 68b17446a0c08f28a195c9dc9fdee78e2c10b991
Author: Andras Timar <andras.timar at collabora.com>
Date:   Thu Feb 15 10:08:47 2018 +0100

    Updated LibreOfficeKit headers
    
    Change-Id: I6da94250d81d1f62d8f2191660b37b960033f11c

diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index ebc112fb..7492fcc7 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 09835608..55e29ebd 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 ccbc3b96..b90aa627 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 a0c111a9..ce5054ac 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


More information about the Libreoffice-commits mailing list