[Libreoffice-commits] core.git: filter/source
Caolán McNamara
caolanm at redhat.com
Fri Mar 17 23:36:09 UTC 2017
filter/source/msfilter/svdfppt.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit dac990d646461c2f5a44596d5fd6231e4462c987
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 17 21:21:55 2017 +0000
utl::TempFile can give a stream directly without bringing ucb into it
Change-Id: I6ecfdaafc22f8fad68115465e18b1b1b7366fff6
Reviewed-on: https://gerrit.libreoffice.org/35380
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index c41be3839c33..ed94ca963e50 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1837,15 +1837,18 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
if ( aTmpFile.IsValid() )
{
- std::unique_ptr<SvStream> pDest(::utl::UcbStreamHelper::CreateStream( aTmpFile.GetURL(), StreamMode::TRUNC | StreamMode::WRITE ));
- if ( pDest )
+ SvStream* pDest = aTmpFile.GetStream(StreamMode::TRUNC | StreamMode::WRITE);
+ if (pDest)
+ {
bSuccess = SdrPowerPointOLEDecompress( *pDest, rStCtrl, nLen );
+ }
+ aTmpFile.CloseStream();
}
if ( bSuccess )
{
- std::unique_ptr<SvStream> pDest(::utl::UcbStreamHelper::CreateStream( aTmpFile.GetURL(), StreamMode::READ ));
+ SvStream* pDest = aTmpFile.GetStream(StreamMode::READ);
Storage* pObjStor = pDest ? new Storage( *pDest, true ) : nullptr;
- if ( pObjStor )
+ if (pObjStor)
{
tools::SvRef<SotStorage> xObjStor( new SotStorage( pObjStor ) );
if ( xObjStor.is() && !xObjStor->GetError() )
@@ -1947,6 +1950,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
}
}
}
+ aTmpFile.CloseStream();
}
}
}
More information about the Libreoffice-commits
mailing list