[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - libreofficekit/source

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 26 11:04:38 UTC 2019


 libreofficekit/source/gtk/lokdocview.cxx |   33 +++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)

New commits:
commit ba1c957c289b40a3b05bc18b8b3598fce44c9988
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Tue Sep 24 17:00:41 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Sep 26 13:03:49 2019 +0200

    gtktiledviewer: Turn an annoying assert into a compile-time check.
    
    So that people don't forget adding the enum values here...
    
    Change-Id: I0342e2ecca4d7d14641e44ca562b1999921182e8
    Reviewed-on: https://gerrit.libreoffice.org/79554
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>
    (cherry picked from commit dfaf6ebc1ebadd1ea4bb334b1adf4172e3aa205c)
    Reviewed-on: https://gerrit.libreoffice.org/79589
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index c3167b8222d9..12a38a11cea1 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1072,7 +1072,7 @@ callback (gpointer pData)
         return G_SOURCE_REMOVE;
     }
 
-    switch (pCallback->m_nType)
+    switch (static_cast<LibreOfficeKitCallbackType>(pCallback->m_nType))
     {
     case LOK_CALLBACK_INVALIDATE_TILES:
     {
@@ -1261,11 +1261,6 @@ callback (gpointer pData)
         reportError(pDocView, pCallback->m_aPayload);
     }
     break;
-    case LOK_CALLBACK_CONTEXT_MENU:
-    {
-        // TODO: Implement me
-        break;
-    }
     case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
     {
         std::stringstream aStream(pCallback->m_aPayload);
@@ -1360,12 +1355,6 @@ callback (gpointer pData)
     case LOK_CALLBACK_INVALIDATE_HEADER:
         g_signal_emit(pCallback->m_pDocView, doc_view_signals[INVALIDATE_HEADER], 0, pCallback->m_aPayload.c_str());
         break;
-    case LOK_CALLBACK_CLIPBOARD_CHANGED:
-    case LOK_CALLBACK_CONTEXT_CHANGED:
-    case LOK_CALLBACK_CELL_SELECTION_AREA:
-    case LOK_CALLBACK_CELL_AUTO_FILL_AREA:
-    case LOK_CALLBACK_TABLE_SELECTED:
-        break; // TODO
     case LOK_CALLBACK_REFERENCE_MARKS:
     {
         std::stringstream aStream(pCallback->m_aPayload);
@@ -1387,10 +1376,26 @@ callback (gpointer pData)
         gtk_widget_queue_draw(GTK_WIDGET(pDocView));
         break;
     }
-    default:
-        g_assert(false);
+
+    case LOK_CALLBACK_STATUS_INDICATOR_START:
+    case LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE:
+    case LOK_CALLBACK_STATUS_INDICATOR_FINISH:
+    case LOK_CALLBACK_DOCUMENT_PASSWORD:
+    case LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY:
+    case LOK_CALLBACK_VALIDITY_LIST_BUTTON:
+    case LOK_CALLBACK_SIGNATURE_STATUS:
+    case LOK_CALLBACK_CONTEXT_MENU:
+    case LOK_CALLBACK_PROFILE_FRAME:
+    case LOK_CALLBACK_CLIPBOARD_CHANGED:
+    case LOK_CALLBACK_CONTEXT_CHANGED:
+    case LOK_CALLBACK_CELL_SELECTION_AREA:
+    case LOK_CALLBACK_CELL_AUTO_FILL_AREA:
+    case LOK_CALLBACK_TABLE_SELECTED:
+    {
+        // TODO: Implement me
         break;
     }
+    }
     delete pCallback;
 
     return G_SOURCE_REMOVE;


More information about the Libreoffice-commits mailing list