diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:32:45 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:36:25 +0200 |
commit | 0a48e0fb4ee88e3bf16cfa5cf85d6864c0b1da92 (patch) | |
tree | 15d0372e1c3d60c854ed052879f55014a1a7385e /package | |
parent | c718cfd7431d5909f66547a2042bd303f79cfde0 (diff) |
loplugin:simplifybool
Change-Id: Ia4177cf1a4b0c06ef614b54298fd6f9224956afc
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zipapi/XUnbufferedStream.cxx | 4 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx index b596b4041611..7ce12a285478 100644 --- a/package/source/zipapi/XUnbufferedStream.cxx +++ b/package/source/zipapi/XUnbufferedStream.cxx @@ -81,8 +81,8 @@ XUnbufferedStream::XUnbufferedStream( if (mnZipSize < 0) throw ZipIOException("The stream seems to be broken!"); - bool bHaveEncryptData = ( rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0 ) ? true : false; - bool bMustDecrypt = ( nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted ) ? true : false; + bool bHaveEncryptData = rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0; + bool bMustDecrypt = nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted; if ( bMustDecrypt ) { diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index aaddc3a624c9..c94cba62c544 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -525,7 +525,7 @@ bool ZipPackageStream::saveChild( pTempEntry->nPathLen = (sal_Int16)( OUStringToOString( pTempEntry->sPath, RTL_TEXTENCODING_UTF8 ).getLength() ); const bool bToBeEncrypted = m_bToBeEncrypted && (rEncryptionKey.getLength() || m_bHaveOwnKey); - const bool bToBeCompressed = bToBeEncrypted ? true : m_bToBeCompressed; + const bool bToBeCompressed = bToBeEncrypted || m_bToBeCompressed; aPropSet[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty; aPropSet[PKG_MNFST_MEDIATYPE].Value <<= GetMediaType( ); |