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 /include | |
parent | 9d8b33079494cf7b5e66bd6c9d71f025efd9a653 (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.
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 3411b6f4e310..c98dd1fed6a8 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -205,6 +205,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 31328914e239..1fbd78425273 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -333,6 +333,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 a1e1d80128d9..d9cd34720512 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -202,6 +202,11 @@ public: (void) nTileTwipWidth; (void) nTileTwipHeight; } + + /// @see lok::Document::setClientVisibleArea(). + virtual void setClientVisibleArea(const Rectangle& /*rRectangle*/) + { + } }; } // namespace vcl |