From d2ea6d817d116f4fe4a31e76fe64d88c8121b1c2 Mon Sep 17 00:00:00 2001 From: Pranav Kant Date: Tue, 2 Jun 2015 18:26:12 +0530 Subject: [PATCH] lokdocview: add width and height to the visible rectangle Change-Id: I64212113750893f33f8a859ba52ecd8815a820f4 --- libreofficekit/source/gtk/lokdocview.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index 7daae3d53efd..14b100b65b99 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -1323,8 +1323,10 @@ SAL_DLLPUBLIC_EXPORT void lok_docview_get_visarea(LOKDocView* pThis, GdkRectangl { GtkAdjustment* pHAdjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(pThis)); pArea->x = pThis->m_pImpl->pixelToTwip(gtk_adjustment_get_value(pHAdjustment)); + pArea->width = pThis->m_pImpl->pixelToTwip(gtk_adjustment_get_page_size(pHAdjustment)); GtkAdjustment* pVAdjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(pThis)); pArea->y = pThis->m_pImpl->pixelToTwip(gtk_adjustment_get_value(pVAdjustment)); + pArea->height = pThis->m_pImpl->pixelToTwip(gtk_adjustment_get_page_size(pVAdjustment)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */