summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-09-16 09:30:41 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-06 16:24:11 +0200
commit470db78ef09351db67fc22c70c5dd4b98bc43a14 (patch)
tree4846ceb384427d7acc2fda4fe74f5ed89eb42477 /include/LibreOfficeKit
parenta0b7695a88ee54595880582dd0a17a0a38bb9a78 (diff)
lok::Document: add get/setView()
Change-Id: Ic3bce8f01d7e048e853c063c4bce1255845c60d0 (cherry picked from commit 46588c42a546d4517b773853856b9c8f8c2e5ece)
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h4
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx20
2 files changed, 23 insertions, 1 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 7f41d13ff393..18f4b3edc624 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -170,6 +170,10 @@ struct _LibreOfficeKitDocumentClass
int (*createView) (LibreOfficeKitDocument* pThis);
/// @see lok::Document::destroyView().
void (*destroyView) (LibreOfficeKitDocument* pThis, int nId);
+ /// @see lok::Document::setView().
+ void (*setView) (LibreOfficeKitDocument* pThis, int nId);
+ /// @see lok::Document::getView().
+ int (*getView) (LibreOfficeKitDocument* pThis);
#endif // LOK_USE_UNSTABLE_API
};
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 3e1a0ac20b07..f5821b71191a 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -269,13 +269,31 @@ public:
}
/**
- * Destroy a view of an existring document.
+ * Destroy a view of an existing document.
* @param nId a view ID, returned by createView().
*/
void destroyView(int nId)
{
mpDoc->pClass->destroyView(mpDoc, nId);
}
+
+ /**
+ * Set an existing view of an existing document as current.
+ * @param nId a view ID, returned by createView().
+ */
+ void setView(int nId)
+ {
+ mpDoc->pClass->setView(mpDoc, nId);
+ }
+
+ /**
+ * Get the current view.
+ * @return a view ID, previously returned by createView().
+ */
+ int getView()
+ {
+ return mpDoc->pClass->getView(mpDoc);
+ }
#endif // LOK_USE_UNSTABLE_API
};