diff options
author | Jan Holesovsky <kendy@collabora.com> | 2020-05-07 15:47:49 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-05-10 21:43:51 +0200 |
commit | c6a3f51a89449f61ad20a1787c0a3cb41fa91466 (patch) | |
tree | 8b2fb0f7c67a8c500d0a94ba74ea99e7740ff822 /include/LibreOfficeKit | |
parent | 4a1ceb06ca19a5c89895015e0fc73c8fa897294e (diff) |
formula bar: Change completeFunction() to accept string instead of index.
The 'index' is unsafe, because the set it tries to index can change in
the meantime. Instead, use the function name and search for it in the
set, to get the recent index.
Change-Id: Id2a021c32f421057c87b6f7f4fffcc1c98009acb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93666
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93910
Tested-by: Jenkins
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 2 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 309744522004..8b68452697b3 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -437,7 +437,7 @@ struct _LibreOfficeKitDocumentClass int viewId); /// @see lok::Document::completeFunction(). - void (*completeFunction) (LibreOfficeKitDocument* pThis, int nIndex); + void (*completeFunction) (LibreOfficeKitDocument* pThis, const char* pFunctionName); /// @see lok::Document::setWindowTextSelection void (*setWindowTextSelection) (LibreOfficeKitDocument* pThis, diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 37eacdfb3649..c85143821717 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -761,9 +761,9 @@ public: * * @param nIndex is the index of the selected function */ - void completeFunction(int nIndex) + void completeFunction(const char* pFunctionName) { - mpDoc->pClass->completeFunction(mpDoc, nIndex); + mpDoc->pClass->completeFunction(mpDoc, pFunctionName); } /** |