sd signature line: support signing multiple times

Reload the document after signing. This way in case the signature line
is not exported correctly, we notice it immediately. Also the infobar
state gets reset, allowing a next signature to be added.

Change-Id: Iaeaf4c9aebadbd63b44a0620d345cd0dd0214f30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96983
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Miklos Vajna 2020-06-24 10:17:14 +02:00
parent c834ea3e49
commit 1904251af5

View file

@ -460,6 +460,15 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if (xCertificate.is())
{
SignDocumentContentUsingCertificate(xCertificate);
// Reload to show how the PDF actually looks like after signing. This also
// changes "finish signing" on the infobar back to "sign document" as a side
// effect.
SfxViewFrame* pFrame = GetFrame();
if (pFrame)
{
pFrame->GetDispatcher()->Execute(SID_RELOAD);
}
}
else
{