summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2020-08-17 11:40:38 +0300
committerAndras Timar <andras.timar@collabora.com>2020-08-18 23:01:25 +0200
commit021d17006c970bbd784bc3a5474d56fff02fdca0 (patch)
tree2eddaa771c74c6474e1b2be7fd5eba9fad37fc20 /desktop/source
parent91f298fa883e173125e4cb1fd3fc862530d1bfad (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> (cherry picked from commit 06bed3046b4ca62a50566f42d3a7079f0b563935) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100934 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/lib/init.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 02bf19602150..4d96e34333ea 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1554,10 +1554,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);
}
);
}