summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8scan.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-07 09:31:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-07 09:55:05 +0100
commit977ccf4b0fffc178ad550bda47421db5bc4c82fd (patch)
tree97a4114435930be2f08b9df9a14091e02f1a07cf /sw/source/filter/ww8/ww8scan.cxx
parent57d4cd80dcaf01fe4897d79d89e906d355410243 (diff)
loplugin:collapseif in sw
Change-Id: I61e32f6ecaf72d51528af4b067d651a17691d4b1 Reviewed-on: https://gerrit.libreoffice.org/62986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8/ww8scan.cxx')
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx25
1 files changed, 8 insertions, 17 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index ca4903521f03..5354cbbb1c56 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -3184,11 +3184,8 @@ bool WW8PLCFx_Fc_FKP::SeekPos(WW8_FC nFcPos)
WW8_FC WW8PLCFx_Fc_FKP::Where()
{
- if( !pFkp )
- {
- if( !NewFkp() )
- return WW8_FC_MAX;
- }
+ if( !pFkp && !NewFkp() )
+ return WW8_FC_MAX;
WW8_FC nP = pFkp ? pFkp->Where() : WW8_FC_MAX;
if( nP != WW8_FC_MAX )
return nP;
@@ -3216,11 +3213,8 @@ sal_uInt8* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int
void WW8PLCFx_Fc_FKP::advance()
{
- if( !pFkp )
- {
- if( !NewFkp() )
- return;
- }
+ if( !pFkp && !NewFkp() )
+ return;
if (!pFkp)
return;
@@ -5107,14 +5101,11 @@ sal_uInt16 WW8PLCFMan::WhereIdx(bool *const pbStart, WW8_CP *const pPos) const
for (sal_uInt16 i=m_nPLCF; i > 0; --i)
{
pD = &m_aD[i-1];
- if (pD != m_pPcdA)
+ if (pD != m_pPcdA && pD->nStartPos < nNext )
{
- if( pD->nStartPos < nNext )
- {
- nNext = pD->nStartPos;
- nNextIdx = i-1;
- bStart = true;
- }
+ nNext = pD->nStartPos;
+ nNextIdx = i-1;
+ bStart = true;
}
}
if( pPos )