diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2017-01-11 17:08:50 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2017-01-11 19:31:28 -0500 |
commit | e5dc4ab7a023b003d312ea6f12e6473599993335 (patch) | |
tree | de35bce7de377f7c7c1e26eb43441c3c37835ad3 /package | |
parent | a6216119be2c32e9031c6bb9b7dfa07f0468d813 (diff) |
Not worth having this as a separate data member.
It is the same as the input stream instance, and it is only used in
one call site.
Change-Id: If52209420462aec7ec3dbc180e05f09603acaea1
Diffstat (limited to 'package')
-rw-r--r-- | package/inc/ZipFile.hxx | 1 | ||||
-rw-r--r-- | package/source/zipapi/ZipFile.cxx | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx index bac0168c3afc..962733c92aa4 100644 --- a/package/inc/ZipFile.hxx +++ b/package/inc/ZipFile.hxx @@ -61,7 +61,6 @@ class ZipFile ByteGrabber aGrabber; ZipUtils::Inflater aInflater; css::uno::Reference < css::io::XInputStream > xStream; - css::uno::Reference < css::io::XSeekable > xSeek; const css::uno::Reference < css::uno::XComponentContext > m_xContext; bool bRecoveryMode; diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 49264b01c091..6b397c677628 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -72,7 +72,6 @@ ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference : aGrabber(xInput) , aInflater( true ) , xStream(xInput) -, xSeek(xInput, UNO_QUERY) , m_xContext ( rxContext ) , bRecoveryMode( false ) { @@ -90,7 +89,6 @@ ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference : aGrabber(xInput) , aInflater( true ) , xStream(xInput) -, xSeek(xInput, UNO_QUERY) , m_xContext ( rxContext ) , bRecoveryMode( bForceRecovery ) { @@ -118,7 +116,6 @@ void ZipFile::setInputStream ( const uno::Reference < XInputStream >& xNewStream ::osl::MutexGuard aGuard( m_aMutex ); xStream = xNewStream; - xSeek.set( xStream, UNO_QUERY ); aGrabber.setInputStream ( xStream ); } @@ -489,6 +486,7 @@ bool ZipFile::hasValidPassword ( ZipEntry & rEntry, const ::rtl::Reference< Encr bool bRet = false; if ( rData.is() && rData->m_aKey.getLength() ) { + css::uno::Reference < css::io::XSeekable > xSeek(xStream, UNO_QUERY_THROW); xSeek->seek( rEntry.nOffset ); sal_Int64 nSize = rEntry.nMethod == DEFLATED ? rEntry.nCompressedSize : rEntry.nSize; |