[Libreoffice-commits] core.git: svtools/source
Eike Rathke
erack at redhat.com
Mon Sep 18 14:52:32 UTC 2017
svtools/source/filter/exportdialog.cxx | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
New commits:
commit bd352d6e1c434f2b917c53a84a1e89578f72bc80
Author: Eike Rathke <erack at redhat.com>
Date: Mon Sep 18 16:51:23 2017 +0200
Move initialization to where it belongs
Change-Id: Ifff6cf6a9849b4089f6aabe56bb5de7a414e939a
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 );
More information about the Libreoffice-commits
mailing list