diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2005-03-10 17:22:00 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2005-03-10 17:22:00 +0000 |
commit | dea4f6a9e676379c305e0647f81412aba42327d6 (patch) | |
tree | 24fe7c61f8c31b0a01e1032193f498b43f34842f /sfx2 | |
parent | 589f4d6336d32e11affc55888cf68033359cad6e (diff) |
INTEGRATION: CWS xmlsec08 (1.79.10); FILE MERGED
2005/03/03 13:15:51 mt 1.79.10.3: RESYNC: (1.79-1.80); FILE MERGED
2005/02/24 17:38:39 mt 1.79.10.2: #i40198# return value for SignContents_Impl
2005/02/18 15:28:11 mav 1.79.10.1: #i36682# use original stream for signing
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 94fa630462b5..a8bd18f51cb3 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -2,9 +2,9 @@ * * $RCSfile: objserv.cxx,v $ * - * $Revision: 1.80 $ + * $Revision: 1.81 $ * - * last change: $Author: vg $ $Date: 2005-02-25 09:36:27 $ + * last change: $Author: vg $ $Date: 2005-03-10 18:22:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -381,12 +381,6 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) if( SID_SIGNATURE == nId || SID_MACRO_SIGNATURE == nId ) { -// Reference< com::sun::star::embed::XStorage > xStore; -// Reference< com::sun::star::security::XDocumentDigitalSignatures > xD( -// comphelper::getProcessServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.security.DocumentDigitalSignatures" ) ) ), UNO_QUERY ); -// if( xD.is() ) -// xD->ShowPackageSignatures( xStore ); - if ( QueryHiddenInformation( WhenSigning, NULL ) == RET_YES ) ( SID_SIGNATURE == nId ) ? SignDocumentContent() : SignScriptingContent(); return; @@ -1394,9 +1388,11 @@ sal_uInt16 SfxObjectShell::ImplGetSignatureState( sal_Bool bScriptingContent ) { ::com::sun::star::uno::Sequence< security::DocumentSignaturesInformation > aInfos; if ( bScriptingContent ) - aInfos = xD->VerifyScriptingContentSignatures( GetMedium()->GetStorage() ); + aInfos = xD->verifyScriptingContentSignatures( GetMedium()->GetLastCommitReadStorage_Impl(), + uno::Reference< io::XInputStream >() ); else - aInfos = xD->VerifyDocumentContentSignatures( GetMedium()->GetStorage() ); + aInfos = xD->verifyDocumentContentSignatures( GetMedium()->GetLastCommitReadStorage_Impl(), + uno::Reference< io::XInputStream >() ); int nInfos = aInfos.getLength(); if( nInfos ) @@ -1452,19 +1448,20 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) return; } - GetMedium()->SignContents_Impl( bScriptingContent ); - - if ( bScriptingContent ) - pImp->nScriptingSignatureState = SIGNATURESTATE_UNKNOWN;// Re-Check - else - pImp->nDocumentSignatureState = SIGNATURESTATE_UNKNOWN;// Re-Check + if ( GetMedium()->SignContents_Impl( bScriptingContent ) ) + { + if ( bScriptingContent ) + pImp->nScriptingSignatureState = SIGNATURESTATE_UNKNOWN;// Re-Check + else + pImp->nDocumentSignatureState = SIGNATURESTATE_UNKNOWN;// Re-Check - // Doc was not modified befor, and signature is already in the storage... - SetModified( FALSE ); + // Doc was not modified befor, and signature is already in the storage... + SetModified( FALSE ); - Invalidate( SID_SIGNATURE ); - Invalidate( SID_MACRO_SIGNATURE ); - Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) ); + Invalidate( SID_SIGNATURE ); + Invalidate( SID_MACRO_SIGNATURE ); + Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) ); + } } sal_uInt16 SfxObjectShell::GetDocumentSignatureState() |