diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-19 18:13:27 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-19 18:00:53 +0000 |
commit | af7cbebd8eed82b81e00e6c2e0dc6c2c467ad8e2 (patch) | |
tree | 2172475e22afce046cb1e9b1fb6528574bc16cf4 /include/LibreOfficeKit | |
parent | 69e9c082f07206a1a589c49f679f92c2162e830d (diff) |
LOK: return used format in Document::getTextSelection()
This allows requesting text/html, with falling back to plain text if
necessary.
Change-Id: Ie6d4e0e173311ba018553043b6a869abf193bf6f
Reviewed-on: https://gerrit.libreoffice.org/16377
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 3 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 7 |
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); } /** |