diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2020-08-17 11:40:38 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-08-18 22:29:25 +0200 |
commit | 06bed3046b4ca62a50566f42d3a7079f0b563935 (patch) | |
tree | 643dfccbbc3be6c0c55d8adbe1a560f5fa989382 /desktop | |
parent | b2d834d6727626f070bb4dde3e1c65da1169f729 (diff) |
Fix hyperlink popup does not show up
The popup does not show up when double clicking
same cell after first one when the cell has a
hyperlink. This is because LOK_CALLBACK_INVALIDATE
_VISIBLE_CURSOR message is filtered out when it
is duplicate and hyperlink is inside this callback.
Selecting different cell after editing one does not
make calc to send another invalidate cursor message
because it is only sent if the selected cell is being
edited. This confuses the ui experience, so this patch
prevents the callback from being filtered out
if only it contains a hyperlink. If there is not a hyperlink
on the cursor position the duplicate callbacks will still
be filtered out.
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ibca0887b7d49633e476bc63d08bc0b7cc309d710
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100851
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 78f152166acd..beb35b4e5fcc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1546,10 +1546,15 @@ void CallbackFlushHandler::queue(const int type, const char* data) case LOK_CALLBACK_CALC_FUNCTION_LIST: case LOK_CALLBACK_JSDIALOG: { + // deleting the duplicate of visible cursor message can cause hyperlink popup not to show up on second/or more click on the same place. + // If the hyperlink is not empty we can bypass that to show the popup + const bool hyperLinkException = type == LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR && + payload.find("\"hyperlink\":\"\"") == std::string::npos && + payload.find("\"hyperlink\": {}") == std::string::npos; const int nViewId = lcl_getViewId(payload); removeAll( - [type, nViewId] (const queue_type::value_type& elem) { - return (elem.Type == type && nViewId == lcl_getViewId(elem)); + [type, nViewId, hyperLinkException] (const queue_type::value_type& elem) { + return (elem.Type == type && nViewId == lcl_getViewId(elem) && !hyperLinkException); } ); } |