diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-07-19 23:51:16 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-08-02 11:41:47 -0400 |
commit | 7e174f327a3cf16a09e4b2f8e2ffba2225c21901 (patch) | |
tree | 934ba482dafdd9b5fe7a9a68e579d40e990713c4 /include | |
parent | dc4e514f17d1923c19d2b61f733b196e5acf7dec (diff) |
LOK: Support detecting complex selections
Includes unit-test, but is otherwise not complete
implementation.
Change-Id: I5fdcd543358caab1858f6351238c21312665839c
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 3 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 10 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitEnums.h | 9 | ||||
-rw-r--r-- | include/vcl/transfer.hxx | 1 |
4 files changed, 23 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 14b7bb995b10..abdc9863c1f0 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -405,6 +405,9 @@ struct _LibreOfficeKitDocumentClass const size_t *pInSizes, const char **pInStreams); + /// @see lok::Document::getSelectionType + int (*getSelectionType) (LibreOfficeKitDocument* pThis); + #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index cb1ca1e4c2d3..ca0287a6b584 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -352,6 +352,16 @@ public: } /** + * Gets the type of the selected content. + * + * @return an element of the LibreOfficeKitSelectionType enum. + */ + int getSelectionType(LibreOfficeKitDocument* pThis) + { + return mpDoc->pClass->getSelectionType(mpDoc); + } + + /** * Gets the selected content for the current view as a series of binary streams. * * NB. returns a complete set of possible selection types if nullptr is passed for pMimeTypes. diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index 4277adbe6dbc..0680c7e6c44f 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -47,6 +47,15 @@ typedef enum } LibreOfficeKitWindowAction; +typedef enum +{ + LOK_SELTYPE_NONE, + LOK_SELTYPE_TEXT, + LOK_SELTYPE_LARGE_TEXT, + LOK_SELTYPE_COMPLEX +} +LibreOfficeKitSelectionType; + /** Optional features of LibreOfficeKit, in particular callbacks that block * LibreOfficeKit until the corresponding reply is received, which would * deadlock if the client does not support the feature. diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx index 888fe254e115..722d3f26b42b 100644 --- a/include/vcl/transfer.hxx +++ b/include/vcl/transfer.hxx @@ -184,6 +184,7 @@ private: // Transferable2 virtual css::uno::Any SAL_CALL getTransferData2( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override; + virtual sal_Bool SAL_CALL isComplex() override; // XEventListener virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override; |