sfx2/source/doc/objserv.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 1e3cc6d8dfe95f9f4c37f583c3de582464159698
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Oct 31 21:06:52 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Nov 1 09:51:41 2021 +0100

    Resolves: tdf#145464 ensure the SfxViewFrame is activated
    
    before dispatching SID_SIGNATURE, its normally activated on getting
    focus, but its possible to move focus into the button of the infobar
    without the frame getting focus.
    
    Change-Id: Id353e23b595e14614361c0c25976c788940c67eb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124534
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 1182ad519d22..6f7e3fc829b5 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1512,6 +1512,13 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
 
 IMPL_LINK_NOARG(SfxObjectShell, SignDocumentHandler, weld::Button&, void)
 {
+    SfxViewFrame *pFrame = SfxViewFrame::GetFirst(this);
+    if (!pFrame)
+    {
+        SAL_WARN("sfx.appl", "There should be some SfxViewFrame associated 
here");
+        return;
+    }
+    pFrame->MakeActive_Impl(false);
     GetDispatcher()->Execute(SID_SIGNATURE);
 }
 

Reply via email to