sfx2/source/doc/objserv.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 52af60e522517dec770fdcf484508db0f7f077df Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Oct 31 21:06:52 2021 +0000 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Nov 2 10:06:28 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/+/124468 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 4d8b13e324ef..c295c5c13a0c 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1511,6 +1511,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); }