summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-09-14 14:36:56 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-09-21 07:30:12 +0200
commit655c7877a0650b7bfd04a3294cdf92bc7ab94055 (patch)
treea3176e0f229d206e57ae09e81444beb792be307f /include
parent58b5c13b00cd4d881e1d6313316cc621198a4b04 (diff)
lok::Document: add createView()
Change-Id: Ic871ec41992b611b10958799b2dc12375a91efe4
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h3
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx10
2 files changed, 13 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 8060f0e6ec7c..eae35374e032 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -162,6 +162,9 @@ struct _LibreOfficeKitDocumentClass
/// @see lok::Document:getStyles
char* (*getCommandValues) (LibreOfficeKitDocument* pThis, const char* pCommand);
+
+ /// @see lok::Document::createView().
+ int (*createView) (LibreOfficeKitDocument* pThis);
#endif // LOK_USE_UNSTABLE_API
};
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 44599948e659..1a8b002ecba6 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -257,6 +257,16 @@ public:
{
return mpDoc->pClass->getCommandValues(mpDoc, pCommand);
}
+
+ /**
+ * Create a new view for an existing document.
+ * By default a loaded document has 1 view.
+ * @return the ID of the new view.
+ */
+ int createView()
+ {
+ return mpDoc->pClass->createView(mpDoc);
+ }
#endif // LOK_USE_UNSTABLE_API
};