summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objserv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/objserv.cxx')
-rw-r--r--sfx2/source/doc/objserv.cxx40
1 files changed, 1 insertions, 39 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index b438d2d4e269..51276917bd5e 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1521,44 +1521,6 @@ void SfxObjectShell::StateView_Impl(SfxItemSet& /*rSet*/)
{
}
-SignatureState SfxObjectShell::ImplCheckSignaturesInformation( const uno::Sequence< security::DocumentSignatureInformation >& aInfos )
-{
- bool bCertValid = true;
- SignatureState nResult = SignatureState::NOSIGNATURES;
- bool bCompleteSignature = true;
- if( aInfos.hasElements() )
- {
- nResult = SignatureState::OK;
- for ( const auto& rInfo : aInfos )
- {
- if ( bCertValid )
- {
- sal_Int32 nCertStat = rInfo.CertificateStatus;
- bCertValid = nCertStat == security::CertificateValidity::VALID;
- }
-
- if ( !rInfo.SignatureIsValid )
- {
- nResult = SignatureState::BROKEN;
- break; // we know enough
- }
- bCompleteSignature &= !rInfo.PartialDocumentSignature;
- }
- }
-
- if (nResult == SignatureState::OK && !bCertValid && !bCompleteSignature)
- nResult = SignatureState::NOTVALIDATED_PARTIAL_OK;
- else if (nResult == SignatureState::OK && !bCertValid)
- nResult = SignatureState::NOTVALIDATED;
- else if ( nResult == SignatureState::OK && bCertValid && !bCompleteSignature)
- nResult = SignatureState::PARTIAL_OK;
-
- // this code must not check whether the document is modified
- // it should only check the provided info
-
- return nResult;
-}
-
/// Does this ZIP storage have a signature stream?
static bool HasSignatureStream(const uno::Reference<embed::XStorage>& xStorage)
{
@@ -1656,7 +1618,7 @@ SignatureState SfxObjectShell::ImplGetSignatureState( bool bScriptingContent )
*pState = SignatureState::NOSIGNATURES;
uno::Sequence< security::DocumentSignatureInformation > aInfos = GetDocumentSignatureInformation( bScriptingContent );
- *pState = ImplCheckSignaturesInformation( aInfos );
+ *pState = DocumentSignatures::getSignatureState(aInfos);
}
if ( *pState == SignatureState::OK || *pState == SignatureState::NOTVALIDATED