summaryrefslogtreecommitdiff
path: root/sw/source/core/doc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r--sw/source/core/doc/DocumentFieldsManager.cxx8
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx10
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx6
-rw-r--r--sw/source/core/doc/doccomp.cxx24
-rw-r--r--sw/source/core/doc/docfmt.cxx5
-rw-r--r--sw/source/core/doc/docredln.cxx3
6 files changed, 42 insertions, 14 deletions
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx
index ae1d7fcab7f5..15b89a5bdc71 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -952,7 +952,9 @@ void DocumentFieldsManager::UpdateExpFieldsImpl(
const SwFieldType* pFieldType;
// process separately:
for( auto n = mpFieldTypes->size(); n; )
- switch( ( pFieldType = (*mpFieldTypes)[ --n ] )->Which() )
+ {
+ pFieldType = (*mpFieldTypes)[ --n ];
+ switch( pFieldType->Which() )
{
case SwFieldIds::User:
{
@@ -972,6 +974,7 @@ void DocumentFieldsManager::UpdateExpFieldsImpl(
break;
default: break;
}
+ }
}
// The array is filled with all fields; start calculation.
@@ -1057,7 +1060,8 @@ void DocumentFieldsManager::UpdateExpFieldsImpl(
SwFormatField* pFormatField = const_cast<SwFormatField*>(&pTextField->GetFormatField());
const SwField* pField = pFormatField->GetField();
- switch( nWhich = pField->GetTyp()->Which() )
+ nWhich = pField->GetTyp()->Which();
+ switch( nWhich )
{
case SwFieldIds::HiddenText:
{
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index a5b60561abdf..036e33e43853 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -2342,7 +2342,10 @@ bool DocumentRedlineManager::AcceptRedline( SwRedlineTable::size_type nPos, bool
if( SwRedlineTable::npos != nFndPos || ( 0 != ( --nLoopCnt ) &&
SwRedlineTable::npos != ( nFndPos =
mpRedlineTable->FindPrevSeqNo( nSeqNo, nPos ))) )
- pTmp = (*mpRedlineTable)[ nPos = nFndPos ];
+ {
+ nPos = nFndPos;
+ pTmp = (*mpRedlineTable)[ nPos ];
+ }
else
nLoopCnt = 0;
}
@@ -2481,7 +2484,10 @@ bool DocumentRedlineManager::RejectRedline( SwRedlineTable::size_type nPos, bool
if( SwRedlineTable::npos != nFndPos || ( 0 != ( --nLoopCnt ) &&
SwRedlineTable::npos != ( nFndPos =
mpRedlineTable->FindPrevSeqNo( nSeqNo, nPos ))) )
- pTmp = (*mpRedlineTable)[ nPos = nFndPos ];
+ {
+ nPos = nFndPos;
+ pTmp = (*mpRedlineTable)[ nPos ];
+ }
else
nLoopCnt = 0;
}
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index e0b44789c499..09d457056a05 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1967,12 +1967,14 @@ SwNumRule* DocumentStylePoolManager::GetNumRuleFromPool( sal_uInt16 nId )
{
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
- aFormat.SetAbsLSpace( nSpace = nSpace + pArr[ n ] );
+ nSpace += pArr[ n ];
+ aFormat.SetAbsLSpace( nSpace );
aFormat.SetFirstLineOffset( - pArr[ n ] );
}
else if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT )
{
- aFormat.SetListtabPos( nSpace = nSpace + pArr[ n ] );
+ nSpace += pArr[ n ];
+ aFormat.SetListtabPos( nSpace );
aFormat.SetIndentAt( nSpace );
aFormat.SetFirstLineIndent( - pArr[ n ] );
}
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index fead8dd1ec45..7d6e880c605a 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -858,8 +858,14 @@ sal_uLong Compare::CompareSequence::CheckDiag( sal_uLong nStt1, sal_uLong nEnd1,
long d; /* Active diagonal. */
/* Extend the top-down search by an edit step in each diagonal. */
- fmin > dmin ? pFDiag[--fmin - 1] = -1 : ++fmin;
- fmax < dmax ? pFDiag[++fmax + 1] = -1 : --fmax;
+ if (fmin > dmin)
+ pFDiag[--fmin - 1] = -1;
+ else
+ ++fmin;
+ if (fmax < dmax)
+ pFDiag[++fmax + 1] = -1;
+ else
+ --fmax;
for (d = fmax; d >= fmin; d -= 2)
{
long x, y, tlo = pFDiag[d - 1], thi = pFDiag[d + 1];
@@ -884,8 +890,14 @@ sal_uLong Compare::CompareSequence::CheckDiag( sal_uLong nStt1, sal_uLong nEnd1,
}
/* Similar extend the bottom-up search. */
- bmin > dmin ? pBDiag[--bmin - 1] = INT_MAX : ++bmin;
- bmax < dmax ? pBDiag[++bmax + 1] = INT_MAX : --bmax;
+ if (bmin > dmin)
+ pBDiag[--bmin - 1] = INT_MAX;
+ else
+ ++bmin;
+ if (bmax < dmax)
+ pBDiag[++bmax + 1] = INT_MAX;
+ else
+ --bmax;
for (d = bmax; d >= bmin; d -= 2)
{
long x, y, tlo = pBDiag[d - 1], thi = pBDiag[d + 1];
@@ -1013,7 +1025,7 @@ sal_uLong SwCompareLine::GetHashValue() const
{
OUString sStr( GetText() );
for( sal_Int32 n = 0; n < sStr.getLength(); ++n )
- ( nRet <<= 1 ) += sStr[ n ];
+ nRet = (nRet << 1) + sStr[ n ];
}
break;
@@ -1233,7 +1245,7 @@ sal_uLong SwCompareLine::GetTextNodeHashValue( const SwTextNode& rNd, sal_uLong
{
OUString sStr( rNd.GetExpandText(nullptr) );
for( sal_Int32 n = 0; n < sStr.getLength(); ++n )
- ( nVal <<= 1 ) += sStr[ n ];
+ nVal = (nVal << 1 ) + sStr[ n ];
return nVal;
}
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index ccebf3bfac0b..9f16c4131334 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1722,7 +1722,10 @@ SwTableNumFormatMerge::SwTableNumFormatMerge( const SwDoc& rSrc, SwDoc& rDest )
// a different Doc -> Number formatter needs to be merged
SvNumberFormatter* pN;
if( &rSrc != &rDest && nullptr != ( pN = const_cast<SwDoc&>(rSrc).GetNumberFormatter( false ) ))
- ( pNFormat = rDest.GetNumberFormatter())->MergeFormatter( *pN );
+ {
+ pNFormat = rDest.GetNumberFormatter();
+ pNFormat->MergeFormatter( *pN );
+ }
if( &rSrc != &rDest )
static_cast<SwGetRefFieldType*>(rSrc.getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::GetRef ))->
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index e26e02b53848..a323b595f0fc 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1671,7 +1671,8 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos)
if( m_bDelLastPara )
{
++GetPoint()->nNode;
- GetPoint()->nContent.Assign( pCNd = GetContentNode(), 0 );
+ pCNd = GetContentNode();
+ GetPoint()->nContent.Assign( pCNd, 0 );
m_bDelLastPara = false;
}
else if( pColl )