[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source

Mert Tumer (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 18 21:02:01 UTC 2020


 desktop/source/lib/init.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 021d17006c970bbd784bc3a5474d56fff02fdca0
Author:     Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Mon Aug 17 11:40:38 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Aug 18 23:01:25 2020 +0200

    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 at collabora.com>
    Change-Id: Ibca0887b7d49633e476bc63d08bc0b7cc309d710
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100851
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    (cherry picked from commit 06bed3046b4ca62a50566f42d3a7079f0b563935)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100934
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

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);
                     }
                 );
             }


More information about the Libreoffice-commits mailing list