summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-22 11:26:13 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-22 13:34:20 +0200
commit6552767aa5ed61215eb64dac0cc026a5f7a9aad1 (patch)
tree63064bc17570fe7b74d0103d0cba5f49e8c79957 /include
parent981a974824642a81f86c526dea682cd27cd437db (diff)
LOK: add Document::paste()
Change-Id: I34998229e7f5cac4c62c859861783be3c161f9bf
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h6
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx12
2 files changed, 18 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 83dcc9803d8a..d83717b4a809 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -157,6 +157,12 @@ struct _LibreOfficeKitDocumentClass
const char* pMimeType,
char** pUsedMimeType);
+ /// @see lok::Document::paste().
+ bool (*paste) (LibreOfficeKitDocument* pThis,
+ const char* pMimeType,
+ const char* pData,
+ size_t nSize);
+
/// @see lok::Document::setGraphicSelection
void (*setGraphicSelection) (LibreOfficeKitDocument* pThis,
int nType,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 72231ad6af1c..4055250956a5 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -247,6 +247,18 @@ public:
}
/**
+ * Pastes content at the current cursor position.
+ *
+ * @param pMimeType format of pData, for example text/plain;charset=utf-8.
+ * @param pData the actual data to be pasted.
+ * @return if the supplied data was pasted successfully.
+ */
+ inline bool paste(const char* pMimeType, const char* pData, size_t nSize)
+ {
+ return mpDoc->pClass->paste(mpDoc, pMimeType, pData, nSize);
+ }
+
+ /**
* Adjusts the graphic selection.
*
* @param nType @see LibreOfficeKitSetGraphicSelectionType