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 11:06:46 +0100 |
commit | 1ae319aa81b7d42441886dd232256b0336308cf3 (patch) | |
tree | 9bc50238914cdc79f4dadcf5d66a5fa0071ef499 /include | |
parent | 4dae4ed81b82ea3f5ae5f1097e5c75c3b1f0644e (diff) |
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.
(cherry picked from commit bd8610ebafa9caf9f09a5aba9cca04c23691513d)
Conflicts:
libreofficekit/source/gtk/lokdocview.cxx
sw/inc/unotxdoc.hxx
Change-Id: Iadfb5a225da09a2551ffa41ddf503bb3d22b3eae
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 2 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 15 | ||||
-rw-r--r-- | include/vcl/ITiledRenderable.hxx | 5 |
3 files changed, 22 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index b3b61ba52e41..4feaaf758cae 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -203,6 +203,8 @@ struct _LibreOfficeKitDocumentClass int nTilePixelHeight, int nTileTwipWidth, int nTileTwipHeight); + /// @see lok::Document::setVisibleArea). + void (*setClientVisibleArea) (LibreOfficeKitDocument* pThis, int nX, int nY, int nWidth, int nHeight); /// @see lok::Document::createView(). int (*createView) (LibreOfficeKitDocument* pThis); diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index df9e211cab53..1f2311ae6604 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -330,6 +330,21 @@ public: } /** + * Inform core about the currently visible area of the document on the + * client, so that it can perform e.g. page down (which depends on the + * visible height) in a sane way. + * + * @param nX - top left corner horizontal position + * @param nY - top left corner vertical position + * @param nWidth - area width + * @param nHeight - area height + */ + inline void setClientVisibleArea(int nX, int nY, int nWidth, int nHeight) + { + mpDoc->pClass->setClientVisibleArea(mpDoc, nX, nY, nWidth, nHeight); + } + + /** * Create a new view for an existing document. * By default a loaded document has 1 view. * @return the ID of the new view. diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index e31fd7004fdc..34f53153b9cb 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -197,6 +197,11 @@ public: int /*nTileTwipHeight*/) { } + + /// @see lok::Document::setClientVisibleArea(). + virtual void setClientVisibleArea(const Rectangle& /*rRectangle*/) + { + } }; } // namespace vcl |