diff options
author | Henry Castro <hcastro@collabora.com> | 2016-04-20 13:52:31 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2016-04-23 11:33:23 -0400 |
commit | 756e208be95b455d3d817610d931a742d1b04389 (patch) | |
tree | 67436ea151fa579b61d18d41cc23111daf26fa72 /include | |
parent | bb52a54aa49cbb75820f8ddbfc8e9e94b63281cd (diff) |
lokit: add getPartHash
In the tiled rendering case, the slides, no matter
if it is inserted or deleted, the part names always return
sequential names i.e. Slide 1, Slide 2, ..., Slide N.
However the client side needs to know what slides had been
deleted or inserted, so it is necessary to send the hash codes.
Change-Id: I0e9caeec660c3e42dd9f751bdce7690f9ad365a1
Reviewed-on: https://gerrit.libreoffice.org/24267
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 4 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 6 | ||||
-rw-r--r-- | include/vcl/ITiledRenderable.hxx | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 4feaaf758cae..d66028a4b18d 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -116,6 +116,10 @@ struct _LibreOfficeKitDocumentClass char* (*getPartName) (LibreOfficeKitDocument* pThis, int nPart); + /// @see lok::Document::getPartHash(). + char* (*getPartHash) (LibreOfficeKitDocument* pThis, + int nPart); + /// @see lok::Document::setPartMode(). void (*setPartMode) (LibreOfficeKitDocument* pThis, int nMode); diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 84741e0ee20b..5bd3e60b9286 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -113,6 +113,12 @@ public: return mpDoc->pClass->getPartName(mpDoc, nPart); } + /// Get the current part's hash. + inline char* getPartHash(int nPart) + { + return mpDoc->pClass->getPartHash(mpDoc, nPart); + } + inline void setPartMode(int nMode) { mpDoc->pClass->setPartMode(mpDoc, nMode); diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index 34f53153b9cb..6e5df25d205b 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -83,6 +83,12 @@ public: return OUString(""); } + /** + * Get the hash of the currently displayed part, i.e. sheet in a spreadsheet + * or slide in a presentation. + */ + virtual OUString getPartHash(int nPart) = 0; + /// @see lok::Document::setPartMode(). virtual void setPartMode(int nPartMode) { |