diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-12 11:43:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-01-12 11:47:52 +0200 |
commit | 8dbfc413b1603c814cecf5306238c6144185671f (patch) | |
tree | b47d0fe0c3499ca23871845a97590e0a7e88115a /oox | |
parent | e5bb67f08d4e2095affc5229e638535376ee66b4 (diff) |
loplugin:unusedmethods unused return value in include/oox
Change-Id: I22acb6b94774c5944d8276827c53a419f0803f83
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/binarycodec.cxx | 7 | ||||
-rw-r--r-- | oox/source/crypto/AgileEngine.cxx | 16 | ||||
-rw-r--r-- | oox/source/crypto/CryptTools.cxx | 6 | ||||
-rw-r--r-- | oox/source/crypto/Standard2007Engine.cxx | 11 | ||||
-rw-r--r-- | oox/source/export/chartexport.cxx | 4 | ||||
-rw-r--r-- | oox/source/export/vmlexport.cxx | 4 | ||||
-rw-r--r-- | oox/source/ole/axbinarywriter.cxx | 3 | ||||
-rw-r--r-- | oox/source/ole/axcontrol.cxx | 7 | ||||
-rw-r--r-- | oox/source/ole/vbacontrol.cxx | 3 | ||||
-rw-r--r-- | oox/source/ppt/presentationfragmenthandler.cxx | 4 |
10 files changed, 24 insertions, 41 deletions
diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx index 3855bf5442c5..360e92c9b314 100644 --- a/oox/source/core/binarycodec.cxx +++ b/oox/source/core/binarycodec.cxx @@ -210,7 +210,7 @@ void BinaryCodec_XOR::startBlock() mnOffset = 0; } -bool BinaryCodec_XOR::decode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, sal_Int32 nBytes ) +void BinaryCodec_XOR::decode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, sal_Int32 nBytes ) { const sal_uInt8* pnCurrKey = mpnKey + mnOffset; const sal_uInt8* pnKeyLast = mpnKey + 0x0F; @@ -245,7 +245,7 @@ bool BinaryCodec_XOR::decode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, } // update offset and leave - return skip( nBytes ); + skip( nBytes ); } bool BinaryCodec_XOR::skip( sal_Int32 nBytes ) @@ -391,7 +391,7 @@ bool BinaryCodec_RCF::decode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, return eResult == rtl_Cipher_E_None; } -bool BinaryCodec_RCF::skip( sal_Int32 nBytes ) +void BinaryCodec_RCF::skip( sal_Int32 nBytes ) { // decode dummy data in memory to update internal state of RC4 cipher sal_uInt8 pnDummy[ 1024 ]; @@ -403,7 +403,6 @@ bool BinaryCodec_RCF::skip( sal_Int32 nBytes ) bResult = decode( pnDummy, pnDummy, nBlockLen ); nBytesLeft -= nBlockLen; } - return bResult; } } // namespace core diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx index d207cf533a7f..13780868cd55 100644 --- a/oox/source/crypto/AgileEngine.cxx +++ b/oox/source/crypto/AgileEngine.cxx @@ -50,7 +50,7 @@ Crypto::CryptoType AgileEngine::cryptoType(const AgileEncryptionInfo& rInfo) return Crypto::UNKNOWN; } -bool AgileEngine::calculateBlock( +void AgileEngine::calculateBlock( const sal_uInt8* rBlock, sal_uInt32 aBlockSize, vector<sal_uInt8>& rHashFinal, @@ -75,11 +75,9 @@ bool AgileEngine::calculateBlock( Decrypt aDecryptor(key, salt, cryptoType(mInfo)); aDecryptor.update(rOutput, rInput); - - return true; } -bool AgileEngine::calculateHashFinal(const OUString& rPassword, vector<sal_uInt8>& aHashFinal) +void AgileEngine::calculateHashFinal(const OUString& rPassword, vector<sal_uInt8>& aHashFinal) { sal_Int32 saltSize = mInfo.saltSize; vector<sal_uInt8> salt = mInfo.saltValue; @@ -109,8 +107,6 @@ bool AgileEngine::calculateHashFinal(const OUString& rPassword, vector<sal_uInt8 } std::copy(hash.begin(), hash.end(), aHashFinal.begin()); - - return true; } bool AgileEngine::generateEncryptionKey(const OUString& rPassword) @@ -192,18 +188,18 @@ bool AgileEngine::decrypt( return true; } -bool AgileEngine::writeEncryptionInfo( +void AgileEngine::writeEncryptionInfo( const OUString& /*aPassword*/, BinaryXOutputStream& /*rStream*/) { - return false; // Agile encrypting is not supported for now + // Agile encrypting is not supported for now } -bool AgileEngine::encrypt( +void AgileEngine::encrypt( BinaryXInputStream& /*aInputStream*/, BinaryXOutputStream& /*aOutputStream*/) { - return false; // Agile encrypting is not supported for now + // Agile encrypting is not supported for now } } // namespace core diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx index f21b0e1b7713..120487789d89 100644 --- a/oox/source/crypto/CryptTools.cxx +++ b/oox/source/crypto/CryptTools.cxx @@ -284,7 +284,7 @@ sal_uInt32 Digest::getLength() return 0; } -bool Digest::update(std::vector<sal_uInt8>& input) +void Digest::update(std::vector<sal_uInt8>& input) { #if USE_TLS_OPENSSL EVP_DigestUpdate(mpContext, &input[0], input.size()); @@ -292,10 +292,9 @@ bool Digest::update(std::vector<sal_uInt8>& input) #if USE_TLS_NSS HASH_Update(mpContext, &input[0], input.size()); #endif - return true; } -bool Digest::finalize(std::vector<sal_uInt8>& digest) +void Digest::finalize(std::vector<sal_uInt8>& digest) { digest.clear(); @@ -311,7 +310,6 @@ bool Digest::finalize(std::vector<sal_uInt8>& digest) digest.resize(digestLength, 0); HASH_End(mpContext, &digest[0], &digestWrittenLength, digestLength); #endif - return true; } bool Digest::sha1(vector<sal_uInt8>& output, vector<sal_uInt8>& input) diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx index 299d25117722..0280a174b1a1 100644 --- a/oox/source/crypto/Standard2007Engine.cxx +++ b/oox/source/crypto/Standard2007Engine.cxx @@ -198,7 +198,7 @@ bool Standard2007Engine::decrypt( return true; } -bool Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOutputStream& rStream) +void Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOutputStream& rStream) { mInfo.header.flags = ENCRYPTINFO_AES | ENCRYPTINFO_CRYPTOAPI; mInfo.header.algId = ENCRYPT_ALGO_AES128; @@ -213,10 +213,10 @@ bool Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOu mKey.resize(keyLength, 0); if (!calculateEncryptionKey(password)) - return false; + return; if (!generateVerifier()) - return false; + return; rStream.WriteUInt32(VERSION_INFO_2007_FORMAT); @@ -234,11 +234,9 @@ bool Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOu sal_uInt32 encryptionVerifierSize = static_cast<sal_uInt32>(sizeof(EncryptionVerifierAES)); rStream.writeMemory(&mInfo.verifier, encryptionVerifierSize); - - return true; } -bool Standard2007Engine::encrypt( +void Standard2007Engine::encrypt( BinaryXInputStream& aInputStream, BinaryXOutputStream& aOutputStream) { @@ -257,7 +255,6 @@ bool Standard2007Engine::encrypt( outputLength = aEncryptor.update(outputBuffer, inputBuffer, inputLength); aOutputStream.writeMemory( &outputBuffer[0], outputLength ); } - return true; } } // namespace core diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 2dbc864e86d9..d88e940b5a15 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -517,7 +517,7 @@ OUString ChartExport::parseFormula( const OUString& rRange ) return aResult; } -ChartExport& ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nChartCount ) +void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nChartCount ) { FSHelperPtr pFS = GetFS(); @@ -614,8 +614,6 @@ ChartExport& ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_ SetFS( pChart ); ExportContent(); - - return *this; } void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc ) diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 9e94102beafa..d62675bd82a8 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -1205,7 +1205,7 @@ void VMLExport::EndShape( sal_Int32 nShapeElement ) } } -sal_uInt32 VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_Int16 eVOri, sal_Int16 eHRel, sal_Int16 eVRel, const Point* pNdTopLeft, const bool bOOxmlExport ) +void VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_Int16 eVOri, sal_Int16 eHRel, sal_Int16 eVRel, const Point* pNdTopLeft, const bool bOOxmlExport ) { m_pSdrObject = &rObj; m_eHOri = eHOri; @@ -1213,7 +1213,7 @@ sal_uInt32 VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_ m_eHRel = eHRel; m_eVRel = eVRel; m_pNdTopLeft = pNdTopLeft; - return EscherEx::AddSdrObject(rObj, bOOxmlExport); + EscherEx::AddSdrObject(rObj, bOOxmlExport); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx index 05ab3634e44e..26247e509c2c 100644 --- a/oox/source/ole/axbinarywriter.cxx +++ b/oox/source/ole/axbinarywriter.cxx @@ -154,7 +154,7 @@ void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue, bool bCompr startNextProperty(); } -bool AxBinaryPropertyWriter::finalizeExport() +void AxBinaryPropertyWriter::finalizeExport() { // write large properties maOutStrm.align( 4 ); @@ -185,7 +185,6 @@ bool AxBinaryPropertyWriter::finalizeExport() maOutStrm.WriteUInt32( mnPropFlags ); maOutStrm.seek( nPos ); - return true; } bool AxBinaryPropertyWriter::ensureValid( bool bCondition ) diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index 18a700e2b163..7ba5d357a6a8 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -2456,7 +2456,7 @@ ApiControlType AxMultiPageModel::getControlType() const return API_CONTROL_MULTIPAGE; } -bool AxMultiPageModel::importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages ) +void AxMultiPageModel::importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages ) { // PageProperties for ( sal_Int32 nPage = 0; nPage < nPages; ++nPage ) @@ -2478,7 +2478,6 @@ bool AxMultiPageModel::importPageAndMultiPageProperties( BinaryInputStream& rInS { mnIDs.push_back( rInStrm.readInt32() ); } - return true; } void AxMultiPageModel::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const @@ -2666,16 +2665,14 @@ bool EmbeddedControl::convertProperties( const Reference< XControlModel >& rxCtr return false; } -bool EmbeddedControl::convertFromProperties( const Reference< XControlModel >& rxCtrlModel, const ControlConverter& rConv ) +void EmbeddedControl::convertFromProperties( const Reference< XControlModel >& rxCtrlModel, const ControlConverter& rConv ) { if( mxModel.get() && rxCtrlModel.is() && !maName.isEmpty() ) { PropertySet aPropSet( rxCtrlModel ); aPropSet.getProperty( maName, PROP_Name ); mxModel->convertFromProperties( aPropSet, rConv ); - return true; } - return false; } EmbeddedForm::EmbeddedForm( const Reference< XModel >& rxDocModel, diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx index caeb02057a1b..8926acfb5cdd 100644 --- a/oox/source/ole/vbacontrol.cxx +++ b/oox/source/ole/vbacontrol.cxx @@ -523,7 +523,7 @@ bool VbaFormControl::importSiteModel( BinaryInputStream& rInStrm ) return mxSiteModel->importBinaryModel( rInStrm ); } -bool VbaFormControl::importEmbeddedSiteModels( BinaryInputStream& rInStrm ) +void VbaFormControl::importEmbeddedSiteModels( BinaryInputStream& rInStrm ) { sal_uInt64 nAnchorPos = rInStrm.tell(); sal_uInt32 nSiteCount, nSiteDataSize; @@ -568,7 +568,6 @@ bool VbaFormControl::importEmbeddedSiteModels( BinaryInputStream& rInStrm ) } rInStrm.seek( nSiteEndPos ); - return bValid; } void VbaFormControl::finalizeEmbeddedControls() diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index 7f778cd8f9b9..5ea3bd275cc4 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -459,7 +459,7 @@ void PresentationFragmentHandler::finalizeImport() return this; } -bool PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlideFragmentHandler, +void PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlideFragmentHandler, const SlidePersistPtr& rSlidePersistPtr ) { Reference< drawing::XDrawPage > xSlide( rSlidePersistPtr->getPage() ); @@ -511,7 +511,7 @@ bool PresentationFragmentHandler::importSlide( const FragmentHandlerRef& rxSlide } } rSlidePersistPtr->setPath( rxSlideFragmentHandler->getFragmentPath() ); - return getFilter().importFragment( rxSlideFragmentHandler ); + getFilter().importFragment( rxSlideFragmentHandler ); } } } |