From a7f6efc68ba97db98ebab9ebc473bffb8ded757f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 18 Jan 2016 10:39:48 +0200 Subject: loplugin: unused return values Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af Reviewed-on: https://gerrit.libreoffice.org/21571 Tested-by: Jenkins Reviewed-by: Noel Grandin --- lotuswordpro/source/filter/lwpobjid.cxx | 3 +-- lotuswordpro/source/filter/lwpobjid.hxx | 2 +- lotuswordpro/source/filter/lwptblformula.cxx | 16 ++++------------ lotuswordpro/source/filter/lwptblformula.hxx | 4 ++-- 4 files changed, 8 insertions(+), 17 deletions(-) (limited to 'lotuswordpro') diff --git a/lotuswordpro/source/filter/lwpobjid.cxx b/lotuswordpro/source/filter/lwpobjid.cxx index c6d609ddf656..22f4c2f1dd27 100644 --- a/lotuswordpro/source/filter/lwpobjid.cxx +++ b/lotuswordpro/source/filter/lwpobjid.cxx @@ -71,11 +71,10 @@ LwpObjectID::LwpObjectID(sal_uInt32 low, sal_uInt16 high) * @descr Read object id with format: low(4bytes)+high(2bytes) from stream * for LWP7 record */ -sal_uInt32 LwpObjectID::Read(LwpSvStream *pStrm) +void LwpObjectID::Read(LwpSvStream *pStrm) { pStrm->ReadUInt32( m_nLow ); pStrm->ReadUInt16( m_nHigh ); - return DiskSize(); } /** * @descr Read object id with format: low(4bytes)+high(2bytes) from object stream diff --git a/lotuswordpro/source/filter/lwpobjid.hxx b/lotuswordpro/source/filter/lwpobjid.hxx index c57ada2416a6..b461682c4fba 100644 --- a/lotuswordpro/source/filter/lwpobjid.hxx +++ b/lotuswordpro/source/filter/lwpobjid.hxx @@ -84,7 +84,7 @@ private: sal_uInt8 m_nIndex; bool m_bIsCompressed; public: - sal_uInt32 Read( LwpSvStream *pStrm ); + void Read( LwpSvStream *pStrm ); sal_uInt32 Read( LwpObjectStream *pStrm ); void ReadIndexed( LwpSvStream* pStrm ); sal_uInt32 ReadIndexed( LwpObjectStream *pStrm ); diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx index 2b3195bab1c7..e8ba28d7ece2 100644 --- a/lotuswordpro/source/filter/lwptblformula.cxx +++ b/lotuswordpro/source/filter/lwptblformula.cxx @@ -133,16 +133,13 @@ bool LwpFormulaInfo::ReadCellID() return readSucceeded; } -bool LwpFormulaInfo::ReadCellRange() +void LwpFormulaInfo::ReadCellRange() { - bool readSucceeded = true; - if (!ReadCellID( )) // start - readSucceeded = false; + ReadCellID( ); // start LwpFormulaCellAddr* pStartCellAddr = static_cast(m_aStack.back()); m_aStack.pop_back(); - if (!ReadCellID()) // end - readSucceeded = false; + ReadCellID(); // end LwpFormulaCellAddr* pEndCellAddr = static_cast(m_aStack.back()); m_aStack.pop_back(); @@ -152,8 +149,6 @@ bool LwpFormulaInfo::ReadCellRange() pEndCellAddr->GetRow()) ); delete pStartCellAddr; delete pEndCellAddr; - - return readSucceeded; } /** @@ -264,12 +259,11 @@ void LwpFormulaInfo::MarkUnsupported(sal_uInt16 TokenType) * Read arguments of functions from wordpro file * @param LwpFormulaFunc& aFunc, functions object */ -bool LwpFormulaInfo::ReadArguments(LwpFormulaFunc& aFunc) +void LwpFormulaInfo::ReadArguments(LwpFormulaFunc& aFunc) { sal_uInt16 NumberOfArguments = m_pObjStrm->QuickReaduInt16(); sal_uInt16 ArgumentDiskLength, Count; sal_uInt8 ArgumentType; - bool readSucceeded = true; for (Count = 0; Count < NumberOfArguments; Count++) { @@ -302,7 +296,6 @@ bool LwpFormulaInfo::ReadArguments(LwpFormulaFunc& aFunc) default: bArgument = false; m_pObjStrm->SeekRel(ArgumentDiskLength); - readSucceeded = false; break; } @@ -312,7 +305,6 @@ bool LwpFormulaInfo::ReadArguments(LwpFormulaFunc& aFunc) m_aStack.pop_back(); } } - return readSucceeded; } void LwpFormulaInfo::Read() diff --git a/lotuswordpro/source/filter/lwptblformula.hxx b/lotuswordpro/source/filter/lwptblformula.hxx index 09345757b0a1..3e5964aa058a 100644 --- a/lotuswordpro/source/filter/lwptblformula.hxx +++ b/lotuswordpro/source/filter/lwptblformula.hxx @@ -201,9 +201,9 @@ protected: void Read() override; bool ReadCellID(); void ReadText(); - bool ReadCellRange(); + void ReadCellRange(); void ReadExpression(); - bool ReadArguments(LwpFormulaFunc& aFunc); + void ReadArguments(LwpFormulaFunc& aFunc); bool m_bSupported; private: virtual ~LwpFormulaInfo(); -- cgit v1.2.3