summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-03 16:31:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-16 18:42:57 +0100
commit270e41adb0c7a5f3e25e0ea25933de0d5c32ef9c (patch)
treed56df4efd8e9345cf7f213e6149b9a71a49da458 /tools
parent26caf1bc59c81704f11225e3e431e412deb8c475 (diff)
loplugin:buriedassign in sd..writerfilter
Change-Id: I954c12d9e1c493be6ac8c7b15076077b5bff5b74 Reviewed-on: https://gerrit.libreoffice.org/62811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/poly.cxx14
-rw-r--r--tools/source/stream/vcompat.cxx3
2 files changed, 10 insertions, 7 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 4f4bdf5dffe8..4217531800b5 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -149,16 +149,16 @@ ImplPolygon::ImplPolygon( const tools::Rectangle& rRect, sal_uInt32 nHorzRound,
Point* pDstAry = mxPointAry.get();
for( i = 0, nEnd = nSize4; i < nEnd; i++ )
- ( pDstAry[ i ] = pSrcAry[ i ] ) += aTR;
+ pDstAry[ i ] = pSrcAry[ i ] + aTR;
for( nEnd = nEnd + nSize4; i < nEnd; i++ )
- ( pDstAry[ i ] = pSrcAry[ i ] ) += aTL;
+ pDstAry[ i ] = pSrcAry[ i ] + aTL;
for( nEnd = nEnd + nSize4; i < nEnd; i++ )
- ( pDstAry[ i ] = pSrcAry[ i ] ) += aBL;
+ pDstAry[ i ] = pSrcAry[ i ] + aBL;
for( nEnd = nEnd + nSize4; i < nEnd; i++ )
- ( pDstAry[ i ] = pSrcAry[ i ] ) += aBR;
+ pDstAry[ i ] = pSrcAry[ i ] + aBR;
pDstAry[ nEnd ] = pDstAry[ 0 ];
}
@@ -1054,7 +1054,8 @@ void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags )
if( ( mpImplPolygon->mxPointAry[ i ] != mpImplPolygon->mxPointAry[ nLast ] ) &&
( !nReduce || ( nReduce < FRound( CalcDistance( nLast, i ) ) ) ) )
{
- aNewPoly[ nNewCount++ ] = mpImplPolygon->mxPointAry[ nLast = i ];
+ nLast = i;
+ aNewPoly[ nNewCount++ ] = mpImplPolygon->mxPointAry[ i ];
}
}
@@ -1292,7 +1293,8 @@ void Polygon::ImplReduceEdges( tools::Polygon& rPoly, const double& rArea, sal_u
else
{
Vector2D aVecB( rPoly[ nIndNext ] );
- double fDistB = ( aVecB -= Vector2D(rPoly[ nIndPrev ] )).GetLength();
+ aVecB -= Vector2D(rPoly[ nIndPrev ] );
+ double fDistB = aVecB.GetLength();
double fLenWithB = fDist2 + fDist3;
double fLenFact = ( fDistB != 0.0 ) ? fLenWithB / fDistB : 1.0;
double fTurnPrev = aVec1.Normalize().Scalar( aVec2 );
diff --git a/tools/source/stream/vcompat.cxx b/tools/source/stream/vcompat.cxx
index 7e03ef43a0c8..d77f866e06af 100644
--- a/tools/source/stream/vcompat.cxx
+++ b/tools/source/stream/vcompat.cxx
@@ -32,7 +32,8 @@ VersionCompat::VersionCompat( SvStream& rStm, StreamMode nStreamMode, sal_uInt16
if( StreamMode::WRITE == mnStmMode )
{
mpRWStm->WriteUInt16( mnVersion );
- mnTotalSize = ( mnCompatPos = mpRWStm->Tell() ) + 4;
+ mnCompatPos = mpRWStm->Tell();
+ mnTotalSize = mnCompatPos + 4;
mpRWStm->SeekRel( 4 );
}
else