diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-16 14:06:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-16 15:05:58 +0100 |
commit | c8907b19dc04a57b74cfc14dc641ac41177e2142 (patch) | |
tree | abd7d18e2faa6f995144d40a72e06a04eae034ac /sw/source/core/edit/autofmt.cxx | |
parent | 11300c48d4350c2f6748a1ca04b919cfae338d41 (diff) |
loplugin:buriedassign in sw
Change-Id: If2adf22a0ac3e030fca1b4ecd0173cac58f0f21e
Reviewed-on: https://gerrit.libreoffice.org/63470
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/edit/autofmt.cxx')
-rw-r--r-- | sw/source/core/edit/autofmt.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 37865d7c9a98..0b435c3a5f02 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -821,7 +821,7 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTextNode& rNd, sal_Int32& rPos, c += SVX_NUM_ROMAN_LOWER; } - ( eScan &= ~(UPPER_ALPHA|LOWER_ALPHA)) |= eTmpScan; + eScan = (eScan & ~(UPPER_ALPHA|LOWER_ALPHA)) | eTmpScan; if( pNumTypes ) (*pNumTypes) = pNumTypes->replaceAt( pNumTypes->getLength() - 1, 1, OUString(c) ); } @@ -1877,7 +1877,9 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) if (nPos && IsSpace((*pText)[nPos-1])) nLastBlank = nPos; for (nSttPos = nPos; !bBreak && nPos < pText->getLength(); ++nPos) - switch (cChar = (*pText)[nPos]) + { + cChar = (*pText)[nPos]; + switch (cChar) { case '\"': case '\'': @@ -1991,6 +1993,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) } break; } + } if( nPos == nSttPos ) { @@ -2122,9 +2125,12 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags const & m_nEndNdIdx = m_aEndNdIdx.GetIndex(); if( !m_aFlags.bAFormatByInput ) + { + m_nEndNdIdx = m_aEndNdIdx.GetIndex(); ::StartProgress( STR_STATSTR_AUTOFORMAT, m_aNdIdx.GetIndex(), - m_nEndNdIdx = m_aEndNdIdx.GetIndex(), + m_nEndNdIdx, m_pDoc->GetDocShell() ); + } RedlineFlags eRedlMode = m_pDoc->getIDocumentRedlineAccess().GetRedlineFlags(), eOldMode = eRedlMode; if( m_aFlags.bWithRedlining ) |