diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-31 21:06:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-01 09:51:41 +0100 |
commit | 1e3cc6d8dfe95f9f4c37f583c3de582464159698 (patch) | |
tree | 6bcd57b47654e93147f69b5c8768e7f4c01abf1d /sfx2 | |
parent | fef55498e05717c51c3b3a9222fa460d609a9d3d (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
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); } |