loplugin:unusedmethods unused return value in include/oox
Change-Id: I22acb6b94774c5944d8276827c53a419f0803f83
diff --git a/include/oox/core/binarycodec.hxx b/include/oox/core/binarycodec.hxx
index 1095e45..e9cf431 100644
--- a/include/oox/core/binarycodec.hxx
+++ b/include/oox/core/binarycodec.hxx
@@ -131,11 +131,8 @@ public:
@param nBytes
Size of the passed data blocks. pnDestData and pnSrcData must be of
this size.
@return
True = decoding was successful (no error occurred).
*/
bool decode(
void decode(
sal_uInt8* pnDestData,
const sal_uInt8* pnSrcData,
sal_Int32 nBytes );
@@ -284,11 +281,8 @@ public:
@param nBytes
Number of bytes to be skipped (cipher "seeks" forward).
@return
True = skip was successful (no error occurred).
*/
bool skip( sal_Int32 nBytes );
void skip( sal_Int32 nBytes );
private:
rtlCipher mhCipher;
diff --git a/include/oox/crypto/AgileEngine.hxx b/include/oox/crypto/AgileEngine.hxx
index dc9c36d..cf47947 100644
--- a/include/oox/crypto/AgileEngine.hxx
+++ b/include/oox/crypto/AgileEngine.hxx
@@ -42,9 +42,9 @@ class AgileEngine : public CryptoEngine
{
AgileEncryptionInfo mInfo;
bool calculateHashFinal(const OUString& rPassword, std::vector<sal_uInt8>& aHashFinal);
void calculateHashFinal(const OUString& rPassword, std::vector<sal_uInt8>& aHashFinal);
bool calculateBlock(
void calculateBlock(
const sal_uInt8* rBlock,
sal_uInt32 aBlockSize,
std::vector<sal_uInt8>& rHashFinal,
@@ -59,7 +59,7 @@ public:
AgileEncryptionInfo& getInfo() { return mInfo;}
virtual bool writeEncryptionInfo(
virtual void writeEncryptionInfo(
const OUString& rPassword,
BinaryXOutputStream& rStream) override;
@@ -69,7 +69,7 @@ public:
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) override;
virtual bool encrypt(
virtual void encrypt(
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) override;
};
diff --git a/include/oox/crypto/CryptTools.hxx b/include/oox/crypto/CryptTools.hxx
index 898c47d..d93fef6 100644
--- a/include/oox/crypto/CryptTools.hxx
+++ b/include/oox/crypto/CryptTools.hxx
@@ -144,8 +144,8 @@ public:
Digest(DigestType eType);
virtual ~Digest();
bool update(std::vector<sal_uInt8>& input);
bool finalize(std::vector<sal_uInt8>& digest);
void update(std::vector<sal_uInt8>& input);
void finalize(std::vector<sal_uInt8>& digest);
sal_uInt32 getLength();
diff --git a/include/oox/crypto/CryptoEngine.hxx b/include/oox/crypto/CryptoEngine.hxx
index ea07a3e..a6ad858 100644
--- a/include/oox/crypto/CryptoEngine.hxx
+++ b/include/oox/crypto/CryptoEngine.hxx
@@ -31,7 +31,7 @@ public:
virtual ~CryptoEngine()
{}
virtual bool writeEncryptionInfo(
virtual void writeEncryptionInfo(
const OUString& rPassword,
BinaryXOutputStream& rStream) = 0;
@@ -41,7 +41,7 @@ public:
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) = 0;
virtual bool encrypt(
virtual void encrypt(
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) = 0;
};
diff --git a/include/oox/crypto/Standard2007Engine.hxx b/include/oox/crypto/Standard2007Engine.hxx
index 5e5a6fc..a4d13fb0 100644
--- a/include/oox/crypto/Standard2007Engine.hxx
+++ b/include/oox/crypto/Standard2007Engine.hxx
@@ -94,7 +94,7 @@ public:
virtual bool generateEncryptionKey(const OUString& rPassword) override;
virtual bool writeEncryptionInfo(
virtual void writeEncryptionInfo(
const OUString& rPassword,
BinaryXOutputStream& rStream) override;
@@ -102,7 +102,7 @@ public:
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) override;
virtual bool encrypt(
virtual void encrypt(
BinaryXInputStream& aInputStream,
BinaryXOutputStream& aOutputStream) override;
diff --git a/include/oox/drawingml/shapepropertymap.hxx b/include/oox/drawingml/shapepropertymap.hxx
index abe5505..3306a4c 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -134,8 +134,8 @@ private:
bool setFillBitmapNameFromUrl( sal_Int32 nPropId, const css::uno::Any& rValue );
// not implemented, to prevent implicit conversion from enum to int
css::uno::Any& operator[]( ShapePropertyId ePropId );
const css::uno::Any& operator[]( ShapePropertyId ePropId ) const;
css::uno::Any& operator[]( ShapePropertyId ePropId ) = delete;
const css::uno::Any& operator[]( ShapePropertyId ePropId ) const = delete;
private:
ModelObjectHelper& mrModelObjHelper;
diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx
index 9f2b8f5..93842e4 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -210,7 +210,7 @@ public:
sal_Int32 GetChartID( );
css::uno::Reference< css::frame::XModel > getModel(){ return mxChartModel; }
ChartExport& WriteChartObj( const css::uno::Reference< css::drawing::XShape >& xShape, sal_Int32 nChartCount );
void WriteChartObj( const css::uno::Reference< css::drawing::XShape >& xShape, sal_Int32 nChartCount );
void ExportContent();
void InitRangeSegmentationProperties(
diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx
index 2a57963..7b4cb27 100644
--- a/include/oox/export/vmlexport.hxx
+++ b/include/oox/export/vmlexport.hxx
@@ -92,7 +92,7 @@ public:
/// Export the sdr object as VML.
///
/// Call this when you need to export the object as VML.
sal_uInt32 AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1,
void AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1,
sal_Int16 eVOri = -1, sal_Int16 eHRel = -1,
sal_Int16 eVRel = -1, const Point* pNdTopLeft = nullptr, const bool bOOxmlExport = false );
virtual void AddSdrObjectVMLObject( const SdrObject& rObj) override;
diff --git a/include/oox/ole/axbinarywriter.hxx b/include/oox/ole/axbinarywriter.hxx
index a0a34ff..02fa348 100644
--- a/include/oox/ole/axbinarywriter.hxx
+++ b/include/oox/ole/axbinarywriter.hxx
@@ -97,7 +97,7 @@ public:
void skipProperty() { startNextProperty( true ); }
/** Final processing, write contents of all complex properties, writes record size */
bool finalizeExport();
void finalizeExport();
private:
bool ensureValid( bool bCondition = true );
diff --git a/include/oox/ole/axcontrol.hxx b/include/oox/ole/axcontrol.hxx
index befbf22..a9c8eee 100644
--- a/include/oox/ole/axcontrol.hxx
+++ b/include/oox/ole/axcontrol.hxx
@@ -883,7 +883,7 @@ public:
explicit AxMultiPageModel();
virtual ApiControlType getControlType() const override;
bool importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages );
void importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages );
virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
std::vector<sal_uInt32> mnIDs;
sal_uInt32 mnActiveTab;
@@ -956,7 +956,7 @@ public:
const css::uno::Reference< css::awt::XControlModel >& rxCtrlModel,
const ControlConverter& rConv ) const;
bool convertFromProperties(
void convertFromProperties(
const css::uno::Reference< css::awt::XControlModel >& rxCtrlModel,
const ControlConverter& rConv );
diff --git a/include/oox/ole/vbacontrol.hxx b/include/oox/ole/vbacontrol.hxx
index a17513c..7d4a4bb 100644
--- a/include/oox/ole/vbacontrol.hxx
+++ b/include/oox/ole/vbacontrol.hxx
@@ -149,7 +149,7 @@ private:
bool importSiteModel( BinaryInputStream& rInStrm );
/** Imports the site models of all embedded controls from the 'f' stream. */
bool importEmbeddedSiteModels( BinaryInputStream& rInStrm );
void importEmbeddedSiteModels( BinaryInputStream& rInStrm );
/* Final processing of all embedded controls after import. */
void finalizeEmbeddedControls();
diff --git a/include/oox/ppt/presentationfragmenthandler.hxx b/include/oox/ppt/presentationfragmenthandler.hxx
index f745f2e..912c181 100644
--- a/include/oox/ppt/presentationfragmenthandler.hxx
+++ b/include/oox/ppt/presentationfragmenthandler.hxx
@@ -43,7 +43,7 @@ public:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
protected:
bool importSlide( const ::oox::core::FragmentHandlerRef& rSlideFragmentHandler,
void importSlide( const ::oox::core::FragmentHandlerRef& rSlideFragmentHandler,
const oox::ppt::SlidePersistPtr& rPersist );
private:
diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx
index 3855bf5..360e92c 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 d207cf5..1378086 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 f21b0e1..1204877 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 299d251..0280a17 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 2dbc864..d88e940 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 9e94102..d62675b 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 05ab363..26247e5 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 18a700e..7ba5d357 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 caeb020..8926acf 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 7f778cd..5ea3bd2 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 );
}
} }