Kaydet (Commit) 379fcb7b authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS xmlsec08 (1.4.10); FILE MERGED

2005/02/22 13:07:20 mt 1.4.10.1: #i36682# Accept separate Stream for signatures...
üst 559cd2f4
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: documentsignaturehelper.cxx,v $ * $RCSfile: documentsignaturehelper.cxx,v $
* *
* $Revision: 1.4 $ * $Revision: 1.5 $
* *
* last change: $Author: rt $ $Date: 2004-11-26 14:55:45 $ * last change: $Author: vg $ $Date: 2005-03-10 18:08:03 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -223,11 +223,11 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream( const uno::R ...@@ -223,11 +223,11 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream( const uno::R
{ {
::rtl::OUString aSIGStreamName; ::rtl::OUString aSIGStreamName;
if ( eDocSigMode == SignatureModeDocumentContent ) if ( eDocSigMode == SignatureModeDocumentContent )
aSIGStreamName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "documentsignatures.xml" ) ); aSIGStreamName = DocumentSignatureHelper::GetDocumentContentSignatureDefaultStreamName();
else if ( eDocSigMode == SignatureModeMacros ) else if ( eDocSigMode == SignatureModeMacros )
aSIGStreamName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "macrosignatures.xml" ) ); aSIGStreamName = DocumentSignatureHelper::GetScriptingContentSignatureDefaultStreamName();
else else
aSIGStreamName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "packagesignatures.xml" ) ); aSIGStreamName = DocumentSignatureHelper::GetPackageSignatureDefaultStreamName();
aHelper.xSignatureStream = aHelper.xSignatureStorage->openStreamElement( aSIGStreamName, nOpenMode ); aHelper.xSignatureStream = aHelper.xSignatureStorage->openStreamElement( aSIGStreamName, nOpenMode );
} }
...@@ -241,33 +241,17 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream( const uno::R ...@@ -241,33 +241,17 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream( const uno::R
return aHelper; return aHelper;
} }
void SignatureStreamHelper::Clear() ::rtl::OUString DocumentSignatureHelper::GetDocumentContentSignatureDefaultStreamName()
{ {
// MT: bug in storage implementation, shouldn't be necessary return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "documentsignatures.xml" ) );
if ( xSignatureStorage.is() ) }
{
try
{
uno::Reference< lang::XComponent > xComp( xSignatureStorage, uno::UNO_QUERY );
xComp->dispose();
}
catch ( lang::DisposedException )
{
}
}
if ( xSignatureStream.is() )
{
try
{
uno::Reference< lang::XComponent > xComp( xSignatureStream, uno::UNO_QUERY );
xComp->dispose();
}
catch ( lang::DisposedException )
{
}
}
xSignatureStream = NULL; ::rtl::OUString DocumentSignatureHelper::GetScriptingContentSignatureDefaultStreamName()
xSignatureStorage = NULL; {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "macrosignatures.xml" ) );
} }
::rtl::OUString DocumentSignatureHelper::GetPackageSignatureDefaultStreamName()
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "packagesignatures.xml" ) );
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment