Blame SOURCES/0374-lokdocview-Superfluous-_set_zoom-call-on-widget-init.patch

f325b2
From 9d844459f8aed0ef85a7985f48a2460f9d594a59 Mon Sep 17 00:00:00 2001
f325b2
From: Pranav Kant <pranavk@libreoffice.org>
f325b2
Date: Tue, 15 Dec 2015 00:23:46 +0530
f325b2
Subject: [PATCH 374/398] lokdocview: Superfluous *_set_zoom() call on widget
f325b2
 initialization
f325b2
f325b2
G_PARAM_CONSTRUCT implies that parameter will be set upon widget
f325b2
initialization which means calling lok_doc_view_set_zoom() while
f325b2
document still points to null.
f325b2
f325b2
Change-Id: Ib576ac3b32c2349be2b2df6067ae79a056a03028
f325b2
Reviewed-on: https://gerrit.libreoffice.org/20775
f325b2
Reviewed-by: David Tardon <dtardon@redhat.com>
f325b2
Tested-by: David Tardon <dtardon@redhat.com>
f325b2
(cherry picked from commit a2682e4b081a9a8c6814db768e4ee9e5390907ae)
f325b2
Reviewed-on: https://gerrit.libreoffice.org/21264
f325b2
Tested-by: Jenkins <ci@libreoffice.org>
f325b2
Reviewed-by: Pranav Kant <pranavk@gnome.org>
f325b2
(cherry picked from commit 0478825ba51d390486bfbecb410bf9aaa3a3ff59)
f325b2
---
f325b2
 libreofficekit/source/gtk/lokdocview.cxx | 2 +-
f325b2
 1 file changed, 1 insertion(+), 1 deletion(-)
f325b2
f325b2
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
f325b2
index a3e6b21165d9..ccc45657626b 100644
f325b2
--- a/libreofficekit/source/gtk/lokdocview.cxx
f325b2
+++ b/libreofficekit/source/gtk/lokdocview.cxx
f325b2
@@ -760,6 +760,7 @@ static gboolean postDocumentLoad(gpointer pData)
f325b2
                                 nDocumentHeightPixels);
f325b2
     gtk_widget_set_can_focus(GTK_WIDGET(pLOKDocView), TRUE);
f325b2
     gtk_widget_grab_focus(GTK_WIDGET(pLOKDocView));
f325b2
+    lok_doc_view_set_zoom(pLOKDocView, 1.0);
f325b2
 
f325b2
     return G_SOURCE_REMOVE;
f325b2
 }
f325b2
@@ -2141,7 +2142,6 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
f325b2
                              "The current zoom level of the content",
f325b2
                              0, 5.0, 1.0,
f325b2
                              static_cast<GParamFlags>(G_PARAM_READWRITE |
f325b2
-                                                      G_PARAM_CONSTRUCT |
f325b2
                                                       G_PARAM_STATIC_STRINGS)));
f325b2
 
f325b2
     /**
f325b2
-- 
f325b2
2.12.0
f325b2