diff options
author | Eike Rathke <erack@redhat.com> | 2017-09-18 16:51:23 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-09-18 16:51:30 +0200 |
commit | bd352d6e1c434f2b917c53a84a1e89578f72bc80 (patch) | |
tree | 792804af83b7a1cbf2deada9aefb12a0b1d61654 /svtools | |
parent | 1ea4496f3b2defaf51391e816d159717c55f2929 (diff) |
Move initialization to where it belongs
Change-Id: Ifff6cf6a9849b4089f6aabe56bb5de7a414e939a
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/filter/exportdialog.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index bd5254c0449f..cd2e84e2cd95 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -453,21 +453,6 @@ void ExportDialog::GetGraphicStream() } else { - uno::Reference < io::XStream > xStream( new utl::OStreamWrapper( *mpTempStream ) ); - uno::Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() ); - - uno::Reference< drawing::XGraphicExportFilter > xGraphicExporter = - drawing::GraphicExportFilter::create( mxContext ); - - OUString sFormat( maExt ); - uno::Sequence< beans::PropertyValue > aDescriptor( 3 ); - aDescriptor[0].Name = "OutputStream"; - aDescriptor[0].Value <<= xOutputStream; - aDescriptor[1].Name = "FilterName"; - aDescriptor[1].Value <<= sFormat; - aDescriptor[2].Name = "FilterData"; - aDescriptor[2].Value <<= aNewFilterData; - uno::Reference< lang::XComponent > xSourceDoc; if ( mxPage.is() ) xSourceDoc.set( mxPage, uno::UNO_QUERY_THROW ); @@ -477,6 +462,21 @@ void ExportDialog::GetGraphicStream() xSourceDoc.set( mxShape, uno::UNO_QUERY_THROW ); if ( xSourceDoc.is() ) { + uno::Reference < io::XStream > xStream( new utl::OStreamWrapper( *mpTempStream ) ); + uno::Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() ); + + OUString sFormat( maExt ); + uno::Sequence< beans::PropertyValue > aDescriptor( 3 ); + aDescriptor[0].Name = "OutputStream"; + aDescriptor[0].Value <<= xOutputStream; + aDescriptor[1].Name = "FilterName"; + aDescriptor[1].Value <<= sFormat; + aDescriptor[2].Name = "FilterData"; + aDescriptor[2].Value <<= aNewFilterData; + + uno::Reference< drawing::XGraphicExportFilter > xGraphicExporter = + drawing::GraphicExportFilter::create( mxContext ); + xGraphicExporter->setSourceDocument( xSourceDoc ); xGraphicExporter->filter( aDescriptor ); |