summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-10-09 13:15:22 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-10-10 13:50:04 +0200
commitae0756d8266bb92dfe04473a6b15cbb3fb7a0b69 (patch)
treee26b985173dff25adb9c2ae3694e82e30eae8251 /package
parent9f495d128e9e1cc05b2e1f56f11f1ac4055d738d (diff)
ZipOutputStream: No need to explicitly set default values
Change-Id: Ia3a20e0692e658d847e1b825fc97e32ac8a1854b
Diffstat (limited to 'package')
-rw-r--r--package/inc/ZipOutputStream.hxx6
-rw-r--r--package/source/zipapi/ZipOutputStream.cxx15
-rw-r--r--package/source/zippackage/ZipPackage.cxx3
3 files changed, 2 insertions, 22 deletions
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index a8d106be8dc1..146e6427eebe 100644
--- a/package/inc/ZipOutputStream.hxx
+++ b/package/inc/ZipOutputStream.hxx
@@ -52,7 +52,7 @@ protected:
CRC32 m_aCRC;
ByteChucker m_aChucker;
ZipEntry *m_pCurrentEntry;
- sal_Int16 m_nMethod, m_nLevel, m_nDigested;
+ sal_Int16 m_nDigested;
bool m_bFinished, m_bEncryptCurrentEntry;
ZipPackageStream* m_pCurrentStream;
@@ -69,10 +69,6 @@ public:
throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
// XZipOutputStream interfaces
- void SAL_CALL setMethod( sal_Int32 nNewMethod )
- throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL setLevel( sal_Int32 nNewLevel )
- throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL putNextEntry( ZipEntry& rEntry,
ZipPackageStream* pStream,
bool bEncrypt = false )
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index 0a64d09c1f6d..34f097921e75 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -45,8 +45,6 @@ ZipOutputStream::ZipOutputStream( const uno::Reference< uno::XComponentContext >
, m_aDeflater(DEFAULT_COMPRESSION, true)
, m_aChucker(xOStream)
, m_pCurrentEntry(NULL)
-, m_nMethod(DEFLATED)
-, m_nLevel(0)
, m_nDigested(0)
, m_bFinished(false)
, m_bEncryptCurrentEntry(false)
@@ -60,17 +58,6 @@ ZipOutputStream::~ZipOutputStream( void )
delete m_aZipList[i];
}
-void SAL_CALL ZipOutputStream::setMethod( sal_Int32 nNewMethod )
- throw(RuntimeException)
-{
- m_nMethod = static_cast < sal_Int16 > (nNewMethod);
-}
-void SAL_CALL ZipOutputStream::setLevel( sal_Int32 nNewLevel )
- throw(RuntimeException)
-{
- m_aDeflater.setLevel( nNewLevel);
-}
-
void SAL_CALL ZipOutputStream::putNextEntry( ZipEntry& rEntry,
ZipPackageStream* pStream,
bool bEncrypt)
@@ -81,7 +68,7 @@ void SAL_CALL ZipOutputStream::putNextEntry( ZipEntry& rEntry,
if (rEntry.nTime == -1)
rEntry.nTime = getCurrentDosTime();
if (rEntry.nMethod == -1)
- rEntry.nMethod = m_nMethod;
+ rEntry.nMethod = DEFLATED;
rEntry.nVersion = 20;
rEntry.nFlag = 1 << 11;
if (rEntry.nSize == -1 || rEntry.nCompressedSize == -1 ||
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 6dd1e82064d7..3bc0627aa619 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1139,9 +1139,6 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
// Hand it to the ZipOutputStream:
ZipOutputStream aZipOut( m_xContext, xTempOut );
- aZipOut.setMethod( DEFLATED );
- aZipOut.setLevel( DEFAULT_COMPRESSION );
-
try
{
if ( m_nFormat == embed::StorageFormats::PACKAGE )