Kaydet (Commit) 45b82d9f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

libreofficekit: various loplugin fixes

Change-Id: I317f8f5397bfeb9c0d6ecaaa656cb31e66eece0b
üst 144b5e68
...@@ -112,7 +112,7 @@ void toggleEditing(GtkWidget* /*pButton*/, gpointer /*pItem*/) ...@@ -112,7 +112,7 @@ void toggleEditing(GtkWidget* /*pButton*/, gpointer /*pItem*/)
{ {
LOKDocView* pLOKDocView = LOK_DOCVIEW(pDocView); LOKDocView* pLOKDocView = LOK_DOCVIEW(pDocView);
bool bActive = gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(pEnableEditing)); bool bActive = gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(pEnableEditing));
if (lok_docview_get_edit(pLOKDocView) != bActive) if (bool(lok_docview_get_edit(pLOKDocView)) != bActive)
lok_docview_set_edit(pLOKDocView, bActive); lok_docview_set_edit(pLOKDocView, bActive);
} }
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
// Number of handles around a graphic selection. // Number of handles around a graphic selection.
#define GRAPHIC_HANDLE_COUNT 8 #define GRAPHIC_HANDLE_COUNT 8
static void lok_docview_class_init( LOKDocViewClass* pClass ); static void lok_docview_class_init( gpointer );
static void lok_docview_init( LOKDocView* pDocView ); static void lok_docview_init( GTypeInstance *, gpointer );
static float pixelToTwip(float nInput); static float pixelToTwip(float nInput);
static gboolean renderOverlay(GtkWidget* pWidget, GdkEventExpose* pEvent, gpointer pData); static gboolean renderOverlay(GtkWidget* pWidget, GdkEventExpose* pEvent, gpointer pData);
...@@ -301,8 +301,8 @@ SAL_DLLPUBLIC_EXPORT guint lok_docview_get_type() ...@@ -301,8 +301,8 @@ SAL_DLLPUBLIC_EXPORT guint lok_docview_get_type()
pName, pName,
sizeof( LOKDocView ), sizeof( LOKDocView ),
sizeof( LOKDocViewClass ), sizeof( LOKDocViewClass ),
(GtkClassInitFunc) lok_docview_class_init, lok_docview_class_init,
(GtkObjectInitFunc) lok_docview_init, lok_docview_init,
NULL, NULL,
NULL, NULL,
(GtkClassInitFunc) NULL (GtkClassInitFunc) NULL
...@@ -321,8 +321,9 @@ enum ...@@ -321,8 +321,9 @@ enum
static guint docview_signals[LAST_SIGNAL] = { 0 }; static guint docview_signals[LAST_SIGNAL] = { 0 };
static void lok_docview_class_init( LOKDocViewClass* pClass ) static void lok_docview_class_init( gpointer ptr )
{ {
LOKDocViewClass* pClass = static_cast<LOKDocViewClass *>(ptr);
GObjectClass *gobject_class = G_OBJECT_CLASS(pClass); GObjectClass *gobject_class = G_OBJECT_CLASS(pClass);
pClass->edit_changed = NULL; pClass->edit_changed = NULL;
docview_signals[EDIT_CHANGED] = docview_signals[EDIT_CHANGED] =
...@@ -336,8 +337,9 @@ static void lok_docview_class_init( LOKDocViewClass* pClass ) ...@@ -336,8 +337,9 @@ static void lok_docview_class_init( LOKDocViewClass* pClass )
G_TYPE_BOOLEAN); G_TYPE_BOOLEAN);
} }
static void lok_docview_init( LOKDocView* pDocView ) static void lok_docview_init( GTypeInstance *, gpointer ptr )
{ {
LOKDocView* pDocView = static_cast<LOKDocView *>(ptr);
// Gtk ScrolledWindow is apparently not fully initialised yet, we specifically // Gtk ScrolledWindow is apparently not fully initialised yet, we specifically
// have to set the [hv]adjustment to prevent GTK assertions from firing, see // have to set the [hv]adjustment to prevent GTK assertions from firing, see
// https://bugzilla.gnome.org/show_bug.cgi?id=438114 for more info. // https://bugzilla.gnome.org/show_bug.cgi?id=438114 for more info.
...@@ -878,7 +880,7 @@ static gboolean lok_docview_callback(gpointer pData) ...@@ -878,7 +880,7 @@ static gboolean lok_docview_callback(gpointer pData)
} }
break; break;
default: default:
g_assert(0); g_assert(false);
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment