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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user