[Libreoffice-commits] core.git: include/sfx2 sfx2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 6 11:59:02 UTC 2018
include/sfx2/objsh.hxx | 1 +
sfx2/source/doc/objserv.cxx | 23 +++++++++++++----------
2 files changed, 14 insertions(+), 10 deletions(-)
New commits:
commit fcdc8178ee2907da231baafc2e1d6cf8ce0bf00b
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Oct 24 11:22:50 2018 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Nov 6 12:57:47 2018 +0100
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 at gmail.com>
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 4e0ba7ae2a84..a7f65b619e60 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -357,6 +357,7 @@ public:
/** Returns to if preparing was successful, else false. */
bool PrepareForSigning(weld::Window* pDialogParent);
bool CheckIsReadonly(bool bSignScriptingContent);
+ void RecheckSignature(bool bAlsoRecheckScriptingSignature);
void AfterSigning(bool bSignSuccess, bool bSignScriptingContent);
bool HasValidSignatures();
SignatureState GetDocumentSignatureState();
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();
More information about the Libreoffice-commits
mailing list