[Libreoffice-commits] core.git: include/package package/inc package/source
Noel Grandin
noel at peralex.com
Fri Mar 18 06:01:27 UTC 2016
include/package/Deflater.hxx | 2 +-
package/inc/ZipPackageEntry.hxx | 2 +-
package/source/zipapi/Deflater.cxx | 6 +++---
package/source/zippackage/ZipPackage.cxx | 4 ++--
package/source/zippackage/ZipPackageEntry.cxx | 6 +++---
5 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 6b84445e33cb13602a0da9ab92d382748bcbbd51
Author: Noel Grandin <noel at peralex.com>
Date: Thu Mar 17 11:40:41 2016 +0200
loplugin:constantparam in package
Change-Id: Ifd9bb81ff9ccfaf5093c04024d7ea93946b00e66
Reviewed-on: https://gerrit.libreoffice.org/23329
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/package/Deflater.hxx b/include/package/Deflater.hxx
index 640c6d4..d29cea9 100644
--- a/include/package/Deflater.hxx
+++ b/include/package/Deflater.hxx
@@ -38,7 +38,7 @@ protected:
sal_Int64 nOffset, nLength;
z_stream* pStream;
- void init (sal_Int32 nLevel, sal_Int32 nStrategy, bool bNowrap);
+ void init (sal_Int32 nLevel, bool bNowrap);
sal_Int32 doDeflateBytes (css::uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength);
public:
diff --git a/package/inc/ZipPackageEntry.hxx b/package/inc/ZipPackageEntry.hxx
index bd613ae..6d7381e 100644
--- a/package/inc/ZipPackageEntry.hxx
+++ b/package/inc/ZipPackageEntry.hxx
@@ -61,7 +61,7 @@ public:
const OUString& GetMediaType () const { return msMediaType; }
void SetMediaType ( const OUString & sNewType) { msMediaType = sNewType; }
- void doSetParent ( ZipPackageFolder * pNewParent, bool bInsert );
+ void doSetParent ( ZipPackageFolder * pNewParent );
bool IsFolder ( ) { return mbIsFolder; }
void SetFolder ( bool bSetFolder ) { mbIsFolder = bSetFolder; }
diff --git a/package/source/zipapi/Deflater.cxx b/package/source/zipapi/Deflater.cxx
index ce3df03..6af18af 100644
--- a/package/source/zipapi/Deflater.cxx
+++ b/package/source/zipapi/Deflater.cxx
@@ -35,14 +35,14 @@ Deflater::~Deflater()
{
end();
}
-void Deflater::init (sal_Int32 nLevelArg, sal_Int32 nStrategyArg, bool bNowrap)
+void Deflater::init (sal_Int32 nLevelArg, bool bNowrap)
{
pStream = new z_stream;
/* Memset it to 0...sets zalloc/zfree/opaque to NULL */
memset (pStream, 0, sizeof(*pStream));
switch (deflateInit2(pStream, nLevelArg, Z_DEFLATED, bNowrap? -MAX_WBITS : MAX_WBITS,
- DEF_MEM_LEVEL, nStrategyArg))
+ DEF_MEM_LEVEL, DEFAULT_STRATEGY))
{
case Z_OK:
break;
@@ -63,7 +63,7 @@ Deflater::Deflater(sal_Int32 nSetLevel, bool bNowrap)
, nOffset(0)
, nLength(0)
{
- init(nSetLevel, DEFAULT_STRATEGY, bNowrap);
+ init(nSetLevel, bNowrap);
}
sal_Int32 Deflater::doDeflateBytes (uno::Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength)
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index c1bd32a..4b9a671 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -535,7 +535,7 @@ void ZipPackage::getZipFileContents()
{
pPkgFolder = new ZipPackageFolder( m_xContext, m_nFormat, m_bAllowRemoveOnInsert );
pPkgFolder->setName( sTemp );
- pPkgFolder->doSetParent( pCurrent, true );
+ pPkgFolder->doSetParent( pCurrent );
pCurrent = pPkgFolder;
}
else
@@ -553,7 +553,7 @@ void ZipPackage::getZipFileContents()
pPkgStream->SetPackageMember( true );
pPkgStream->setZipEntryOnLoading( rEntry );
pPkgStream->setName( sTemp );
- pPkgStream->doSetParent( pCurrent, true );
+ pPkgStream->doSetParent( pCurrent );
}
}
diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx
index 3351894..327292f 100644
--- a/package/source/zippackage/ZipPackageEntry.cxx
+++ b/package/source/zippackage/ZipPackageEntry.cxx
@@ -83,11 +83,11 @@ uno::Reference< XInterface > SAL_CALL ZipPackageEntry::getParent( )
return uno::Reference< XInterface >( static_cast< ::cppu::OWeakObject* >( mpParent ), UNO_QUERY );
}
-void ZipPackageEntry::doSetParent ( ZipPackageFolder * pNewParent, bool bInsert )
+void ZipPackageEntry::doSetParent ( ZipPackageFolder * pNewParent )
{
// xParent = mpParent = pNewParent;
mpParent = pNewParent;
- if ( bInsert && !msName.isEmpty() && !pNewParent->hasByName ( msName ) )
+ if ( !msName.isEmpty() && !pNewParent->hasByName ( msName ) )
pNewParent->doInsertByName ( this, false );
}
@@ -105,7 +105,7 @@ void SAL_CALL ZipPackageEntry::setParent( const uno::Reference< XInterface >& xN
{
if ( mpParent && !msName.isEmpty() && mpParent->hasByName ( msName ) && mbAllowRemoveOnInsert )
mpParent->removeByName( msName );
- doSetParent ( pNewParent, true );
+ doSetParent ( pNewParent );
}
}
//XPropertySet
More information about the Libreoffice-commits
mailing list