[Libreoffice-commits] online.git: 2 commits - loleaflet/dist loolwsd/bundled loolwsd/LOKitClient.cpp

Pranav Kant pranavk at collabora.com
Wed Jun 22 09:26:09 UTC 2016


 loleaflet/dist/toolbar/toolbar.js                            |    5 -
 loolwsd/LOKitClient.cpp                                      |    2 
 loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h      |   11 ++-
 loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h |   31 +++++++++++
 loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h  |   10 +--
 5 files changed, 45 insertions(+), 14 deletions(-)

New commits:
commit 42ebabb3a9878f98368af87db477400142ca3907
Author: Pranav Kant <pranavk at collabora.com>
Date:   Wed Jun 22 14:46:15 2016 +0530

    Update bundled headers
    
    Change-Id: Ifa69fec15df328d97d5d2c207dcd47c0d3ff660d

diff --git a/loolwsd/LOKitClient.cpp b/loolwsd/LOKitClient.cpp
index 937cc6d..46e3794 100644
--- a/loolwsd/LOKitClient.cpp
+++ b/loolwsd/LOKitClient.cpp
@@ -67,6 +67,8 @@ extern "C"
             CASE(DOCUMENT_PASSWORD_TO_MODIFY);
             CASE(ERROR);
             CASE(CONTEXT_MENU);
+            CASE(INVALIDATE_VIEW_CURSOR);
+            CASE(TEXT_VIEW_SELECTION);
 #undef CASE
         }
         std::cout << " payload: " << pPayload << std::endl;
diff --git a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index 110d4d5..559d28a 100644
--- a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -75,6 +75,9 @@ struct _LibreOfficeKitClass
     void (*setDocumentPassword) (LibreOfficeKit* pThis,
             char const* pURL,
             char const* pPassword);
+
+    /// @see lok::Office::getVersionInfo().
+    char* (*getVersionInfo) (LibreOfficeKit* pThis);
 #endif
 
 };
@@ -209,13 +212,13 @@ struct _LibreOfficeKitDocumentClass
     void (*setClientVisibleArea) (LibreOfficeKitDocument* pThis, int nX, int nY, int nWidth, int nHeight);
 
     /// @see lok::Document::createView().
-    int (*createView) (LibreOfficeKitDocument* pThis);
+    uintptr_t (*createView) (LibreOfficeKitDocument* pThis);
     /// @see lok::Document::destroyView().
-    void (*destroyView) (LibreOfficeKitDocument* pThis, int nId);
+    void (*destroyView) (LibreOfficeKitDocument* pThis, uintptr_t nId);
     /// @see lok::Document::setView().
-    void (*setView) (LibreOfficeKitDocument* pThis, int nId);
+    void (*setView) (LibreOfficeKitDocument* pThis, uintptr_t nId);
     /// @see lok::Document::getView().
-    int (*getView) (LibreOfficeKitDocument* pThis);
+    uintptr_t (*getView) (LibreOfficeKitDocument* pThis);
     /// @see lok::Document::getViews().
     int (*getViews) (LibreOfficeKitDocument* pThis);
 
diff --git a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 4b8ff35..4dfb8be 100644
--- a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -312,6 +312,37 @@ typedef enum
      */
     LOK_CALLBACK_CONTEXT_MENU,
 
+    /**
+     * The size and/or the position of the view cursor changed. A view cursor
+     * is a cursor of an other view, the current view can't change it.
+     *
+     * The payload format:
+     *
+     * {
+     *     "viewId": "..."
+     *     "rectangle": "..."
+     * }
+     *
+     * - viewId is a value returned earlier by lok::Document::createView()
+     * - rectangle uses the format of LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR
+     */
+    LOK_CALLBACK_INVALIDATE_VIEW_CURSOR,
+
+    /**
+     * The the text selection in one of the other views has changed.
+     *
+     * The payload format:
+     *
+     * {
+     *     "viewId": "..."
+     *     "selection": "..."
+     * }
+     *
+     * - viewId is a value returned earlier by lok::Document::createView()
+     * - selection uses the format of LOK_CALLBACK_TEXT_SELECTION.
+     */
+    LOK_CALLBACK_TEXT_VIEW_SELECTION,
+
 }
 LibreOfficeKitCallbackType;
 
diff --git a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
index f1e513e..bdda642 100644
--- a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -212,11 +212,11 @@ static void *lok_dlopen( const char *install_path, char ** _imp_lib )
 
 typedef LibreOfficeKit *(LokHookFunction)( const char *install_path);
 
-typedef LibreOfficeKit *(LokHookFunction2)( const char *install_path, const char *user_profile_path );
+typedef LibreOfficeKit *(LokHookFunction2)( const char *install_path, const char *user_profile_url );
 
-typedef int             (LokHookPreInit)  ( const char *install_path, const char *user_profile_path );
+typedef int             (LokHookPreInit)  ( const char *install_path, const char *user_profile_url );
 
-static LibreOfficeKit *lok_init_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;
     void *dlhandle;
@@ -230,7 +230,7 @@ static LibreOfficeKit *lok_init_2( const char *install_path,  const char *user_p
     pSym2 = (LokHookFunction2 *) lok_dlsym(dlhandle, "libreofficekit_hook_2");
     if (!pSym2)
     {
-        if (user_profile_path != NULL)
+        if (user_profile_url != NULL)
         {
             fprintf( stderr, "the LibreOffice version in '%s' does not support passing a user profile to the hook function\n",
                      imp_lib );
@@ -255,7 +255,7 @@ static LibreOfficeKit *lok_init_2( const char *install_path,  const char *user_p
     free( imp_lib );
     // dlhandle is "leaked"
     // coverity[leaked_storage]
-    return pSym2( install_path, user_profile_path );
+    return pSym2( install_path, user_profile_url );
 }
 
 static
commit e48a36816ecc0695b178d761481da237aae010a8
Author: Pranav Kant <pranavk at collabora.com>
Date:   Wed Jun 22 14:43:47 2016 +0530

    loleaflet: Remove Help button from toolbar
    
    ... as we have this as 'Keyboard shortcuts' in menubar now.
    
    Change-Id: I01f3735c6b1ac07d8bced2f98fc9dd514a178ce0

diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 9417931..1ae7b40 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -210,9 +210,6 @@ function onClick(id) {
 		w2ui['toolbar-up-more'].render();
 		resizeToolbar();
 	}
-	else if (id === 'help') {
-		map.showLOKeyboardHelp();
-	}
 	else if (id === 'close') {
 		window.parent.postMessage('close', '*');
 		map.remove();
@@ -353,8 +350,6 @@ $(function () {
 			{type: 'button',  id: 'inserttable',  img: 'inserttable', hint: _('Insert table')},
 			{type: 'button',  id: 'annotation', img: 'annotation', hint: _('Insert comment'), uno: 'InsertAnnotation'},
 			{type: 'button',  id: 'insertgraphic',  img: 'insertgraphic', hint: _('Insert graphic')},
-			{type: 'break'},
-			{type: 'button',  id: 'help',  img: 'help', hint: _('Help')},
 			{type: 'html', id: 'right'},
 			{type: 'button',  id: 'more', img: 'more', hint: _('More')},
 			{type: 'button',  id: 'close',  img: 'closedoc', hint: _('Close document'), hidden: true}


More information about the Libreoffice-commits mailing list