summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-19 18:13:27 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-22 11:16:25 +0200
commit801f24f0b87c3d159cc68e1cbb2d4a7ebc34b5ea (patch)
tree82874b5156752f5b82a4bf95acd3f926c9f0ce54 /include/LibreOfficeKit
parent5095443d20dc8f474372fb217939526b11156917 (diff)
LOK: return used format in Document::getTextSelection()
This allows requesting text/html, with falling back to plain text if necessary. Conflicts: libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx Reviewed-on: https://gerrit.libreoffice.org/16377 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit af7cbebd8eed82b81e00e6c2e0dc6c2c467ad8e2) Change-Id: Ie6d4e0e173311ba018553043b6a869abf193bf6f
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h3
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx7
2 files changed, 6 insertions, 4 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 7fbf71b8667a..e3b485052444 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -148,7 +148,8 @@ struct _LibreOfficeKitDocumentClass
/// @see lok::Document::getTextSelection
char* (*getTextSelection) (LibreOfficeKitDocument* pThis,
- const char* pMimeType);
+ const char* pMimeType,
+ char** pUsedMimeType);
/// @see lok::Document::setGraphicSelection
void (*setGraphicSelection) (LibreOfficeKitDocument* pThis,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 2b562b261743..816ade5649b2 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -219,11 +219,12 @@ public:
/**
* Gets the currently selected text.
*
- * @param pMimeType determines the return format, for example text/plain;charset=utf-8.
+ * @param pMimeType suggests the return format, for example text/plain;charset=utf-8.
+ * @param pUsedMimeType output parameter to inform about the determined format (suggested one or plain text).
*/
- inline char* getTextSelection(const char* pMimeType)
+ inline char* getTextSelection(const char* pMimeType, char** pUsedMimeType = 0)
{
- return mpDoc->pClass->getTextSelection(mpDoc, pMimeType);
+ return mpDoc->pClass->getTextSelection(mpDoc, pMimeType, pUsedMimeType);
}
/**