Kaydet (Commit) 5e1719ff authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:sequentialassign in linguistic..lotuswordpro

Change-Id: Ic561f56e1cfe06de219bd7a257186107b5c152fb
Reviewed-on: https://gerrit.libreoffice.org/70706
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst da95fc29
......@@ -1704,8 +1704,7 @@ bool LngSvcMgr::SaveCfgSvcs( const OUString &rServiceName )
for (sal_Int32 i = 0; i < nLen; ++i)
{
uno::Sequence< OUString > aSvcImplNames;
aSvcImplNames = pDsp->GetServiceList( pLocale[i] );
uno::Sequence< OUString > aSvcImplNames = pDsp->GetServiceList( pLocale[i] );
// build value to be written back to configuration
uno::Any aCfgAny;
......
......@@ -125,8 +125,7 @@ void SeqRemoveNegEntries( std::vector< OUString > &rSeq,
{
std::vector< OUString > aNew;
// merge sequence without duplicates and empty strings in new empty sequence
aNew = MergeProposalSeqs( aNew, rSeq );
rSeq = aNew;
rSeq = MergeProposalSeqs( aNew, rSeq );
}
}
......
......@@ -122,8 +122,7 @@ Sequence< Reference< XMeaning > > SAL_CALL
if (pEntry)
{
OUString aChkWord( rTerm );
aChkWord = aChkWord.replace( SVT_HARD_SPACE, ' ' );
OUString aChkWord = rTerm.replace( SVT_HARD_SPACE, ' ' );
RemoveHyphens( aChkWord );
if (IsIgnoreControlChars( rProperties, GetPropSet() ))
RemoveControlChars( aChkWord );
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
{
......
......@@ -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());
......
......@@ -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;
......
......@@ -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);
......
......@@ -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 );
}
......
......@@ -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 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment