summaryrefslogtreecommitdiff
path: root/filter/source/pdf/pdfexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/pdf/pdfexport.cxx')
-rw-r--r--filter/source/pdf/pdfexport.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 758c7e786114..6e13beb96cd6 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -292,25 +292,25 @@ public:
void PDFExportStreamDoc::write( const Reference< XOutputStream >& xStream )
{
Reference< css::frame::XStorable > xStore( m_xSrcDoc, UNO_QUERY );
- if( xStore.is() )
+ if( !xStore.is() )
+ return;
+
+ Sequence< beans::PropertyValue > aArgs( 2 + (m_aPreparedPassword.hasElements() ? 1 : 0) );
+ aArgs.getArray()[0].Name = "FilterName";
+ aArgs.getArray()[1].Name = "OutputStream";
+ aArgs.getArray()[1].Value <<= xStream;
+ if( m_aPreparedPassword.hasElements() )
{
- Sequence< beans::PropertyValue > aArgs( 2 + (m_aPreparedPassword.hasElements() ? 1 : 0) );
- aArgs.getArray()[0].Name = "FilterName";
- aArgs.getArray()[1].Name = "OutputStream";
- aArgs.getArray()[1].Value <<= xStream;
- if( m_aPreparedPassword.hasElements() )
- {
- aArgs.getArray()[2].Name = "EncryptionData";
- aArgs.getArray()[2].Value <<= m_aPreparedPassword;
- }
+ aArgs.getArray()[2].Name = "EncryptionData";
+ aArgs.getArray()[2].Value <<= m_aPreparedPassword;
+ }
- try
- {
- xStore->storeToURL( "private:stream", aArgs );
- }
- catch( const IOException& )
- {
- }
+ try
+ {
+ xStore->storeToURL( "private:stream", aArgs );
+ }
+ catch( const IOException& )
+ {
}
}