summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2020-05-07 15:47:49 +0200
committerAndras Timar <andras.timar@collabora.com>2020-05-08 10:46:09 +0200
commitf56ace63f3bae98dc0185043d85157d366fd9311 (patch)
tree56597a9be713febbeeac47cdfd9b33cbb71d6322 /include
parentba552ebf17c44b6951f472cce0b2bb318fd8f952 (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>
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h2
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx4
-rw-r--r--include/vcl/ITiledRenderable.hxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 6203c11fb044..f95c8cb7858b 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 b80a35209bc3..ae72a3258357 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -762,9 +762,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);
}
/**
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index a204713dd91b..b68157d32468 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -337,7 +337,7 @@ public:
virtual void moveSelectedParts(int /*nPosition*/, bool /*bDuplicate*/) {}
/// @see lok::Document::completeFunction().
- virtual void completeFunction(int /*nIndex*/)
+ virtual void completeFunction(const OUString& /*rFunctionName*/)
{
}