improve usage of TempFile in SVGExport
TempFile already handles the stream. And not touching the URL means we stay on the fast path for temp files. Change-Id: I1c239c90901af4450ba10e0d1505bb982cdce41c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140116 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
aace38f9bf
commit
8ed50c16a4
@@ -2505,16 +2505,18 @@ void SVGFilter::implCreateObjectsFromBackground( const Reference< css::drawing::
|
|||||||
|
|
||||||
utl::TempFile aFile;
|
utl::TempFile aFile;
|
||||||
aFile.EnableKillingFile();
|
aFile.EnableKillingFile();
|
||||||
|
SvStream* pStream = aFile.GetStream(StreamMode::READWRITE);
|
||||||
|
|
||||||
Sequence< PropertyValue > aDescriptor{
|
Sequence< PropertyValue > aDescriptor{
|
||||||
comphelper::makePropertyValue("FilterName", OUString( "SVM" )),
|
comphelper::makePropertyValue("FilterName", OUString( "SVM" )),
|
||||||
comphelper::makePropertyValue("URL", aFile.GetURL()),
|
comphelper::makePropertyValue("OutputStream", uno::Reference<XOutputStream>(new utl::OOutputStreamWrapper(*pStream))),
|
||||||
comphelper::makePropertyValue("ExportOnlyBackground", true)
|
comphelper::makePropertyValue("ExportOnlyBackground", true)
|
||||||
};
|
};
|
||||||
|
|
||||||
xExporter->setSourceDocument( Reference< XComponent >( rxDrawPage, UNO_QUERY ) );
|
xExporter->setSourceDocument( Reference< XComponent >( rxDrawPage, UNO_QUERY ) );
|
||||||
xExporter->filter( aDescriptor );
|
xExporter->filter( aDescriptor );
|
||||||
SvmReader aReader( *aFile.GetStream( StreamMode::READ ) );
|
pStream->Seek(0);
|
||||||
|
SvmReader aReader( *pStream );
|
||||||
aReader.Read( aMtf );
|
aReader.Read( aMtf );
|
||||||
|
|
||||||
bool bIsBitmap = false;
|
bool bIsBitmap = false;
|
||||||
|
Reference in New Issue
Block a user