summaryrefslogtreecommitdiff
path: root/libreofficekit/source/gtk
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2019-09-24 17:00:41 +0200
committerJan Holesovsky <kendy@collabora.com>2019-09-26 09:32:43 +0200
commitdfaf6ebc1ebadd1ea4bb334b1adf4172e3aa205c (patch)
tree11614988e4da78ab98a22fe5ef9801af7363a34f /libreofficekit/source/gtk
parent7b171dbfb5b50b684eb221270759482fe49b4e15 (diff)
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@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'libreofficekit/source/gtk')
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx33
1 files changed, 19 insertions, 14 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 2e304a07ee49..97a37b8557b8 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;