From bd8610ebafa9caf9f09a5aba9cca04c23691513d Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 2 Feb 2016 10:32:36 +0100 Subject: LOK: add Document::setClientVisibleArea() ... and implement it in Writer. Otherwise there is no way we can perform e.g. page down in an expected way. Without this, the core visible area depends on the zoom in the document, and the client visible area can be something entirely different. Change-Id: Iadfb5a225da09a2551ffa41ddf503bb3d22b3eae --- libreofficekit/source/gtk/lokdocview.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libreofficekit') diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index dfe14a0c22d6..825a72fb05de 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -569,7 +569,15 @@ postKeyEventInThread(gpointer data) } if (priv->m_bVisibleAreaSet) { - // TODO invoke lok::Document::setVisibleArea() here. + std::stringstream ss; + ss << "lok::Document::setClientVisibleArea(" << priv->m_aVisibleArea.x << ", " << priv->m_aVisibleArea.y << ", "; + ss << priv->m_aVisibleArea.width << ", " << priv->m_aVisibleArea.height << ")"; + g_info("%s", ss.str().c_str()); + priv->m_pDocument->pClass->setClientVisibleArea(priv->m_pDocument, + priv->m_aVisibleArea.x, + priv->m_aVisibleArea.y, + priv->m_aVisibleArea.width, + priv->m_aVisibleArea.height); priv->m_bVisibleAreaSet = false; } -- cgit