diff options
-rw-r--r-- | include/sfx2/objsh.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 23 |
2 files changed, 14 insertions, 10 deletions
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(); |