summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-10-24 11:22:50 +0200
committerTomaž Vajngerl <quikee@gmail.com>2018-11-06 12:57:47 +0100
commitfcdc8178ee2907da231baafc2e1d6cf8ce0bf00b (patch)
treea90ae21f5053d8f4ebe2fd9cdbedd936cd4d5e33 /sfx2
parente581cc2e5eb943f2cbab43b026cad42a340c8ace (diff)
sfx2: add RecheckSignature to run signature verification again
This was extracted from AfterSigning method and is needed when we add the certificate chain to the database after the document was loaded already. Change-Id: I3087386d0131ce962eb3b588c409542617eb7bfe Reviewed-on: https://gerrit.libreoffice.org/62275 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objserv.cxx23
1 files changed, 13 insertions, 10 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index c8bdda36a707..487afb1825d6 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1498,6 +1498,18 @@ bool SfxObjectShell::PrepareForSigning(weld::Window* pDialogParent)
return false;
}
+void SfxObjectShell::RecheckSignature(bool bAlsoRecheckScriptingSignature)
+{
+ if (bAlsoRecheckScriptingSignature)
+ pImpl->nScriptingSignatureState = SignatureState::UNKNOWN; // Re-Check
+
+ pImpl->nDocumentSignatureState = SignatureState::UNKNOWN; // Re-Check
+
+ Invalidate(SID_SIGNATURE);
+ Invalidate(SID_MACRO_SIGNATURE);
+ Broadcast(SfxHint(SfxHintId::TitleChanged));
+}
+
void SfxObjectShell::AfterSigning(bool bSignSuccess, bool bSignScriptingContent)
{
pImpl->m_bSavingForSigning = true;
@@ -1505,16 +1517,7 @@ void SfxObjectShell::AfterSigning(bool bSignSuccess, bool bSignScriptingContent)
pImpl->m_bSavingForSigning = false;
if ( bSignSuccess )
- {
- if ( bSignScriptingContent )
- pImpl->nScriptingSignatureState = SignatureState::UNKNOWN; // Re-Check
-
- pImpl->nDocumentSignatureState = SignatureState::UNKNOWN; // Re-Check
-
- Invalidate( SID_SIGNATURE );
- Invalidate( SID_MACRO_SIGNATURE );
- Broadcast( SfxHint(SfxHintId::TitleChanged) );
- }
+ RecheckSignature(bSignScriptingContent);
if ( pImpl->m_bAllowModifiedBackAfterSigning )
EnableSetModified();