INTEGRATION: CWS xmlsec10 (1.17.4); FILE MERGED

2005/03/23 09:52:44 mmi 1.17.4.2: idl review
Issue number:
Submitted by:
Reviewed by:
2005/03/16 17:15:23 mt 1.17.4.1: #i44474# more catches....
This commit is contained in:
Rüdiger Timm 2005-03-29 12:19:21 +00:00
parent 8bc0922624
commit 8d79f2524b

View file

@ -2,9 +2,9 @@
*
* $RCSfile: digitalsignaturesdialog.cxx,v $
*
* $Revision: 1.17 $
* $Revision: 1.18 $
*
* last change: $Author: vg $ $Date: 2005-03-10 18:05:03 $
* last change: $Author: rt $ $Date: 2005-03-29 13:19:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -345,6 +345,10 @@ IMPL_LINK( DigitalSignaturesDialog, AddButtonHdl, Button*, EMPTYARG )
catch (NoPasswordException&)
{
}
catch ( uno::Exception& )
{
DBG_ERROR( "Exception while adding a signature!" );
}
return 0;
}
@ -352,6 +356,8 @@ IMPL_LINK( DigitalSignaturesDialog, AddButtonHdl, Button*, EMPTYARG )
IMPL_LINK( DigitalSignaturesDialog, RemoveButtonHdl, Button*, EMPTYARG )
{
if( maSignaturesLB.FirstSelected() )
{
try
{
USHORT nSelected = (USHORT) (sal_Int32) maSignaturesLB.FirstSelected()->GetUserData();
maCurrentSignatureInformations.erase( maCurrentSignatureInformations.begin()+nSelected );
@ -371,6 +377,11 @@ IMPL_LINK( DigitalSignaturesDialog, RemoveButtonHdl, Button*, EMPTYARG )
ImplFillSignaturesBox();
}
catch ( uno::Exception& )
{
DBG_ERROR( "Exception while removing a signature!" );
}
}
return 0;
}
@ -418,7 +429,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
// New signatures are not verified, must be valid. Status is INIT.
bool bValid = ( rInfo.nStatus == ::com::sun::star::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED )
|| ( rInfo.nStatus == ::com::sun::star::xml::crypto::SecurityOperationStatus_STATUS_UNKNOWN );
|| ( rInfo.nStatus == ::com::sun::star::xml::crypto::SecurityOperationStatus_UNKNOWN );
if ( bValid )
{
// Can only be valid if ALL streams are signed, which means real stream count == signed stream count
@ -507,8 +518,15 @@ SignatureStreamHelper DigitalSignaturesDialog::ImplOpenSignatureStream( sal_Int3
{
css::uno::Reference < css::io::XTruncate > xTruncate( mxSignatureStream, uno::UNO_QUERY );
DBG_ASSERT( xTruncate.is(), "ImplOpenSignatureStream - Stream does not support xTruncate!" );
try
{
xTruncate->truncate();
}
catch ( uno::RuntimeException& )
{
DBG_ERROR( "ImplOpenSignatureStream - Error while calling truncate!" );
}
}
else
{
css::uno::Reference < css::io::XSeekable > xSeek( mxSignatureStream, uno::UNO_QUERY );