From 9590e8d0a2194b36d5a025a21dc2e71f37f4f54b Mon Sep 17 00:00:00 2001 From: Marco Cecchetti Date: Wed, 10 Jul 2019 10:32:07 +0200 Subject: lok: handling a single msg for deleting multiple characters also includes: lok: fixing testABI failure Change-Id: I4df662a0df49a864c4b307efdd963b857bb77792 lok: missing removeTextContext implementation for Document class Change-Id: I884ad07f330afc19dfe759c08c8a17bdb4f9dcf3 Change-Id: I045d89f9fa478f37fc2917e159e044eee7e1ab31 Reviewed-on: https://gerrit.libreoffice.org/79879 Tested-by: Jenkins Reviewed-by: Michael Meeks --- include/LibreOfficeKit/LibreOfficeKit.h | 6 ++++++ include/LibreOfficeKit/LibreOfficeKit.hxx | 13 +++++++++++++ 2 files changed, 19 insertions(+) (limited to 'include/LibreOfficeKit') diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 93b430f5da0b..6060b015be01 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -408,6 +408,12 @@ struct _LibreOfficeKitDocumentClass /// @see lok::Document::getSelectionType int (*getSelectionType) (LibreOfficeKitDocument* pThis); + /// @see lok::Document::removeTextContext + void (*removeTextContext) (LibreOfficeKitDocument* pThis, + unsigned nWindowId, + int nBefore, + int nAfter); + #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 3c81e4a03ae2..f92ea7d8d9f0 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -728,6 +728,19 @@ public: return mpDoc->pClass->resizeWindow(mpDoc, nWindowId, width, height); } + /** + * For deleting many characters all at once + * + * @param nWindowId Specify the window id to post the input event to. If + * nWindow is 0, the event is posted into the document + * @param nBefore The characters to be deleted before the cursor position + * @param nAfter The characters to be deleted after the cursor position + */ + void removeTextContext(unsigned nWindowId, int nBefore, int nAfter) + { + mpDoc->pClass->removeTextContext(mpDoc, nWindowId, nBefore, nAfter); + } + #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; -- cgit