[Libreoffice-commits] core.git: libreofficekit/source
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 26 07:34:00 UTC 2019
libreofficekit/source/gtk/lokdocview.cxx | 33 +++++++++++++++++--------------
1 file changed, 19 insertions(+), 14 deletions(-)
New commits:
commit dfaf6ebc1ebadd1ea4bb334b1adf4172e3aa205c
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Tue Sep 24 17:00:41 2019 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Sep 26 09:32:43 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>
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;
More information about the Libreoffice-commits
mailing list