Kaydet (Commit) 67649406 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:returnconstant in oox,package

Change-Id: I1dade7ddde6b1e226861d32f24f65be5bb9d9352
Reviewed-on: https://gerrit.libreoffice.org/58880
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e7cc6b25
......@@ -108,7 +108,7 @@ public:
// Decryption
bool decryptEncryptionKey(OUString const & rPassword);
void decryptEncryptionKey(OUString const & rPassword);
bool decryptAndCheckVerifierHash(OUString const & rPassword);
bool generateEncryptionKey(OUString const & rPassword) override;
......
......@@ -86,7 +86,7 @@ public:
respective flag in the property mask is set. */
template< typename StreamType, typename DataType >
void writeIntProperty( DataType ornValue )
{ if( startNextProperty() ) maOutStrm.writeAligned< StreamType >( ornValue ); }
{ startNextProperty(); maOutStrm.writeAligned< StreamType >( ornValue ); }
/** Write a boolean property value to the stream, the
respective flag in the property mask is set. */
void writeBoolProperty( bool orbValue );
......@@ -106,7 +106,7 @@ public:
private:
bool ensureValid();
bool startNextProperty( bool bSkip = false );
void startNextProperty( bool bSkip = false );
private:
/** Base class for complex properties such as string, point, size, GUID, picture. */
......
......@@ -331,7 +331,7 @@ bool AgileEngine::decryptAndCheckVerifierHash(OUString const & rPassword)
return (hash.size() <= hashValue.size() && std::equal(hash.begin(), hash.end(), hashValue.begin()));
}
bool AgileEngine::decryptEncryptionKey(OUString const & rPassword)
void AgileEngine::decryptEncryptionKey(OUString const & rPassword)
{
sal_Int32 nKeySize = mInfo.keyBits / 8;
......@@ -342,8 +342,6 @@ bool AgileEngine::decryptEncryptionKey(OUString const & rPassword)
calculateHashFinal(rPassword, aPasswordHash);
calculateBlock(constBlock3, aPasswordHash, mInfo.encryptedKeyValue, mKey);
return true;
}
// TODO: Rename
......
......@@ -138,8 +138,8 @@ void AxBinaryPropertyWriter::writeBoolProperty( bool orbValue )
void AxBinaryPropertyWriter::writePairProperty( AxPairData& orPairData )
{
if( startNextProperty() )
maLargeProps.push_back( ComplexPropVector::value_type( new PairProperty( orPairData ) ) );
startNextProperty();
maLargeProps.push_back( ComplexPropVector::value_type( new PairProperty( orPairData ) ) );
}
void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue )
......@@ -198,12 +198,11 @@ bool AxBinaryPropertyWriter::ensureValid()
return mbValid;
}
bool AxBinaryPropertyWriter::startNextProperty( bool bSkip )
void AxBinaryPropertyWriter::startNextProperty( bool bSkip )
{
// if we are skipping then we clear the flag
setFlag( mnPropFlags, mnNextProp, !bSkip );
mnNextProp <<= 1;
return true;
}
} // namespace exp
......
......@@ -82,7 +82,7 @@ class ZipFile
void getSizeAndCRC( sal_Int64 nOffset, sal_Int64 nCompressedSize, sal_Int64 *nSize, sal_Int32 *nCRC );
bool readLOC( ZipEntry &rEntry );
void readLOC( ZipEntry &rEntry );
sal_Int32 readCEN();
sal_Int32 findEND();
void recover();
......
......@@ -755,7 +755,7 @@ uno::Reference< XInputStream > ZipFile::getWrappedRawStream(
return createStreamForZipEntry ( aMutexHolder, rEntry, rData, UNBUFF_STREAM_WRAPPEDRAW, true, true, aMediaType );
}
bool ZipFile::readLOC( ZipEntry &rEntry )
void ZipFile::readLOC( ZipEntry &rEntry )
{
::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
......@@ -821,8 +821,6 @@ bool ZipFile::readLOC( ZipEntry &rEntry )
if ( bBroken && !bRecoveryMode )
throw ZipIOException("The stream seems to be broken!" );
return true;
}
sal_Int32 ZipFile::findEND()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment