diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-04-11 20:00:14 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-04-11 23:08:11 +0200 |
commit | e98e738a82885b6e7fb643bf407e504fe095803e (patch) | |
tree | 88cd7e8feddf736a7672a2d73349f5df07e65d68 /extensions | |
parent | e02a6cb2c3e2b23b203b422e4e0680877f232636 (diff) |
replace some SvStream seeking with calls to remainingSize()
Change-Id: I2905e98425b9991d6138ab0adc15083d313ca445
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/plugin/base/context.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/extensions/source/plugin/base/context.cxx b/extensions/source/plugin/base/context.cxx index f795dc2bcce8..91214b7f6073 100644 --- a/extensions/source/plugin/base/context.cxx +++ b/extensions/source/plugin/base/context.cxx @@ -209,10 +209,8 @@ void XPluginContext_Impl::postURL(const Reference< ::com::sun::star::plugin::XPl SvFileStream aStream( aFileName, STREAM_READ ); if( aStream.IsOpen() ) { - int nBytes = 0; - aStream.Seek( STREAM_SEEK_TO_END ); - aBuf = Sequence<sal_Int8>( nBytes = aStream.Tell() ); - aStream.Seek( STREAM_SEEK_TO_BEGIN ); + sal_Int64 const nBytes = aStream.remainingSize(); + aBuf = Sequence<sal_Int8>( nBytes ); aStream.Read( aBuf.getArray(), nBytes ); aStream.Close(); osl::FileBase::getFileURLFromSystemPath( aFileName, aFileName ); |