[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - libreofficekit/source

Pranav Kant pranavk at libreoffice.org
Thu Jan 21 00:20:03 PST 2016


 libreofficekit/source/gtk/lokdocview.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 3763ab42fa88d9f2a2248eba1854f3d97fcfbde8
Author: Pranav Kant <pranavk at libreoffice.org>
Date:   Wed Jan 20 14:49:29 2016 +0530

    lokdocview: Center the widget inside the allocation
    
    Change-Id: I8d7f8ffb1c5ddd07ccf7d56bdf0ccc866c927401
    Reviewed-on: https://gerrit.libreoffice.org/21624
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Pranav Kant <pranavk at gnome.org>
    (cherry picked from commit 070bfedb7c0bc01ada0c0b95622543472ccb4a1c)
    Reviewed-on: https://gerrit.libreoffice.org/21638
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 2ece638..4dff498 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -2406,14 +2406,21 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
 SAL_DLLPUBLIC_EXPORT GtkWidget*
 lok_doc_view_new (const gchar* pPath, GCancellable *cancellable, GError **error)
 {
-    return GTK_WIDGET (g_initable_new (LOK_TYPE_DOC_VIEW, cancellable, error, "lopath", pPath == NULL ? LOK_PATH : pPath, NULL));
+    return GTK_WIDGET (g_initable_new (LOK_TYPE_DOC_VIEW, cancellable, error,
+                                       "lopath", pPath == nullptr ? LOK_PATH : pPath,
+                                       "halign", GTK_ALIGN_CENTER,
+                                       nullptr));
 }
 
 SAL_DLLPUBLIC_EXPORT GtkWidget* lok_doc_view_new_from_widget(LOKDocView* pOldLOKDocView)
 {
     LOKDocViewPrivate& pOldPriv = getPrivate(pOldLOKDocView);
     GtkWidget* pNewDocView = GTK_WIDGET(g_initable_new(LOK_TYPE_DOC_VIEW, /*cancellable=*/nullptr, /*error=*/nullptr,
-                                                       "lopath", pOldPriv->m_aLOPath, "lopointer", pOldPriv->m_pOffice, "docpointer", pOldPriv->m_pDocument, NULL));
+                                                       "lopath", pOldPriv->m_aLOPath,
+                                                       "lopointer", pOldPriv->m_pOffice,
+                                                       "docpointer", pOldPriv->m_pDocument,
+                                                       "halign", GTK_ALIGN_CENTER,
+                                                       nullptr));
 
     // No documentLoad(), just a createView().
     LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(LOK_DOC_VIEW(pNewDocView));


More information about the Libreoffice-commits mailing list