diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-11-15 13:33:31 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2010-11-15 13:33:31 +0100 |
commit | f2473c4c8a6b1a261a7b29ef17d8c2dc567e9849 (patch) | |
tree | b9937054747b53a62bab8034b525c2e1c7bae097 | |
parent | 43d6955ed4d042d57762ae5a379f27e27126634f (diff) |
pl08: #163135# fix a snafu in encryption data handling (thanks mav!)
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 7e9ba8d9a13b..382dd12eeb83 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -282,14 +282,14 @@ void PDFExportStreamDoc::write( const Reference< XOutputStream >& xStream ) Reference< com::sun::star::frame::XStorable > xStore( m_xSrcDoc, UNO_QUERY ); if( xStore.is() ) { - Sequence< beans::PropertyValue > aArgs( 2 + m_aPreparedPassword.getLength() ); + Sequence< beans::PropertyValue > aArgs( 2 + ((m_aPreparedPassword.getLength() > 0) ? 1 : 0) ); aArgs.getArray()[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) ); aArgs.getArray()[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "OutputStream" ) ); aArgs.getArray()[1].Value <<= xStream; - for( sal_Int32 i = 0; i < m_aPreparedPassword.getLength(); ++i ) + if( m_aPreparedPassword.getLength() ) { - aArgs.getArray()[i+2].Name = m_aPreparedPassword[i].Name; - aArgs.getArray()[i+2].Value = m_aPreparedPassword[i].Value; + aArgs.getArray()[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EncryptionData" ) ); + aArgs.getArray()[2].Value <<= m_aPreparedPassword; } try |