summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-14 16:31:33 +0200
committerNoel Grandin <noel@peralex.com>2016-01-15 09:36:41 +0200
commit52e69bfbba7220fe4181098102876f0e83ffbee1 (patch)
tree25965e6854cd5b49c0ead66a508fe1a60090b43a /lotuswordpro
parent602a64939da2df486099eba967aa9148ced1d8d4 (diff)
loplugin:unusedmethods unused return value in lotuswordpro
Change-Id: Ibed85be78e05dc0e6474d688ef0e0dea401758ac
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/bencont.cxx16
-rw-r--r--lotuswordpro/source/filter/bento.hxx6
-rw-r--r--lotuswordpro/source/filter/benval.cxx11
-rw-r--r--lotuswordpro/source/filter/lwpfilehdr.cxx12
-rw-r--r--lotuswordpro/source/filter/lwpfilehdr.hxx2
-rw-r--r--lotuswordpro/source/filter/lwpfoundry.cxx3
-rw-r--r--lotuswordpro/source/filter/lwpfoundry.hxx2
-rw-r--r--lotuswordpro/source/filter/lwpfribsection.cxx7
-rw-r--r--lotuswordpro/source/filter/lwpfribsection.hxx2
-rw-r--r--lotuswordpro/source/filter/lwpobjid.cxx13
-rw-r--r--lotuswordpro/source/filter/lwpobjid.hxx4
-rw-r--r--lotuswordpro/source/filter/lwpobjstrm.cxx4
-rw-r--r--lotuswordpro/source/filter/lwpobjstrm.hxx2
-rw-r--r--lotuswordpro/source/filter/lwppara.cxx5
-rw-r--r--lotuswordpro/source/filter/lwppara.hxx2
-rw-r--r--lotuswordpro/source/filter/lwpsvstream.cxx4
-rw-r--r--lotuswordpro/source/filter/lwpsvstream.hxx2
-rw-r--r--lotuswordpro/source/filter/lwptblformula.cxx28
-rw-r--r--lotuswordpro/source/filter/lwptblformula.hxx6
19 files changed, 47 insertions, 84 deletions
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index 8255129537f2..868d54caac7d 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -108,7 +108,7 @@ LtcBenContainer::Open() // delete two inputs
return BenErr_OK;
}
-BenError
+void
LtcBenContainer::RegisterPropertyName(const char * sPropertyName,
pCBenPropertyName * ppPropertyName)
{
@@ -119,21 +119,19 @@ LtcBenContainer::RegisterPropertyName(const char * sPropertyName,
if (pNamedObject != nullptr)
{
if (! pNamedObject->IsPropertyName())
- return BenErr_NameConflict;
+ return;
else *ppPropertyName = static_cast<pCBenPropertyName>(pNamedObject);
}
else
{
pCUtListElmt pPrevObject;
if (FindID(&cObjects, cNextAvailObjectID, &pPrevObject) != nullptr)
- return BenErr_DuplicateObjectID;
+ return;
*ppPropertyName = new CBenPropertyName(this, cNextAvailObjectID,
static_cast<pCBenObject>(pPrevObject), sPropertyName, pPrevNamedObjectListElmt);
++cNextAvailObjectID;
}
-
- return BenErr_OK;
}
pCBenObject
@@ -286,14 +284,13 @@ sal_uInt32 GetSvStreamSize(SvStream * pStream)
/**
* Find hazily according to object ID
* @param pObjectname - format as "GrXX,XXXXXXXX" wherein XX is high part of object ID, and XXXXXXXX is low part
-* @return the value stream pointers with the property names
*/
-BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *pObjectName)
+void LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *pObjectName)
{
if (!pObjectName)
{
pStream = nullptr;
- return BenErr_NamedObjectError;
+ return;
}
// construct the string of property name
char sSName[64]="";
@@ -326,7 +323,7 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p
if (nLen <= 0)
{
pStream = nullptr;
- return BenErr_NamedObjectError;
+ return;
}
char * pBuf = new char[nLen];
@@ -348,7 +345,6 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p
assert(pMemStream != nullptr);
pStream = pMemStream;
- return BenErr_OK;
}
}// end namespace OpenStormBento
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx
index 75c94fe59cc0..2094a7f50697 100644
--- a/lotuswordpro/source/filter/bento.hxx
+++ b/lotuswordpro/source/filter/bento.hxx
@@ -202,7 +202,7 @@ class LtcBenContainer
{
public:
BenError Open();
- BenError RegisterPropertyName(const char * sPropertyName,
+ void RegisterPropertyName(const char * sPropertyName,
pCBenPropertyName * ppPropertyName);
// Pass NULL to begin iteration. Done when returns NULL.
// Objects are returned in order of increasing ID
@@ -226,7 +226,7 @@ public: // Internal methods
LtcUtBenValueStream * FindNextValueStreamWithPropertyName(const char * sPropertyName, LtcUtBenValueStream * pCurrentValueStream);
LtcUtBenValueStream * FindValueStreamWithPropertyName(const char * sPropertyName);
- BenError CreateGraphicStream(SvStream * &pStream, const char *pObjectName);
+ void CreateGraphicStream(SvStream * &pStream, const char *pObjectName);
BenError GetSize(sal_uLong * pLength);
private: // Data
@@ -258,7 +258,7 @@ class CBenValue : public CBenIDListElmt
{
public:
unsigned long GetValueSize();
- BenError ReadValueData(void * pBuffer,
+ void ReadValueData(void * pBuffer,
unsigned long Offset, unsigned long MaxSize, unsigned long * pAmtRead);
pCBenProperty BEN_EXPORT GetProperty() { return cpProperty; }
diff --git a/lotuswordpro/source/filter/benval.cxx b/lotuswordpro/source/filter/benval.cxx
index 8c6a08f64263..6cffe1d9c41d 100644
--- a/lotuswordpro/source/filter/benval.cxx
+++ b/lotuswordpro/source/filter/benval.cxx
@@ -68,7 +68,7 @@ CBenValue::GetValueSize()
return Size;
}
-BenError
+void
CBenValue::ReadValueData(void * pReadBuffer, unsigned long Offset,
unsigned long Amt, unsigned long * pAmtRead)
{
@@ -89,7 +89,7 @@ CBenValue::ReadValueData(void * pReadBuffer, unsigned long Offset,
while ((pCurrSeg = GetNextValueSegment(pCurrSeg)) != nullptr)
{
if (Amt == 0) /// whole buffer is full now, so return
- return BenErr_OK;
+ return;
if (SegOffset <= Offset && Offset < SegOffset + pCurrSeg->GetSize()) /// begin at current segment
{
@@ -110,17 +110,17 @@ CBenValue::ReadValueData(void * pReadBuffer, unsigned long Offset,
{
if ((Err = pContainer->SeekToPosition(pCurrSeg->GetPosition() +
OffsetIntoSeg)) != BenErr_OK)
- return Err;
+ return;
if ((Err = pContainer->Read(pBuffer, AmtThisSeg,
&AmtReadThisSeg)) != BenErr_OK)
- return Err;
+ return;
}
*pAmtRead += AmtReadThisSeg;
if (AmtThisSeg != AmtReadThisSeg)
- return BenErr_UnexpectedEndOfFile;
+ return;
pBuffer += AmtReadThisSeg;
Offset += AmtReadThisSeg;
@@ -129,7 +129,6 @@ CBenValue::ReadValueData(void * pReadBuffer, unsigned long Offset,
SegOffset += pCurrSeg->GetSize();
}
- return BenErr_OK;
}
}//end namespace OpenStormBento
diff --git a/lotuswordpro/source/filter/lwpfilehdr.cxx b/lotuswordpro/source/filter/lwpfilehdr.cxx
index 5bcbf6d981a4..edac5fa31c11 100644
--- a/lotuswordpro/source/filter/lwpfilehdr.cxx
+++ b/lotuswordpro/source/filter/lwpfilehdr.cxx
@@ -67,28 +67,20 @@ LwpFileHeader::LwpFileHeader()
/**
* @descr read file header object from svstream
*/
-sal_uInt32 LwpFileHeader::Read(LwpSvStream *pStrm)
+void LwpFileHeader::Read(LwpSvStream *pStrm)
{
- sal_uInt32 len = 0;
pStrm->ReadUInt16( m_nAppRevision );
- len += sizeof(m_nAppRevision);
pStrm->ReadUInt16( m_nFileRevision );
- len += sizeof(m_nFileRevision);
pStrm->ReadUInt16( m_nAppReleaseNo );
- len += sizeof(m_nAppReleaseNo);
pStrm->ReadUInt16( m_nRequiredAppRevision );
- len += sizeof(m_nRequiredAppRevision);
pStrm->ReadUInt16( m_nRequiredFileRevision );
- len += sizeof(m_nRequiredFileRevision);
- len += m_cDocumentID.Read(pStrm);
+ m_cDocumentID.Read(pStrm);
if (m_nFileRevision < 0x000B)
m_nRootIndexOffset = BAD_OFFSET;
else
{
pStrm->ReadUInt32( m_nRootIndexOffset );
- len += sizeof(m_nRootIndexOffset);
}
- return len;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpfilehdr.hxx b/lotuswordpro/source/filter/lwpfilehdr.hxx
index 73a2ebabcb2d..22c194f50fa5 100644
--- a/lotuswordpro/source/filter/lwpfilehdr.hxx
+++ b/lotuswordpro/source/filter/lwpfilehdr.hxx
@@ -74,7 +74,7 @@ private: //data member
sal_uInt32 m_nRootIndexOffset;
public:
static sal_uInt16 m_nFileRevision;
- sal_uInt32 Read(LwpSvStream *pStrm);
+ void Read(LwpSvStream *pStrm);
sal_uInt32 GetRootIndexOffset();
LwpObjectID& GetDocID();
};
diff --git a/lotuswordpro/source/filter/lwpfoundry.cxx b/lotuswordpro/source/filter/lwpfoundry.cxx
index f59395eb860e..d7dde9fd06bf 100644
--- a/lotuswordpro/source/filter/lwpfoundry.cxx
+++ b/lotuswordpro/source/filter/lwpfoundry.cxx
@@ -515,14 +515,13 @@ VO_PARASTYLE/VO_CHARACTERSTYLE call this method to add its created style to XFSt
Prerequisite: pStyle has been created and all properties has been set to it.
Return the XFStyle* added by XFStyleManager
*/
-IXFStyle* LwpStyleManager::AddStyle(LwpObjectID styleObjID, IXFStyle* pStyle)
+void LwpStyleManager::AddStyle(LwpObjectID styleObjID, IXFStyle* pStyle)
{
assert(pStyle);
//pStyle may change if same style is found in XFStyleManager
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
pStyle = pXFStyleManager->AddStyle(pStyle).m_pStyle;
m_StyleList.insert(LwpStyleMap::value_type(styleObjID, pStyle));
- return pStyle;
}
/*
diff --git a/lotuswordpro/source/filter/lwpfoundry.hxx b/lotuswordpro/source/filter/lwpfoundry.hxx
index 8f28c6db3a76..68235f5f0cae 100644
--- a/lotuswordpro/source/filter/lwpfoundry.hxx
+++ b/lotuswordpro/source/filter/lwpfoundry.hxx
@@ -308,7 +308,7 @@ private:
LwpStyleMap m_StyleList;
public:
void SetFoundry(LwpFoundry* pFoundry){m_pFoundry = pFoundry;}
- IXFStyle* AddStyle(LwpObjectID styleObjID, IXFStyle* pStyle);
+ void AddStyle(LwpObjectID styleObjID, IXFStyle* pStyle);
IXFStyle* GetStyle(const LwpObjectID &styleObjID);
};
#endif
diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx b/lotuswordpro/source/filter/lwpfribsection.cxx
index a6ad875a39ef..cd6884b59c73 100644
--- a/lotuswordpro/source/filter/lwpfribsection.cxx
+++ b/lotuswordpro/source/filter/lwpfribsection.cxx
@@ -242,7 +242,7 @@ LwpMasterPage::LwpMasterPage(LwpPara* pPara, LwpPageLayout* pLayout)
* @descr: Register master page style for para style and register section style if necessary
*
*/
-bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
+void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
{
//if there is no other frib after current frib, register master page in starting para of next page
LwpStory* pStory = nullptr;
@@ -253,7 +253,7 @@ bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
{
pStory->SetCurrentLayout(m_pLayout);
RegisterFillerPageStyle();
- return false;
+ return;
}
m_bNewSection = false;
@@ -301,7 +301,7 @@ bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
//register tab style;
pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
if (!pStory)
- return false;
+ return;
pStory->SetTabLayout(m_pLayout);
m_pPara->RegisterTabStyle(pOverStyle);
@@ -334,7 +334,6 @@ bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
//}
m_SectionStyleName = pXFStyleManager->AddStyle(pSectStyle).m_pStyle->GetStyleName();
}
- return false;
}
/**
diff --git a/lotuswordpro/source/filter/lwpfribsection.hxx b/lotuswordpro/source/filter/lwpfribsection.hxx
index 5acae3c8823b..9864bc2c8cfb 100644
--- a/lotuswordpro/source/filter/lwpfribsection.hxx
+++ b/lotuswordpro/source/filter/lwpfribsection.hxx
@@ -76,7 +76,7 @@ public:
public:
//for page layout register and parse
- bool RegisterMasterPage(LwpFrib* pFrib);
+ void RegisterMasterPage(LwpFrib* pFrib);
void RegisterFillerPageStyle();
void ParseSection(LwpFrib* pFrib);
XFSection* CreateXFSection();
diff --git a/lotuswordpro/source/filter/lwpobjid.cxx b/lotuswordpro/source/filter/lwpobjid.cxx
index dd4dbe9265b7..c6d609ddf656 100644
--- a/lotuswordpro/source/filter/lwpobjid.cxx
+++ b/lotuswordpro/source/filter/lwpobjid.cxx
@@ -91,13 +91,14 @@ sal_uInt32 LwpObjectID::Read(LwpObjectStream *pObj)
* if index>0, lowid is get from time table per the index
* else index+lowid+highid
*/
-sal_uInt32 LwpObjectID::ReadIndexed(LwpSvStream *pStrm)
+void LwpObjectID::ReadIndexed(LwpSvStream *pStrm)
{
//note the m_nLow store the index instead of time from the timetable as in LWP
m_bIsCompressed = false;
if( LwpFileHeader::m_nFileRevision < 0x000B)
{
- return Read(pStrm);
+ Read(pStrm);
+ return;
}
pStrm->ReadUInt8( m_nIndex );
@@ -116,7 +117,7 @@ sal_uInt32 LwpObjectID::ReadIndexed(LwpSvStream *pStrm)
pStrm->ReadUInt32( m_nLow );
}
pStrm->ReadUInt16( m_nHigh );
- return DiskSizeIndexed();
+ DiskSizeIndexed();
}
/**
@@ -153,21 +154,19 @@ sal_uInt32 LwpObjectID::ReadIndexed(LwpObjectStream *pStrm)
* else lowid equals to the lowid of previous low id
* and high id = the high id of previous id + diff +1
*/
-sal_uInt32 LwpObjectID::ReadCompressed( LwpObjectStream* pObj, LwpObjectID &prev )
+void LwpObjectID::ReadCompressed( LwpObjectStream* pObj, LwpObjectID &prev )
{
sal_uInt8 diff = pObj->QuickReaduInt8();
- sal_uInt32 len=1;
if (diff == 255)
{
- len += Read(pObj);
+ Read(pObj);
}
else
{
m_nLow = prev.GetLow();
m_nHigh = prev.GetHigh() + diff +1;
}
- return len;
}
/**
* @descr return the size of indexed object id
diff --git a/lotuswordpro/source/filter/lwpobjid.hxx b/lotuswordpro/source/filter/lwpobjid.hxx
index 42aadf64a918..c57ada2416a6 100644
--- a/lotuswordpro/source/filter/lwpobjid.hxx
+++ b/lotuswordpro/source/filter/lwpobjid.hxx
@@ -86,9 +86,9 @@ private:
public:
sal_uInt32 Read( LwpSvStream *pStrm );
sal_uInt32 Read( LwpObjectStream *pStrm );
- sal_uInt32 ReadIndexed( LwpSvStream* pStrm );
+ void ReadIndexed( LwpSvStream* pStrm );
sal_uInt32 ReadIndexed( LwpObjectStream *pStrm );
- sal_uInt32 ReadCompressed( LwpObjectStream* pObj, LwpObjectID& prev );
+ void ReadCompressed( LwpObjectStream* pObj, LwpObjectID& prev );
/**
* @descr return the size of object id with format: low(4bytes)+high(2bytes)
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx
index 9a4e19df31f6..6c9c09a9c15f 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.cxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.cxx
@@ -191,14 +191,12 @@ void LwpObjectStream::SeekRel(sal_uInt16 pos)
/**
* @descr Seek to pos in object buffer/buffer
*/
-bool LwpObjectStream::Seek( sal_uInt16 pos)
+void LwpObjectStream::Seek( sal_uInt16 pos)
{
if (pos < m_nBufSize)
{
m_nReadPos = pos;
- return true;
}
- return false;
}
/**
diff --git a/lotuswordpro/source/filter/lwpobjstrm.hxx b/lotuswordpro/source/filter/lwpobjstrm.hxx
index 8146cbbe4840..d842485cd03f 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.hxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.hxx
@@ -88,7 +88,7 @@ public:
sal_uInt16 QuickRead(void* buf, sal_uInt16 len);
sal_uInt16 GetPos() { return m_nReadPos; }
void SeekRel(sal_uInt16 pos);
- bool Seek( sal_uInt16 pos);
+ void Seek( sal_uInt16 pos);
void SkipExtra();
sal_uInt16 CheckExtra();
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 65784f1809a6..62118713514d 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -311,9 +311,8 @@ void LwpPara::XFConvert(XFContentContainer* pCont)
AddBreakAfter(m_pXFContainer);
}
-bool LwpPara::RegisterMasterPage(XFParaStyle* pBaseStyle)
+void LwpPara::RegisterMasterPage(XFParaStyle* pBaseStyle)
{
- bool bSuccess = false;
//get story
LwpStory* pStory = dynamic_cast<LwpStory*>(m_Story.obj().get());
//if pagelayout is modified, register the pagelayout
@@ -326,7 +325,6 @@ bool LwpPara::RegisterMasterPage(XFParaStyle* pBaseStyle)
RegisterNewSectionStyle(pLayout);
}
- bSuccess = true;
//register master page style
XFParaStyle* pOverStyle = new XFParaStyle();
*pOverStyle = *pBaseStyle;
@@ -337,7 +335,6 @@ bool LwpPara::RegisterMasterPage(XFParaStyle* pBaseStyle)
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
m_StyleName = pXFStyleManager->AddStyle(pOverStyle).m_pStyle->GetStyleName();
}
- return bSuccess;
}
/**
* @short register paragraph style
diff --git a/lotuswordpro/source/filter/lwppara.hxx b/lotuswordpro/source/filter/lwppara.hxx
index a6d7563a2bf2..9b9edc083e9a 100644
--- a/lotuswordpro/source/filter/lwppara.hxx
+++ b/lotuswordpro/source/filter/lwppara.hxx
@@ -275,7 +275,7 @@ private:
void OverrideParaBullet(LwpParaProperty* pProps);
void OverrideParaNumbering(LwpParaProperty* pProps);
- bool RegisterMasterPage(XFParaStyle* pBaseStyle);
+ void RegisterMasterPage(XFParaStyle* pBaseStyle);
void RegisterNewSectionStyle(LwpPageLayout* pLayout);
void ParseDropcapContent();
diff --git a/lotuswordpro/source/filter/lwpsvstream.cxx b/lotuswordpro/source/filter/lwpsvstream.cxx
index 6c3b2856c726..055b23579220 100644
--- a/lotuswordpro/source/filter/lwpsvstream.cxx
+++ b/lotuswordpro/source/filter/lwpsvstream.cxx
@@ -92,9 +92,9 @@ LwpSvStream& LwpSvStream::ReadUInt32( sal_uInt32& rUInt32 )
/**
* @descr SeekRel in stream
*/
-sal_Int64 LwpSvStream::SeekRel(sal_Int64 pos)
+void LwpSvStream::SeekRel(sal_Int64 pos)
{
- return m_pStream->SeekRel(pos);
+ m_pStream->SeekRel(pos);
}
/**
* @descr Get the current position in stream
diff --git a/lotuswordpro/source/filter/lwpsvstream.hxx b/lotuswordpro/source/filter/lwpsvstream.hxx
index 2f58f255ec96..eb9ac363719a 100644
--- a/lotuswordpro/source/filter/lwpsvstream.hxx
+++ b/lotuswordpro/source/filter/lwpsvstream.hxx
@@ -69,7 +69,7 @@ class LwpSvStream
public:
LwpSvStream(SvStream* pStream, LwpSvStream * pCompressed = nullptr);
sal_Int32 Read( void* bytes, sal_Int32 nBytesToRead );
- sal_Int64 SeekRel( sal_Int64 pos );
+ void SeekRel( sal_Int64 pos );
sal_Int64 Tell();
sal_Int64 Seek( sal_Int64 pos );
diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx
index 7a28a6ed53c7..2b3195bab1c7 100644
--- a/lotuswordpro/source/filter/lwptblformula.cxx
+++ b/lotuswordpro/source/filter/lwptblformula.cxx
@@ -93,19 +93,17 @@ LwpFormulaInfo::~LwpFormulaInfo()
}
}
-bool LwpFormulaInfo::ReadConst()
+void LwpFormulaInfo::ReadConst()
{
double Constant = m_pObjStrm->QuickReadDouble();
m_aStack.push_back( new LwpFormulaConst(Constant) );
-
- return true;
}
/**
* Need more effort for unicode.
*/
-bool LwpFormulaInfo::ReadText()
+void LwpFormulaInfo::ReadText()
{
m_pObjStrm->QuickReadInt16(); //Disk Size
sal_uInt16 nStrLen = m_pObjStrm->QuickReadInt16();
@@ -119,7 +117,6 @@ bool LwpFormulaInfo::ReadText()
aText += "\"";
m_aStack.push_back(new LwpFormulaText(aText));
- return true;
}
bool LwpFormulaInfo::ReadCellID()
@@ -162,10 +159,9 @@ bool LwpFormulaInfo::ReadCellRange()
/**
* Read expression from wordpro file
*/
-bool LwpFormulaInfo::ReadExpression()
+void LwpFormulaInfo::ReadExpression()
{
sal_uInt16 TokenType, DiskLength;
- bool readSucceeded = true;
/* Read the compiled expression length */
m_pObjStrm->SeekRel(2);
@@ -189,12 +185,11 @@ bool LwpFormulaInfo::ReadExpression()
}
case TK_CELLID:
- if (!ReadCellID())
- readSucceeded = false;
+ ReadCellID();
break;
case TK_CELLRANGE:
- readSucceeded = ReadCellRange();
+ ReadCellRange();
break;
case TK_SUM:
@@ -205,8 +200,7 @@ bool LwpFormulaInfo::ReadExpression()
case TK_AVERAGE:
{
LwpFormulaFunc* pFunc = new LwpFormulaFunc(TokenType);
- if (!ReadArguments(*pFunc))
- readSucceeded = false;
+ ReadArguments(*pFunc);
m_aStack.push_back(pFunc);
}
break;
@@ -233,10 +227,6 @@ bool LwpFormulaInfo::ReadExpression()
pOp->AddArg(m_aStack.back()); m_aStack.pop_back();
m_aStack.push_back(pOp);
}
- else
- {
- readSucceeded = false;
- }
break;
case TK_UNARY_MINUS:
if (!m_aStack.empty())
@@ -245,20 +235,14 @@ bool LwpFormulaInfo::ReadExpression()
pOp->AddArg(m_aStack.back()); m_aStack.pop_back();
m_aStack.push_back(pOp);
}
- else
- {
- readSucceeded = false;
- }
break;
default:
// We don't know what to do with this token, so eat it.
m_pObjStrm->SeekRel(DiskLength);
- readSucceeded = false;
break;
}
MarkUnsupported(TokenType);
}
- return readSucceeded;
}
void LwpFormulaInfo::MarkUnsupported(sal_uInt16 TokenType)
diff --git a/lotuswordpro/source/filter/lwptblformula.hxx b/lotuswordpro/source/filter/lwptblformula.hxx
index 22d2f6627b14..09345757b0a1 100644
--- a/lotuswordpro/source/filter/lwptblformula.hxx
+++ b/lotuswordpro/source/filter/lwptblformula.hxx
@@ -200,16 +200,16 @@ public:
protected:
void Read() override;
bool ReadCellID();
- bool ReadText();
+ void ReadText();
bool ReadCellRange();
- bool ReadExpression();
+ void ReadExpression();
bool ReadArguments(LwpFormulaFunc& aFunc);
bool m_bSupported;
private:
virtual ~LwpFormulaInfo();
std::vector<LwpFormulaArg*> m_aStack;
- bool ReadConst();
+ void ReadConst();
void MarkUnsupported(sal_uInt16 TokenType);
sal_uInt16 m_nFormulaRow;