diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-17 18:00:01 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-18 12:48:39 +0200 |
commit | 1a1d15b422bc9bb787f939c28e520ca23debe28b (patch) | |
tree | edc795c13e4a4c1382fdc4cc630862f70f66d722 /include | |
parent | 4f6eea0e6f85a0b90843734aa6f288b8fa92d887 (diff) |
LOK: add lok::Document::getTextSelection()
I.e. the copy part of copy&paste. Only the Writer bits for now.
Change-Id: Ia003e76e3b234735f472cdef125514f9771d8640
(cherry picked from commit cfc4375158ee174e8dcb4df319b82c0bdd6f31cc)
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 4 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 10 | ||||
-rw-r--r-- | include/vcl/ITiledRenderable.hxx | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 7eb42e898b87..7fbf71b8667a 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -146,6 +146,10 @@ struct _LibreOfficeKitDocumentClass int nX, int nY); + /// @see lok::Document::getTextSelection + char* (*getTextSelection) (LibreOfficeKitDocument* pThis, + const char* pMimeType); + /// @see lok::Document::setGraphicSelection void (*setGraphicSelection) (LibreOfficeKitDocument* pThis, int nType, diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index bd8832a8a0d0..2b562b261743 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -217,6 +217,16 @@ public: } /** + * Gets the currently selected text. + * + * @param pMimeType determines the return format, for example text/plain;charset=utf-8. + */ + inline char* getTextSelection(const char* pMimeType) + { + return mpDoc->pClass->getTextSelection(mpDoc, pMimeType); + } + + /** * Adjusts the graphic selection. * * @param nType @see LibreOfficeKitSetGraphicSelectionType diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index 5cac9b63a0c9..7de3c3219e4a 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -122,6 +122,13 @@ public: virtual void setTextSelection(int nType, int nX, int nY) = 0; /** + * Gets the text selection. + * + * @see lok::Document::getTextSelection(). + */ + virtual OString getTextSelection(const char* /*pMimeType*/) { return OString(); } + + /** * Adjusts the graphic selection. * * @see lok::Document::setGraphicSelection(). |