[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sfx2/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 13 08:03:39 UTC 2021


 sfx2/source/control/recentdocsview.cxx     |    1 +
 sfx2/source/control/recentdocsviewitem.cxx |    1 +
 2 files changed, 2 insertions(+)

New commits:
commit 44a3231d03edc68209d0dd35391a146e4ed440b9
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 12 16:01:51 2021 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Aug 13 10:03:04 2021 +0200

    Resolves: tdf#143843 disable the recently-used widget during load
    
    We show a busy-cursor but the widget can still be interacted with so
    another document can be launched by clicking on another recently-used
    item while the first one is still loading, and the recently-used widget
    isn't prepared for this scenario so the second to complete load will
    crash.
    
    Disable the recently-used widget when its cursor is set to busy, and in
    the (unlikely) case that the load doesn't complete normally (missing
    document or load filter error) and the recently-used widget still exists
    and its cursor is unset from busy then reenable it for user input at
    that point.
    
    Change-Id: I8f4487f3dbede14c9778e49442366bd9445f1d63
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120362
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 0b01603d3914..a80af10d1e7d 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -438,6 +438,7 @@ IMPL_LINK( RecentDocsView, ExecuteHdl_Impl, void*, p, void )
     {
         pLoadRecentFile->pView->DispatchedLoadRecentUsedFile();
         pLoadRecentFile->pView->SetPointer(PointerStyle::Arrow);
+        pLoadRecentFile->pView->Enable();
     }
 
     delete pLoadRecentFile;
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index 95660738346a..cf2063b3dc4d 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -177,6 +177,7 @@ void RecentDocsViewItem::OpenDocument()
 {
     // show busy mouse pointer
     mrParentView.SetPointer(PointerStyle::Wait);
+    mrParentView.Disable();
 
     Reference<frame::XDispatch> xDispatch;
     css::util::URL aTargetURL;


More information about the Libreoffice-commits mailing list