diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-02 10:32:36 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-02 10:56:40 +0100 |
commit | bd8610ebafa9caf9f09a5aba9cca04c23691513d (patch) | |
tree | 86d0c99b905a89b2d2c06158f66ff4b5c1603554 /libreofficekit | |
parent | lokdocview: add a set_visible_area() (diff) | |
download | core-bd8610ebafa9caf9f09a5aba9cca04c23691513d.tar.gz core-bd8610ebafa9caf9f09a5aba9cca04c23691513d.zip |
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
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
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; } |