Blame SOURCES/0023-lokdocview-Lets-follow-the-GObject-naming-convention.patch

f325b2
From 414256913a71a94430f53f34093c75740754e037 Mon Sep 17 00:00:00 2001
f325b2
From: Pranav Kant <pranavk@gnome.org>
f325b2
Date: Sat, 6 Jun 2015 02:32:54 +0530
f325b2
Subject: [PATCH 023/398] lokdocview: Lets follow the GObject naming convention
f325b2
f325b2
If we are mentioning this type as DocView, we should break it at each
f325b2
capital letter.
f325b2
f325b2
Change-Id: I76c7eea455281e541b2196a03778018aa127cebe
f325b2
(cherry picked from commit c8caa803b43d7091318f1129b7b4cc7ee417c336)
f325b2
---
f325b2
 include/LibreOfficeKit/LibreOfficeKitGtk.h         | 38 +++++-----
f325b2
 .../qa/gtktiledviewer/gtktiledviewer.cxx           | 52 +++++++-------
f325b2
 libreofficekit/source/gtk/lokdocview.cxx           | 84 +++++++++++-----------
f325b2
 3 files changed, 87 insertions(+), 87 deletions(-)
f325b2
f325b2
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
f325b2
index 9668904b0230..069c565435bb 100644
f325b2
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
f325b2
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
f325b2
@@ -18,9 +18,9 @@
f325b2
 
f325b2
 G_BEGIN_DECLS
f325b2
 
f325b2
-#define LOK_DOCVIEW(obj)          GTK_CHECK_CAST (obj, lok_docview_get_type(), LOKDocView)
f325b2
-#define LOK_DOCVIEW_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, lok_docview_get_type(), LOKDocViewClass)
f325b2
-#define IS_LOK_DOCVIEW(obj)       GTK_CHECK_TYPE (obj, lok_docview_get_type())
f325b2
+#define LOK_DOC_VIEW(obj)          GTK_CHECK_CAST (obj, lok_doc_view_get_type(), LOKDocView)
f325b2
+#define LOK_DOC_VIEW_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, lok_doc_view_get_type(), LOKDocViewClass)
f325b2
+#define IS_LOK_DOC_VIEW(obj)       GTK_CHECK_TYPE (obj, lok_doc_view_get_type())
f325b2
 
f325b2
 typedef struct _LOKDocView       LOKDocView;
f325b2
 typedef struct _LOKDocViewClass  LOKDocViewClass;
f325b2
@@ -40,40 +40,40 @@ struct _LOKDocViewClass
f325b2
   void (* part_changed) (LOKDocView* pView, int new_part);
f325b2
 };
f325b2
 
f325b2
-guint           lok_docview_get_type        (void);
f325b2
-GtkWidget*      lok_docview_new             ( LibreOfficeKit* pOffice );
f325b2
-gboolean        lok_docview_open_document   (LOKDocView* pDocView,
f325b2
+guint           lok_doc_view_get_type        (void);
f325b2
+GtkWidget*      lok_doc_view_new             ( LibreOfficeKit* pOffice );
f325b2
+gboolean        lok_doc_view_open_document   (LOKDocView* pDocView,
f325b2
                                              char* pPath);
f325b2
 
f325b2
 /// Gets the document the viewer displays.
f325b2
-LibreOfficeKitDocument* lok_docview_get_document(LOKDocView* pDocView);
f325b2
+LibreOfficeKitDocument* lok_doc_view_get_document(LOKDocView* pDocView);
f325b2
 
f325b2
-void            lok_docview_set_zoom        (LOKDocView* pDocView,
f325b2
+void            lok_doc_view_set_zoom        (LOKDocView* pDocView,
f325b2
                                              float fZoom);
f325b2
-float           lok_docview_get_zoom        (LOKDocView* pDocView);
f325b2
+float           lok_doc_view_get_zoom        (LOKDocView* pDocView);
f325b2
 
f325b2
-int             lok_docview_get_parts       (LOKDocView* pDocView);
f325b2
-int             lok_docview_get_part        (LOKDocView* pDocView);
f325b2
-void            lok_docview_set_part        (LOKDocView* pDocView,
f325b2
+int             lok_doc_view_get_parts       (LOKDocView* pDocView);
f325b2
+int             lok_doc_view_get_part        (LOKDocView* pDocView);
f325b2
+void            lok_doc_view_set_part        (LOKDocView* pDocView,
f325b2
                                              int nPart);
f325b2
-char*           lok_docview_get_part_name   (LOKDocView* pDocView,
f325b2
+char*           lok_doc_view_get_part_name   (LOKDocView* pDocView,
f325b2
                                              int nPart);
f325b2
-void            lok_docview_set_partmode    (LOKDocView* pDocView,
f325b2
+void            lok_doc_view_set_partmode    (LOKDocView* pDocView,
f325b2
                                              int nPartMode);
f325b2
 /// Sets if the viewer is actually an editor or not.
f325b2
-void            lok_docview_set_edit        (LOKDocView* pDocView,
f325b2
+void            lok_doc_view_set_edit        (LOKDocView* pDocView,
f325b2
                                              gboolean bEdit);
f325b2
 /// Gets if the viewer is actually an editor or not.
f325b2
-gboolean        lok_docview_get_edit        (LOKDocView* pDocView);
f325b2
+gboolean        lok_doc_view_get_edit        (LOKDocView* pDocView);
f325b2
 
f325b2
 /// Posts the .uno: command to the LibreOfficeKit.
f325b2
-void            lok_docview_post_command    (LOKDocView* pDocView, const char* pCommand, const char* pArguments);
f325b2
+void            lok_doc_view_post_command    (LOKDocView* pDocView, const char* pCommand, const char* pArguments);
f325b2
 
f325b2
 /// Posts a keyboard event to LibreOfficeKit.
f325b2
-void            lok_docview_post_key    (GtkWidget* pWidget, GdkEventKey* pEvent, gpointer pData);
f325b2
+void            lok_doc_view_post_key    (GtkWidget* pWidget, GdkEventKey* pEvent, gpointer pData);
f325b2
 
f325b2
 /// Get the visible area of the document (in twips).
f325b2
-void lok_docview_get_visarea(LOKDocView* pThis, GdkRectangle* pArea);
f325b2
+void lok_doc_view_get_visarea(LOKDocView* pThis, GdkRectangle* pArea);
f325b2
 
f325b2
 G_END_DECLS
f325b2
 
f325b2
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
f325b2
index d20f43d90627..38b29ee40a3b 100644
f325b2
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
f325b2
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
f325b2
@@ -71,7 +71,7 @@ static void changeZoom( GtkWidget* pButton, gpointer /* pItem */ )
f325b2
 
f325b2
     if ( pDocView )
f325b2
     {
f325b2
-        fCurrentZoom = lok_docview_get_zoom( LOK_DOCVIEW(pDocView) );
f325b2
+        fCurrentZoom = lok_doc_view_get_zoom( LOK_DOC_VIEW(pDocView) );
f325b2
     }
f325b2
 
f325b2
     if ( strcmp(sName, "gtk-zoom-in") == 0)
f325b2
@@ -104,7 +104,7 @@ static void changeZoom( GtkWidget* pButton, gpointer /* pItem */ )
f325b2
     {
f325b2
         if ( pDocView )
f325b2
         {
f325b2
-            lok_docview_set_zoom( LOK_DOCVIEW(pDocView), fZoom );
f325b2
+            lok_doc_view_set_zoom( LOK_DOC_VIEW(pDocView), fZoom );
f325b2
         }
f325b2
     }
f325b2
 }
f325b2
@@ -112,10 +112,10 @@ static void changeZoom( GtkWidget* pButton, gpointer /* pItem */ )
f325b2
 /// User clicked on the button -> inform LOKDocView.
f325b2
 static void toggleEditing(GtkWidget* /*pButton*/, gpointer /*pItem*/)
f325b2
 {
f325b2
-    LOKDocView* pLOKDocView = LOK_DOCVIEW(pDocView);
f325b2
+    LOKDocView* pLOKDocView = LOK_DOC_VIEW(pDocView);
f325b2
     bool bActive = gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(pEnableEditing));
f325b2
-    if (bool(lok_docview_get_edit(pLOKDocView)) != bActive)
f325b2
-        lok_docview_set_edit(pLOKDocView, bActive);
f325b2
+    if (bool(lok_doc_view_get_edit(pLOKDocView)) != bActive)
f325b2
+        lok_doc_view_set_edit(pLOKDocView, bActive);
f325b2
 }
f325b2
 
f325b2
 /// Toggle the visibility of the findbar.
f325b2
@@ -137,11 +137,11 @@ static void toggleFindbar(GtkWidget* /*pButton*/, gpointer /*pItem*/)
f325b2
 /// Handles the key-press-event of the window.
f325b2
 static gboolean signalKey(GtkWidget* pWidget, GdkEventKey* pEvent, gpointer pData)
f325b2
 {
f325b2
-    LOKDocView* pLOKDocView = LOK_DOCVIEW(pDocView);
f325b2
+    LOKDocView* pLOKDocView = LOK_DOC_VIEW(pDocView);
f325b2
 #if GTK_CHECK_VERSION(2,18,0) // we need gtk_widget_get_visible()
f325b2
-    if (!gtk_widget_get_visible(pFindbar) && bool(lok_docview_get_edit(pLOKDocView)))
f325b2
+    if (!gtk_widget_get_visible(pFindbar) && bool(lok_doc_view_get_edit(pLOKDocView)))
f325b2
         {
f325b2
-            lok_docview_post_key(pWidget, pEvent, pData);
f325b2
+            lok_doc_view_post_key(pWidget, pEvent, pData);
f325b2
             return TRUE;
f325b2
         }
f325b2
 #endif
f325b2
@@ -159,9 +159,9 @@ static void doSearch(bool bBackwards)
f325b2
     aTree.put(boost::property_tree::ptree::path_type("SearchItem.Backward/type", '/'), "boolean");
f325b2
     aTree.put(boost::property_tree::ptree::path_type("SearchItem.Backward/value", '/'), bBackwards);
f325b2
 
f325b2
-    LOKDocView* pLOKDocView = LOK_DOCVIEW(pDocView);
f325b2
+    LOKDocView* pLOKDocView = LOK_DOC_VIEW(pDocView);
f325b2
     GdkRectangle aArea;
f325b2
-    lok_docview_get_visarea(pLOKDocView, &aArea);
f325b2
+    lok_doc_view_get_visarea(pLOKDocView, &aArea);
f325b2
     aTree.put(boost::property_tree::ptree::path_type("SearchItem.SearchStartPointX/type", '/'), "long");
f325b2
     aTree.put(boost::property_tree::ptree::path_type("SearchItem.SearchStartPointX/value", '/'), aArea.x);
f325b2
     aTree.put(boost::property_tree::ptree::path_type("SearchItem.SearchStartPointY/type", '/'), "long");
f325b2
@@ -170,7 +170,7 @@ static void doSearch(bool bBackwards)
f325b2
     std::stringstream aStream;
f325b2
     boost::property_tree::write_json(aStream, aTree);
f325b2
 
f325b2
-    lok_docview_post_command(pLOKDocView, ".uno:ExecuteSearch", aStream.str().c_str());
f325b2
+    lok_doc_view_post_command(pLOKDocView, ".uno:ExecuteSearch", aStream.str().c_str());
f325b2
 }
f325b2
 
f325b2
 /// Click handler for the search next button.
f325b2
@@ -210,8 +210,8 @@ static gboolean signalFindbar(GtkWidget* /*pWidget*/, GdkEventKey* pEvent, gpoin
f325b2
 /// LOKDocView changed edit state -> inform the tool button.
f325b2
 static void signalEdit(LOKDocView* pLOKDocView, gboolean bWasEdit, gpointer /*pData*/)
f325b2
 {
f325b2
-    gboolean bEdit = lok_docview_get_edit(pLOKDocView);
f325b2
-    g_info("signalEdit: %d -> %d", bWasEdit, lok_docview_get_edit(pLOKDocView));
f325b2
+    gboolean bEdit = lok_doc_view_get_edit(pLOKDocView);
f325b2
+    g_info("signalEdit: %d -> %d", bWasEdit, lok_doc_view_get_edit(pLOKDocView));
f325b2
     if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(pEnableEditing)) != bEdit)
f325b2
         gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(pEnableEditing), bEdit);
f325b2
 }
f325b2
@@ -233,7 +233,7 @@ static void signalCommand(LOKDocView* /*pLOKDocView*/, char* pPayload, gpointer
f325b2
             gboolean bEdit = aValue == "true";
f325b2
             if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(pItem)) != bEdit)
f325b2
             {
f325b2
-                // Avoid invoking lok_docview_post_command().
f325b2
+                // Avoid invoking lok_doc_view_post_command().
f325b2
                 g_bToolItemBroadcast = false;
f325b2
                 gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(pItem), bEdit);
f325b2
                 g_bToolItemBroadcast = true;
f325b2
@@ -262,11 +262,11 @@ static void toggleToolItem(GtkWidget* pWidget, gpointer /*pData*/)
f325b2
 {
f325b2
     if (g_bToolItemBroadcast)
f325b2
     {
f325b2
-        LOKDocView* pLOKDocView = LOK_DOCVIEW(pDocView);
f325b2
+        LOKDocView* pLOKDocView = LOK_DOC_VIEW(pDocView);
f325b2
         GtkToolItem* pItem = GTK_TOOL_ITEM(pWidget);
f325b2
         const std::string& rString = g_aToolItemCommandNames[pItem];
f325b2
-        g_info("toggleToolItem: lok_docview_post_command('%s')", rString.c_str());
f325b2
-        lok_docview_post_command(pLOKDocView, rString.c_str(), 0);
f325b2
+        g_info("toggleToolItem: lok_doc_view_post_command('%s')", rString.c_str());
f325b2
+        lok_doc_view_post_command(pLOKDocView, rString.c_str(), 0);
f325b2
     }
f325b2
 }
f325b2
 
f325b2
@@ -286,10 +286,10 @@ static void populatePartSelector()
f325b2
     const int nMaxLength = 50;
f325b2
     char sText[nMaxLength];
f325b2
 
f325b2
-    int nParts = lok_docview_get_parts( LOK_DOCVIEW(pDocView) );
f325b2
+    int nParts = lok_doc_view_get_parts( LOK_DOC_VIEW(pDocView) );
f325b2
     for ( int i = 0; i < nParts; i++ )
f325b2
     {
f325b2
-        char* pName = lok_docview_get_part_name( LOK_DOCVIEW(pDocView), i );
f325b2
+        char* pName = lok_doc_view_get_part_name( LOK_DOC_VIEW(pDocView), i );
f325b2
         assert( pName );
f325b2
         snprintf( sText, nMaxLength, "%i (%s)", i+1, pName );
f325b2
         free( pName );
f325b2
@@ -297,7 +297,7 @@ static void populatePartSelector()
f325b2
         gtk_combo_box_text_append_text( pPartSelector, sText );
f325b2
     }
f325b2
     gtk_combo_box_set_active( GTK_COMBO_BOX(pPartSelector),
f325b2
-                              lok_docview_get_part( LOK_DOCVIEW(pDocView) ) );
f325b2
+                              lok_doc_view_get_part( LOK_DOC_VIEW(pDocView) ) );
f325b2
 }
