[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 31 19:18:17 UTC 2020


 cui/source/customize/SvxMenuConfigPage.cxx    |    6 ++++--
 cui/source/customize/SvxToolbarConfigPage.cxx |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 16c7fd441c29f2fe9ca14d8e7ab615ce8fca61c8
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Fri Jul 31 09:51:21 2020 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 31 21:17:44 2020 +0200

    tdf#135321: fix crash when right click empty in Command list
    
    See bt here:
    https://bugs.documentfoundation.org/attachment.cgi?id=163797
    
    Regression from:
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=d54202ff690e4e97e018461cc6dc3dfadd36a702
    author  Sarper Akdemir <q.sarperakdemir at gmail.com>      2020-02-14 13:17:46 +0300
    committer       Muhammet Kara <muhammet.kara at collabora.com>     2020-02-28 18:32:54 +0100
    commit  d54202ff690e4e97e018461cc6dc3dfadd36a702 (patch)
    tree    5f60f9c473b30e0f59bbf13a6f773595e1e4e759
    parent  531f078f3371e909b03b358bc5c9d70df083555f (diff)
    tdf#112135: Provide controls through context menu in lists of Customize dialog
    
    Change-Id: I73031811257e1d128bb6bdc11c481f7a63bbc05e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99850
    Tested-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99876
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx
index a0c6d316a0e5..2adb561834fb 100644
--- a/cui/source/customize/SvxMenuConfigPage.cxx
+++ b/cui/source/customize/SvxMenuConfigPage.cxx
@@ -529,7 +529,8 @@ IMPL_LINK( SvxMenuConfigPage, ContentContextMenuHdl, const CommandEvent&, rCEvt,
 
     // Select clicked entry
     std::unique_ptr<weld::TreeIter> xIter(rTreeView.make_iterator());
-    rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), xIter.get(), false );
+    if (! rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), xIter.get(), false ))
+        return false;
     rTreeView.select(*xIter);
     SelectMenuEntry( rTreeView );
 
@@ -572,7 +573,8 @@ IMPL_LINK( SvxMenuConfigPage, FunctionContextMenuHdl, const CommandEvent&, rCEvt
 
     // Select clicked entry
     std::unique_ptr<weld::TreeIter> xIter(rTreeView.make_iterator());
-    rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), xIter.get(), false );
+    if (! rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), xIter.get(), false ))
+        return false;
     rTreeView.select(*xIter);
     SelectFunctionHdl( rTreeView );
 
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx
index dfe66d4e3721..ead5792c0373 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -896,7 +896,8 @@ IMPL_LINK( SvxToolbarConfigPage, ContentContextMenuHdl, const CommandEvent&, rCE
 
     // Select clicked entry
     std::unique_ptr<weld::TreeIter> rIter(rTreeView.make_iterator());
-    rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), &*rIter );
+    if (! rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), &*rIter ))
+        return false;
     rTreeView.select(*rIter);
     SelectToolbarEntry( rTreeView );
 
@@ -941,7 +942,8 @@ IMPL_LINK( SvxToolbarConfigPage, FunctionContextMenuHdl, const CommandEvent&, rC
 
     // Select clicked entry
     std::unique_ptr<weld::TreeIter> rIter(rTreeView.make_iterator());
-    rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), &*rIter );
+    if (! rTreeView.get_dest_row_at_pos( rCEvt.GetMousePosPixel(), &*rIter ))
+        return false;
     rTreeView.select(*rIter);
     SelectFunctionHdl( rTreeView );
     std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder( &rTreeView, "cui/ui/entrycontextmenu.ui" ) );


More information about the Libreoffice-commits mailing list