summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-13 14:55:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-13 21:14:21 +0200
commit5e1719ff1ed5b4350684c3ed67b5375bb49e0223 (patch)
tree575fabb7266dcb1d94dfd260b765570e6c934529 /lotuswordpro
parentda95fc2983e9deea30b9b7148a6e10b5423ed3e1 (diff)
loplugin:sequentialassign in linguistic..lotuswordpro
Change-Id: Ic561f56e1cfe06de219bd7a257186107b5c152fb Reviewed-on: https://gerrit.libreoffice.org/70706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/bencont.cxx4
-rw-r--r--lotuswordpro/source/filter/explode.cxx6
-rw-r--r--lotuswordpro/source/filter/lwpglobalmgr.cxx6
-rw-r--r--lotuswordpro/source/filter/lwppagelayout.cxx5
-rw-r--r--lotuswordpro/source/filter/lwpparastyle.cxx3
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.cxx3
-rw-r--r--lotuswordpro/source/filter/lwptblformula.cxx3
-rw-r--r--lotuswordpro/source/filter/xfilter/xffont.cxx5
-rw-r--r--lotuswordpro/source/filter/xfilter/xfstylemanager.cxx4
9 files changed, 12 insertions, 27 deletions
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index ceed08c55020..bef463deb767 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -219,9 +219,7 @@ LtcUtBenValueStream * LtcBenContainer::FindNextValueStreamWithPropertyName(const
return nullptr; // Property not exist
// Get current object
- CBenObject * pObj = nullptr;
-
- pObj =FindNextObjectWithProperty(pObj, pPropertyName->GetID()); // Get next object with same property name
+ CBenObject * pObj =FindNextObjectWithProperty(nullptr, pPropertyName->GetID()); // Get next object with same property name
if (nullptr == pObj)
return nullptr;
diff --git a/lotuswordpro/source/filter/explode.cxx b/lotuswordpro/source/filter/explode.cxx
index 731c6bc099d9..1815e406ea93 100644
--- a/lotuswordpro/source/filter/explode.cxx
+++ b/lotuswordpro/source/filter/explode.cxx
@@ -177,10 +177,8 @@ sal_uInt32 Decompression::ReadBits(sal_uInt16 iCount, sal_uInt32 & nBits)
return 1;
}
- sal_uInt32 val = 0; /* bit accumulator */
-
/* load at least need bits into val */
- val = m_nCurrent4Byte;
+ sal_uInt32 val = m_nCurrent4Byte; /* bit accumulator */
while (m_nBitsLeft < iCount)
{
if (m_nBytesLeft == 0)
@@ -188,7 +186,7 @@ sal_uInt32 Decompression::ReadBits(sal_uInt16 iCount, sal_uInt32 & nBits)
m_nBytesLeft = m_pInStream->ReadBytes(m_Buffer, CHUNK);
m_pBuffer = m_Buffer;
if (m_nBytesLeft == 0) return 1;
- }
+ }
val |= static_cast<sal_uInt32>(*m_pBuffer++) << m_nBitsLeft; /* load eight bits */
m_nBytesLeft --;
m_nBitsLeft += 8;
diff --git a/lotuswordpro/source/filter/lwpglobalmgr.cxx b/lotuswordpro/source/filter/lwpglobalmgr.cxx
index 7ccbb71f74db..05fa59033f0d 100644
--- a/lotuswordpro/source/filter/lwpglobalmgr.cxx
+++ b/lotuswordpro/source/filter/lwpglobalmgr.cxx
@@ -79,8 +79,7 @@ LwpGlobalMgr::~LwpGlobalMgr()
LwpGlobalMgr* LwpGlobalMgr::GetInstance(LwpSvStream* pSvStream)
{
sal_uInt32 nThreadID = osl::Thread::getCurrentIdentifier();
- std::map< sal_uInt32,LwpGlobalMgr* >::iterator iter;
- iter = m_ThreadMap.find(nThreadID);
+ auto iter = m_ThreadMap.find(nThreadID);
if (iter == m_ThreadMap.end())
{
LwpGlobalMgr* pInstance = new LwpGlobalMgr(pSvStream);
@@ -94,8 +93,7 @@ LwpGlobalMgr* LwpGlobalMgr::GetInstance(LwpSvStream* pSvStream)
void LwpGlobalMgr::DeleteInstance()
{
sal_uInt32 nThreadID = osl::Thread::getCurrentIdentifier();
- std::map< sal_uInt32,LwpGlobalMgr* >::iterator iter;
- iter = m_ThreadMap.find(nThreadID);
+ auto iter = m_ThreadMap.find(nThreadID);
if (iter != m_ThreadMap.end())
{
delete iter->second;
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx
index 16173371c0d8..ac829d5df905 100644
--- a/lotuswordpro/source/filter/lwppagelayout.cxx
+++ b/lotuswordpro/source/filter/lwppagelayout.cxx
@@ -440,11 +440,8 @@ bool LwpPageLayout::HasFillerPageText(LwpFoundry const * pFoundry)
LwpLayout::UseWhenType eWhenType = GetUseWhenType();
if(eWhenType==LwpLayout::StartOnOddPage||eWhenType==LwpLayout::StartOnEvenPage)
{
- //get pagenumber
- sal_Int32 nPageNumber = 0;
-
//get the page number that current page layout inserted
- nPageNumber = GetPageNumber(FIRST_LAYOUTPAGENO)-1;
+ sal_Int32 nPageNumber = GetPageNumber(FIRST_LAYOUTPAGENO)-1;
if(nPageNumber>0)
{
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx
index 89a0811d35a9..4afe02ae2d29 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -146,9 +146,8 @@ void LwpParaStyle::Apply(XFParaStyle *pParaStyle)
{
assert(pParaStyle);
- LwpVirtualPiece *pPiece = nullptr;
//alignment:
- pPiece = dynamic_cast<LwpVirtualPiece*>(m_AlignmentStyle.obj().get());
+ LwpVirtualPiece *pPiece = dynamic_cast<LwpVirtualPiece*>(m_AlignmentStyle.obj().get());
if( pPiece )
{
LwpAlignmentOverride *pAlign = dynamic_cast<LwpAlignmentOverride*>(pPiece->GetOverride());
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index e7438cb27b0d..f14990156d01 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -1400,8 +1400,7 @@ XFCell* LwpTableLayout::GetCellsMap(sal_uInt16 nRow,sal_uInt8 nCol)
std::pair<sal_uInt16,sal_uInt8> pos;
pos.first = nRow;
pos.second = nCol;
- std::map<std::pair<sal_uInt16,sal_uInt8>,XFCell*>::iterator iter;
- iter = m_CellsMap.find(pos);
+ auto iter = m_CellsMap.find(pos);
if (iter == m_CellsMap.end())
return nullptr;
return iter->second;
diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx
index 26081262ad5b..e34544579802 100644
--- a/lotuswordpro/source/filter/lwptblformula.cxx
+++ b/lotuswordpro/source/filter/lwptblformula.cxx
@@ -340,8 +340,7 @@ OUString LwpFormulaInfo::Convert(LwpTableLayout* pCellsMap)
*/
void LwpFormulaInfo::Convert(XFCell * pCell,LwpTableLayout* pCellsMap)
{
- OUString aFormula;
- aFormula = Convert(pCellsMap);
+ OUString aFormula = Convert(pCellsMap);
if (!aFormula.isEmpty())
{
pCell->SetFormula(aFormula);
diff --git a/lotuswordpro/source/filter/xfilter/xffont.cxx b/lotuswordpro/source/filter/xfilter/xffont.cxx
index e7d4f9def7e1..96259c5dafa8 100644
--- a/lotuswordpro/source/filter/xfilter/xffont.cxx
+++ b/lotuswordpro/source/filter/xfilter/xffont.cxx
@@ -293,9 +293,8 @@ void XFFont::ToXml(IXFStream *pStrm)
((m_nFlag & XFFONT_FLAG_POSITION) && m_nPosition != 0)
)
{
- OUString tmp;
- tmp = OUString::number(m_nPosition) + "% ";
- tmp += OUString::number(m_nScale) + "%";
+ OUString tmp = OUString::number(m_nPosition) + "% "
+ + OUString::number(m_nScale) + "%";
pAttrList->AddAttribute("style:text-position", tmp );
}
diff --git a/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx b/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx
index 5c42058f29eb..6cf81dbd5e30 100644
--- a/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx
@@ -110,9 +110,7 @@ IXFStyleRet XFStyleManager::AddStyle(std::unique_ptr<IXFStyle> pStyle)
IXFStyleRet aRet;
assert(pStyle);
- OUString name;
-
- name = pStyle->GetStyleName();
+ OUString name = pStyle->GetStyleName();
if( pStyle->GetStyleFamily() == enumXFStyleText )
{