f325b2
 
f325b2
 static void changePart( GtkWidget* pSelector, gpointer /* pItem */ )
f325b2
@@ -306,7 +306,7 @@ static void changePart( GtkWidget* pSelector, gpointer /* pItem */ )
f325b2
 
f325b2
     if (g_bPartSelectorBroadcast && pDocView)
f325b2
     {
f325b2
-        lok_docview_set_part( LOK_DOCVIEW(pDocView), nPart );
f325b2
+        lok_doc_view_set_part( LOK_DOC_VIEW(pDocView), nPart );
f325b2
     }
f325b2
 }
f325b2
 
f325b2
@@ -326,7 +326,7 @@ static void changePartMode( GtkWidget* pSelector, gpointer /* pItem */ )
f325b2
 
f325b2
     if ( pDocView )
f325b2
     {
f325b2
-        lok_docview_set_partmode( LOK_DOCVIEW(pDocView), ePartMode );
f325b2
+        lok_doc_view_set_partmode( LOK_DOC_VIEW(pDocView), ePartMode );
f325b2
     }
f325b2
 }
f325b2
 #endif
f325b2
@@ -451,7 +451,7 @@ int main( int argc, char* argv[] )
f325b2
     gtk_box_pack_end(GTK_BOX(pVBox), pFindbar, FALSE, FALSE, 0);
f325b2
 
f325b2
     // Docview
f325b2
-    pDocView = lok_docview_new( pOffice );
f325b2
+    pDocView = lok_doc_view_new( pOffice );
f325b2
     g_signal_connect(pDocView, "edit-changed", G_CALLBACK(signalEdit), NULL);
f325b2
     g_signal_connect(pDocView, "command-changed", G_CALLBACK(signalCommand), NULL);
f325b2
     g_signal_connect(pDocView, "search-not-found", G_CALLBACK(signalSearch), NULL);
f325b2
@@ -467,10 +467,10 @@ int main( int argc, char* argv[] )
f325b2
     // Hide the findbar by default.
f325b2
     gtk_widget_hide(pFindbar);
f325b2
 
f325b2
-    int bOpened = lok_docview_open_document( LOK_DOCVIEW(pDocView), argv[2] );
f325b2
+    int bOpened = lok_doc_view_open_document( LOK_DOC_VIEW(pDocView), argv[2] );
f325b2
     if (!bOpened)
f325b2
-        g_error("main: lok_docview_open_document() failed with '%s'", pOffice->pClass->getError(pOffice));
f325b2
-    assert(lok_docview_get_document(LOK_DOCVIEW(pDocView)));
f325b2
+        g_error("main: lok_doc_view_open_document() failed with '%s'", pOffice->pClass->getError(pOffice));
f325b2
+    assert(lok_doc_view_get_document(LOK_DOC_VIEW(pDocView)));
f325b2
 
f325b2
     // GtkComboBox requires gtk 2.24 or later
f325b2
 #if ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION > 2
f325b2
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
f325b2
index 6c3176783953..b1e31887599d 100644
f325b2
--- a/libreofficekit/source/gtk/lokdocview.cxx
f325b2
+++ b/libreofficekit/source/gtk/lokdocview.cxx
f325b2
@@ -123,7 +123,7 @@ struct LOKDocView_Impl
f325b2
     bool m_bInDragGraphicHandles[8];
f325b2
     ///@}
f325b2
 
f325b2
-    /// Callback data, allocated in lok_docview_callback_worker(), released in lok_docview_callback().
f325b2
+    /// Callback data, allocated in lok_doc_view_callback_worker(), released in lok_doc_view_callback().
f325b2
     struct CallbackData
f325b2
     {
f325b2
         int m_nType;
f325b2
@@ -305,7 +305,7 @@ void LOKDocView_Impl::destroy(LOKDocView* pDocView, gpointer /*pData*/)
f325b2
 
f325b2
 void LOKDocView_Impl::on_exposed(GtkWidget* /*widget*/, GdkEvent* /*event*/, gpointer userdata)
f325b2
 {
f325b2
-    LOKDocView *pDocView = LOK_DOCVIEW (userdata);
f325b2
+    LOKDocView *pDocView = LOK_DOC_VIEW (userdata);
f325b2
     pDocView->m_pImpl->renderDocument(0);
f325b2
 }
f325b2
 
f325b2
@@ -461,7 +461,7 @@ gboolean LOKDocView_Impl::signalButtonImpl(GdkEventButton* pEvent)
f325b2
     }
f325b2
 
f325b2
     if (!m_bEdit)
f325b2
-        lok_docview_set_edit(m_pDocView, TRUE);
f325b2
+        lok_doc_view_set_edit(m_pDocView, TRUE);
f325b2
 
f325b2
     switch (pEvent->type)
f325b2
     {
f325b2
@@ -782,7 +782,7 @@ gboolean LOKDocView_Impl::handleTimeoutImpl()
f325b2
 void LOKDocView_Impl::renderDocument(GdkRectangle* pPartial)
f325b2
 {
f325b2
     GdkRectangle visibleArea;
f325b2
-    lok_docview_get_visarea (m_pDocView, &visibleArea);
f325b2
+    lok_doc_view_get_visarea (m_pDocView, &visibleArea);
f325b2
 
f325b2
     long nDocumentWidthPixels = twipToPixel(m_nDocumentWidthTwips, m_fZoom);
f325b2
     long nDocumentHeightPixels = twipToPixel(m_nDocumentHeightTwips, m_fZoom);
f325b2
@@ -1058,7 +1058,7 @@ void LOKDocView_Impl::globalCallbackWorker(int nType, const char* pPayload, void
f325b2
 void LOKDocView_Impl::callbackWorkerImpl(int nType, const char* pPayload)
f325b2
 {
f325b2
     LOKDocView_Impl::CallbackData* pCallback = new LOKDocView_Impl::CallbackData(nType, pPayload ? pPayload : "(nil)", m_pDocView);
f325b2
-    g_info("lok_docview_callback_worker: %s, '%s'", LOKDocView_Impl::callbackTypeToString(nType), pPayload);
f325b2
+    g_info("lok_doc_view_callback_worker: %s, '%s'", LOKDocView_Impl::callbackTypeToString(nType), pPayload);
f325b2
 #if GTK_CHECK_VERSION(2,12,0)
f325b2
     gdk_threads_add_idle(LOKDocView_Impl::callback, pCallback);
f325b2
 #endif
f325b2
@@ -1082,30 +1082,30 @@ enum
f325b2
     LAST_SIGNAL
f325b2
 };
f325b2
 
f325b2
-static guint docview_signals[LAST_SIGNAL] = { 0 };
f325b2
+static guint doc_view_signals[LAST_SIGNAL] = { 0 };
f325b2
 
f325b2
 void LOKDocView_Impl::commandChanged(const std::string& rString)
f325b2
 {
f325b2
-    g_signal_emit(m_pDocView, docview_signals[COMMAND_CHANGED], 0, rString.c_str());
f325b2
+    g_signal_emit(m_pDocView, doc_view_signals[COMMAND_CHANGED], 0, rString.c_str());
f325b2
 }
f325b2
 
f325b2
 void LOKDocView_Impl::searchNotFound(const std::string& rString)
f325b2
 {
f325b2
-    g_signal_emit(m_pDocView, docview_signals[SEARCH_NOT_FOUND], 0, rString.c_str());
f325b2
+    g_signal_emit(m_pDocView, doc_view_signals[SEARCH_NOT_FOUND], 0, rString.c_str());
f325b2
 }
f325b2
 
f325b2
 void LOKDocView_Impl::setPart(const std::string& rString)
f325b2
 {
f325b2
-    g_signal_emit(m_pDocView, docview_signals[PART_CHANGED], 0, std::stoi(rString));
f325b2
+    g_signal_emit(m_pDocView, doc_view_signals[PART_CHANGED], 0, std::stoi(rString));
f325b2
     renderDocument(0);
f325b2
 }
f325b2
 
f325b2
-static void lok_docview_class_init( gpointer ptr )
f325b2
+static void lok_doc_view_class_init( gpointer ptr )
f325b2
 {
f325b2
     LOKDocViewClass* pClass = static_cast<LOKDocViewClass *>(ptr);
f325b2
     GObjectClass *gobject_class = G_OBJECT_CLASS(pClass);
f325b2
     pClass->edit_changed = NULL;
f325b2
-    docview_signals[EDIT_CHANGED] =
f325b2
+    doc_view_signals[EDIT_CHANGED] =
f325b2
         g_signal_new("edit-changed",
f325b2
                      G_TYPE_FROM_CLASS (gobject_class),
f325b2
                      G_SIGNAL_RUN_FIRST,
f325b2
@@ -1115,7 +1115,7 @@ static void lok_docview_class_init( gpointer ptr )
f325b2
                      G_TYPE_NONE, 1,
f325b2
                      G_TYPE_BOOLEAN);
f325b2
     pClass->command_changed = NULL;
f325b2
-    docview_signals[COMMAND_CHANGED] =
f325b2
+    doc_view_signals[COMMAND_CHANGED] =
f325b2
         g_signal_new("command-changed",
f325b2
                      G_TYPE_FROM_CLASS(gobject_class),
f325b2
                      G_SIGNAL_RUN_FIRST,
f325b2
@@ -1125,7 +1125,7 @@ static void lok_docview_class_init( gpointer ptr )
f325b2
                      G_TYPE_NONE, 1,
f325b2
                      G_TYPE_STRING);
f325b2
     pClass->search_not_found = 0;
f325b2
-    docview_signals[SEARCH_NOT_FOUND] =
f325b2
+    doc_view_signals[SEARCH_NOT_FOUND] =
f325b2
         g_signal_new("search-not-found",
f325b2
                      G_TYPE_FROM_CLASS(gobject_class),
f325b2
                      G_SIGNAL_RUN_FIRST,
f325b2
@@ -1135,7 +1135,7 @@ static void lok_docview_class_init( gpointer ptr )
f325b2
                      G_TYPE_NONE, 1,
f325b2
                      G_TYPE_STRING);
f325b2
     pClass->part_changed = 0;
f325b2
-    docview_signals[PART_CHANGED] =
f325b2
+    doc_view_signals[PART_CHANGED] =
f325b2
         g_signal_new("part-changed",
f325b2
                      G_TYPE_FROM_CLASS(gobject_class),
f325b2
                      G_SIGNAL_RUN_FIRST,
f325b2
@@ -1146,7 +1146,7 @@ static void lok_docview_class_init( gpointer ptr )
f325b2
                      G_TYPE_INT);
f325b2
 }
f325b2
 
f325b2
-static void lok_docview_init( GTypeInstance* pInstance, gpointer )
f325b2
+static void lok_doc_view_init( GTypeInstance* pInstance, gpointer )
f325b2
 {
f325b2
     LOKDocView* pDocView = reinterpret_cast<LOKDocView *>(pInstance);
f325b2
     // Gtk ScrolledWindow is apparently not fully initialised yet, we specifically
f325b2
@@ -1183,38 +1183,38 @@ static void lok_docview_init( GTypeInstance* pInstance, gpointer )
f325b2
     g_signal_connect(G_OBJECT(pDocView), "destroy", G_CALLBACK(LOKDocView_Impl::destroy), 0);
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT guint lok_docview_get_type()
f325b2
+SAL_DLLPUBLIC_EXPORT guint lok_doc_view_get_type()
f325b2
 {
f325b2
-    static guint lok_docview_type = 0;
f325b2
+    static guint lok_doc_view_type = 0;
f325b2
 
f325b2
-    if (!lok_docview_type)
f325b2
+    if (!lok_doc_view_type)
f325b2
     {
f325b2
         char pName[] = "LokDocView";
f325b2
-        GtkTypeInfo lok_docview_info =
f325b2
+        GtkTypeInfo lok_doc_view_info =
f325b2
         {
f325b2
             pName,
f325b2
             sizeof( LOKDocView ),
f325b2
             sizeof( LOKDocViewClass ),
f325b2
-            lok_docview_class_init,
f325b2
-            lok_docview_init,
f325b2
+            lok_doc_view_class_init,
f325b2
+            lok_doc_view_init,
f325b2
             NULL,
f325b2
             NULL,
f325b2
             nullptr
f325b2
         };
f325b2
 
f325b2
-        lok_docview_type = gtk_type_unique( gtk_scrolled_window_get_type(), &lok_docview_info );
f325b2
+        lok_doc_view_type = gtk_type_unique( gtk_scrolled_window_get_type(), &lok_doc_view_info );
f325b2
     }
f325b2
-    return lok_docview_type;
f325b2
+    return lok_doc_view_type;
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT GtkWidget* lok_docview_new( LibreOfficeKit* pOffice )
f325b2
+SAL_DLLPUBLIC_EXPORT GtkWidget* lok_doc_view_new( LibreOfficeKit* pOffice )
f325b2
 {
f325b2
-    LOKDocView* pDocView = LOK_DOCVIEW(gtk_type_new(lok_docview_get_type()));
f325b2
+    LOKDocView* pDocView = LOK_DOC_VIEW(gtk_type_new(lok_doc_view_get_type()));
f325b2
     pDocView->m_pImpl->m_pOffice = pOffice;
f325b2
     return GTK_WIDGET( pDocView );
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( LOKDocView* pDocView, char* pPath )
f325b2
+SAL_DLLPUBLIC_EXPORT gboolean lok_doc_view_open_document( LOKDocView* pDocView, char* pPath )
f325b2
 {
f325b2
     if ( pDocView->m_pImpl->m_pDocument )
f325b2
     {
f325b2
@@ -1260,12 +1260,12 @@ SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( LOKDocView* pDocView, c
f325b2
     return TRUE;
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT LibreOfficeKitDocument* lok_docview_get_document(LOKDocView* pDocView)
f325b2
+SAL_DLLPUBLIC_EXPORT LibreOfficeKitDocument* lok_doc_view_get_document(LOKDocView* pDocView)
f325b2
 {
f325b2
     return pDocView->m_pImpl->m_pDocument;
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT void lok_docview_set_zoom ( LOKDocView* pDocView, float fZoom )
f325b2
+SAL_DLLPUBLIC_EXPORT void lok_doc_view_set_zoom ( LOKDocView* pDocView, float fZoom )
f325b2
 {
f325b2
     pDocView->m_pImpl->m_fZoom = fZoom;
f325b2
     long nDocumentWidthPixels = twipToPixel(pDocView->m_pImpl->m_nDocumentWidthTwips, fZoom);
f325b2
@@ -1283,72 +1283,72 @@ SAL_DLLPUBLIC_EXPORT void lok_docview_set_zoom ( LOKDocView* pDocView, float fZo
f325b2
         pDocView->m_pImpl->renderDocument(0);
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT float lok_docview_get_zoom ( LOKDocView* pDocView )
f325b2
+SAL_DLLPUBLIC_EXPORT float lok_doc_view_get_zoom ( LOKDocView* pDocView )
f325b2
 {
f325b2
     return pDocView->m_pImpl->m_fZoom;
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT int lok_docview_get_parts( LOKDocView* pDocView )
f325b2
+SAL_DLLPUBLIC_EXPORT int lok_doc_view_get_parts( LOKDocView* pDocView )
f325b2
 {
f325b2
     return pDocView->m_pImpl->m_pDocument->pClass->getParts( pDocView->m_pImpl->m_pDocument );
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT int lok_docview_get_part( LOKDocView* pDocView )
f325b2
+SAL_DLLPUBLIC_EXPORT int lok_doc_view_get_part( LOKDocView* pDocView )
f325b2
 {
f325b2
     return pDocView->m_pImpl->m_pDocument->pClass->getPart( pDocView->m_pImpl->m_pDocument );
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT void lok_docview_set_part( LOKDocView* pDocView, int nPart)
f325b2
+SAL_DLLPUBLIC_EXPORT void lok_doc_view_set_part( LOKDocView* pDocView, int nPart)
f325b2
 {
f325b2
     pDocView->m_pImpl->m_pDocument->pClass->setPart( pDocView->m_pImpl->m_pDocument, nPart );
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT char* lok_docview_get_part_name( LOKDocView* pDocView, int nPart )
f325b2
+SAL_DLLPUBLIC_EXPORT char* lok_doc_view_get_part_name( LOKDocView* pDocView, int nPart )
f325b2
 {
f325b2
     return pDocView->m_pImpl->m_pDocument->pClass->getPartName( pDocView->m_pImpl->m_pDocument, nPart );
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT void lok_docview_set_partmode( LOKDocView* pDocView,
f325b2
+SAL_DLLPUBLIC_EXPORT void lok_doc_view_set_partmode( LOKDocView* pDocView,
f325b2
                                                     int nPartMode )
f325b2
 {
f325b2
     pDocView->m_pImpl->m_pDocument->pClass->setPartMode( pDocView->m_pImpl->m_pDocument, nPartMode );
f325b2
     pDocView->m_pImpl->renderDocument(0);
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT void lok_docview_set_edit( LOKDocView* pDocView,
f325b2
+SAL_DLLPUBLIC_EXPORT void lok_doc_view_set_edit( LOKDocView* pDocView,
f325b2
                                                 gboolean bEdit )
f325b2
 {
f325b2
     gboolean bWasEdit = pDocView->m_pImpl->m_bEdit;
f325b2
 
f325b2
     if (!pDocView->m_pImpl->m_bEdit && bEdit)
f325b2
-        g_info("lok_docview_set_edit: entering edit mode");
f325b2
+        g_info("lok_doc_view_set_edit: entering edit mode");
f325b2
     else if (pDocView->m_pImpl->m_bEdit && !bEdit)
f325b2
     {
f325b2
-        g_info("lok_docview_set_edit: leaving edit mode");
f325b2
+        g_info("lok_doc_view_set_edit: leaving edit mode");
f325b2
         pDocView->m_pImpl->m_pDocument->pClass->resetSelection(pDocView->m_pImpl->m_pDocument);
f325b2
     }
f325b2
     pDocView->m_pImpl->m_bEdit = bEdit;
f325b2
-    g_signal_emit(pDocView, docview_signals[EDIT_CHANGED], 0, bWasEdit);
f325b2
+    g_signal_emit(pDocView, doc_view_signals[EDIT_CHANGED], 0, bWasEdit);
f325b2
     gtk_widget_queue_draw(GTK_WIDGET(pDocView->m_pImpl->m_pDrawingArea));
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT gboolean lok_docview_get_edit(LOKDocView* pDocView)
f325b2
+SAL_DLLPUBLIC_EXPORT gboolean lok_doc_view_get_edit(LOKDocView* pDocView)
f325b2
 {
f325b2
     return pDocView->m_pImpl->m_bEdit;
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT void lok_docview_post_command(LOKDocView* pDocView, const char* pCommand, const char* pArguments)
f325b2
+SAL_DLLPUBLIC_EXPORT void lok_doc_view_post_command(LOKDocView* pDocView, const char* pCommand, const char* pArguments)
f325b2
 {
f325b2
     pDocView->m_pImpl->m_pDocument->pClass->postUnoCommand(pDocView->m_pImpl->m_pDocument, pCommand, pArguments);
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT void lok_docview_post_key(GtkWidget* /*pWidget*/, GdkEventKey* pEvent, gpointer pData)
f325b2
+SAL_DLLPUBLIC_EXPORT void lok_doc_view_post_key(GtkWidget* /*pWidget*/, GdkEventKey* pEvent, gpointer pData)
f325b2
 {
f325b2
     LOKDocView* pDocView = static_cast<LOKDocView *>(pData);
f325b2
     pDocView->m_pImpl->signalKey(pEvent);
f325b2
 }
f325b2
 
f325b2
-SAL_DLLPUBLIC_EXPORT void lok_docview_get_visarea(LOKDocView* pThis, GdkRectangle* pArea)
f325b2
+SAL_DLLPUBLIC_EXPORT void lok_doc_view_get_visarea(LOKDocView* pThis, GdkRectangle* pArea)
f325b2
 {
f325b2
     float zoom = pThis->m_pImpl->m_fZoom;
f325b2
     GtkAdjustment* pHAdjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(pThis));
f325b2
-- 
f325b2
2.12.0
f325b2