summaryrefslogtreecommitdiff
path: root/vcl
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 /vcl
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 'vcl')
-rw-r--r--vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx30
-rw-r--r--vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx3
-rw-r--r--vcl/source/bitmap/BitmapMedianFilter.cxx9
-rw-r--r--vcl/source/bitmap/BitmapScaleSuperFilter.cxx6
-rw-r--r--vcl/source/filter/graphicfilter2.cxx3
-rw-r--r--vcl/source/fontsubset/sft.cxx3
-rw-r--r--vcl/source/gdi/bmpacc2.cxx36
-rw-r--r--vcl/source/gdi/impanmvw.cxx8
-rw-r--r--vcl/source/gdi/impvect.cxx26
-rw-r--r--vcl/source/gdi/pngwrite.cxx6
-rw-r--r--vcl/source/gdi/salmisc.cxx3
-rw-r--r--vcl/source/outdev/gradient.cxx33
-rw-r--r--vcl/source/treelist/transfer.cxx18
13 files changed, 127 insertions, 57 deletions
diff --git a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
index c2f2750f69a0..5d2d6728e9f8 100644
--- a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
+++ b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
@@ -91,41 +91,53 @@ BitmapEx BitmapConvolutionMatrixFilter::execute(BitmapEx const& rBitmapEx) const
for (nX = 0; nX < nWidth; nX++)
{
// first row
- nSumR = (pTmp = pKoeff[0])[(pColor = pRowTmp1 + nX)->GetRed()];
+ pTmp = pKoeff[0];
+ pColor = pRowTmp1 + nX;
+ nSumR = pTmp[pColor->GetRed()];
nSumG = pTmp[pColor->GetGreen()];
nSumB = pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[1])[(++pColor)->GetRed()];
+ pTmp = pKoeff[1];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[2])[(++pColor)->GetRed()];
+ pTmp = pKoeff[2];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
// second row
- nSumR += (pTmp = pKoeff[3])[(pColor = pRowTmp2 + nX)->GetRed()];
+ pTmp = pKoeff[3];
+ pColor = pRowTmp2 + nX;
+ nSumR += pTmp[pColor->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[4])[(++pColor)->GetRed()];
+ pTmp = pKoeff[4];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[5])[(++pColor)->GetRed()];
+ pTmp = pKoeff[5];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
// third row
- nSumR += (pTmp = pKoeff[6])[(pColor = pRowTmp3 + nX)->GetRed()];
+ pTmp = pKoeff[6];
+ pColor = pRowTmp3 + nX;
+ nSumR += pTmp[pColor->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[7])[(++pColor)->GetRed()];
+ pTmp = pKoeff[7];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[8])[(++pColor)->GetRed()];
+ pTmp = pKoeff[8];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
diff --git a/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx b/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
index 1826d19f12db..d12f086786ba 100644
--- a/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
+++ b/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
@@ -115,7 +115,8 @@ bool BitmapGaussianSeparableBlurFilter::convolutionPass(Bitmap& rBitmap, Bitmap&
for (int j = 0; j < pCount[nSourceX]; ++j)
{
aIndex = aBaseIndex + j;
- aSum += aWeight = pWeights[aIndex];
+ aWeight = pWeights[aIndex];
+ aSum += aWeight;
aColor = pReadAcc->GetColor(nSourceY, pPixels[aIndex]);
diff --git a/vcl/source/bitmap/BitmapMedianFilter.cxx b/vcl/source/bitmap/BitmapMedianFilter.cxx
index 81b935ac5212..47a298dd6039 100644
--- a/vcl/source/bitmap/BitmapMedianFilter.cxx
+++ b/vcl/source/bitmap/BitmapMedianFilter.cxx
@@ -114,7 +114,8 @@ BitmapEx BitmapMedianFilter::execute(BitmapEx const& rBitmapEx) const
Scanline pScanline = pWriteAcc->GetScanline(nY);
for (nX = 0; nX < nWidth; nX++)
{
- nR1 = (pColor = pRowTmp1 + nX)->GetRed();
+ pColor = pRowTmp1 + nX;
+ nR1 = pColor->GetRed();
nG1 = pColor->GetGreen();
nB1 = pColor->GetBlue();
nR2 = (++pColor)->GetRed();
@@ -124,7 +125,8 @@ BitmapEx BitmapMedianFilter::execute(BitmapEx const& rBitmapEx) const
nG3 = pColor->GetGreen();
nB3 = pColor->GetBlue();
- nR4 = (pColor = pRowTmp2 + nX)->GetRed();
+ pColor = pRowTmp2 + nX;
+ nR4 = pColor->GetRed();
nG4 = pColor->GetGreen();
nB4 = pColor->GetBlue();
nR5 = (++pColor)->GetRed();
@@ -134,7 +136,8 @@ BitmapEx BitmapMedianFilter::execute(BitmapEx const& rBitmapEx) const
nG6 = pColor->GetGreen();
nB6 = pColor->GetBlue();
- nR7 = (pColor = pRowTmp3 + nX)->GetRed();
+ pColor = pRowTmp3 + nX;
+ nR7 = pColor->GetRed();
nG7 = pColor->GetGreen();
nB7 = pColor->GetBlue();
nR8 = (++pColor)->GetRed();
diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
index 71eacdb5a087..eb081281b56d 100644
--- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
+++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
@@ -201,7 +201,8 @@ void scale24bitBGR(ScaleContext &rCtx, long nStartY, long nEndY)
pTmp0++; pTmp1++;
sal_uInt8 cR0 = MAP( *pTmp0, *pTmp1, nTempFX );
- pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3;
+ pTmp0 = pLine1 + nOff;
+ pTmp1 = pTmp0 + 3;
sal_uInt8 cB1 = MAP( *pTmp0, *pTmp1, nTempFX );
pTmp0++; pTmp1++;
sal_uInt8 cG1 = MAP( *pTmp0, *pTmp1, nTempFX );
@@ -241,7 +242,8 @@ void scale24bitRGB(ScaleContext &rCtx, long nStartY, long nEndY)
pTmp0++; pTmp1++;
sal_uInt8 cB0 = MAP( *pTmp0, *pTmp1, nTempFX );
- pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3;
+ pTmp0 = pLine1 + nOff;
+ pTmp1 = pTmp0 + 3;
sal_uInt8 cR1 = MAP( *pTmp0, *pTmp1, nTempFX );
pTmp0++; pTmp1++;
sal_uInt8 cG1 = MAP( *pTmp0, *pTmp1, nTempFX );
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 9c7491ea5e4a..b3fce62c75f0 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -643,7 +643,8 @@ bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, bool bExtendedInfo )
// Offset of the first IFD
rStm.ReadUInt32( nTemp32 );
- rStm.SeekRel( ( nCount = ( nTemp32 + 2 ) ) - 0x08 );
+ nCount = nTemp32 + 2;
+ rStm.SeekRel( nCount - 0x08 );
if ( nCount < nMax )
{
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 11d9bedae11c..9262c2bca365 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -427,7 +427,8 @@ static int GetSimpleTTOutline(TrueTypeFont const *ttf, sal_uInt32 glyphID, Contr
i = 0;
while (i <= lastPoint) {
- pa[i++].flags = static_cast<sal_uInt32>(flag = *p++);
+ flag = *p++;
+ pa[i++].flags = static_cast<sal_uInt32>(flag);
if (flag & 8) { /*- repeat flag */
n = *p++;
for (j=0; j<n; j++) {
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index 25606c09509e..83865113234c 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -29,8 +29,10 @@ void BitmapReadAccess::SetPixelForN1BitMsbPal(const Scanline pScanline, long nX,
{
sal_uInt8& rByte = pScanline[ nX >> 3 ];
- ( rBitmapColor.GetIndex() & 1 ) ? ( rByte |= 1 << ( 7 - ( nX & 7 ) ) ) :
- ( rByte &= ~( 1 << ( 7 - ( nX & 7 ) ) ) );
+ if ( rBitmapColor.GetIndex() & 1 )
+ rByte |= 1 << ( 7 - ( nX & 7 ) );
+ else
+ rByte &= ~( 1 << ( 7 - ( nX & 7 ) ) );
}
BitmapColor BitmapReadAccess::GetPixelForN1BitLsbPal(ConstScanline pScanline, long nX, const ColorMask&)
@@ -42,8 +44,10 @@ void BitmapReadAccess::SetPixelForN1BitLsbPal(const Scanline pScanline, long nX,
{
sal_uInt8& rByte = pScanline[ nX >> 3 ];
- ( rBitmapColor.GetIndex() & 1 ) ? ( rByte |= 1 << ( nX & 7 ) ) :
- ( rByte &= ~( 1 << ( nX & 7 ) ) );
+ if ( rBitmapColor.GetIndex() & 1 )
+ rByte |= 1 << ( nX & 7 );
+ else
+ rByte &= ~( 1 << ( nX & 7 ) );
}
BitmapColor BitmapReadAccess::GetPixelForN4BitMsnPal(ConstScanline pScanline, long nX, const ColorMask&)
@@ -55,8 +59,16 @@ void BitmapReadAccess::SetPixelForN4BitMsnPal(const Scanline pScanline, long nX,
{
sal_uInt8& rByte = pScanline[ nX >> 1 ];
- ( nX & 1 ) ? ( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) ) :
- ( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) );
+ if ( nX & 1 )
+ {
+ rByte &= 0xf0;
+ rByte |= ( rBitmapColor.GetIndex() & 0x0f );
+ }
+ else
+ {
+ rByte &= 0x0f;
+ rByte |= ( rBitmapColor.GetIndex() << 4 );
+ }
}
BitmapColor BitmapReadAccess::GetPixelForN4BitLsnPal(ConstScanline pScanline, long nX, const ColorMask&)
@@ -68,8 +80,16 @@ void BitmapReadAccess::SetPixelForN4BitLsnPal(const Scanline pScanline, long nX,
{
sal_uInt8& rByte = pScanline[ nX >> 1 ];
- ( nX & 1 ) ? ( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) ) :
- ( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) );
+ if ( nX & 1 )
+ {
+ rByte &= 0x0f;
+ rByte |= ( rBitmapColor.GetIndex() << 4 );
+ }
+ else
+ {
+ rByte &= 0xf0;
+ rByte |= ( rBitmapColor.GetIndex() & 0x0f );
+ }
}
BitmapColor BitmapReadAccess::GetPixelForN8BitPal(ConstScanline pScanline, long nX, const ColorMask&)
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 958ce0803444..0c13f5fd6f9d 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -92,7 +92,10 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
// If first frame OutputDevice is set, update variables now for real OutputDevice
if( pFirstFrameOutDev )
- maClip = ( mpOut = pOut )->GetClipRegion();
+ {
+ mpOut = pOut;
+ maClip = mpOut->GetClipRegion();
+ }
}
ImplAnimView::~ImplAnimView()
@@ -212,7 +215,8 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
Size aSizePix;
Size aBmpSizePix;
const sal_uLong nLastPos = mpParent->Count() - 1;
- const AnimationBitmap& rAnm = mpParent->Get( static_cast<sal_uInt16>( mnActPos = std::min( nPos, nLastPos ) ) );
+ mnActPos = std::min( nPos, nLastPos );
+ const AnimationBitmap& rAnm = mpParent->Get( static_cast<sal_uInt16>( mnActPos ) );
getPosSize( rAnm, aPosPix, aSizePix );
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index c9b51f575918..fc69daf1b082 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -239,7 +239,8 @@ ImplVectMap::~ImplVectMap()
inline void ImplVectMap::Set( long nY, long nX, sal_uInt8 cVal )
{
const sal_uInt8 cShift = sal::static_int_cast<sal_uInt8>(6 - ( ( nX & 3 ) << 1 ));
- ( ( mpScan[ nY ][ nX >> 2 ] ) &= ~( 3 << cShift ) ) |= ( cVal << cShift );
+ auto & rPixel = mpScan[ nY ][ nX >> 2 ];
+ rPixel = (rPixel & ~( 3 << cShift ) ) | ( cVal << cShift );
}
inline sal_uInt8 ImplVectMap::Get( long nY, long nX ) const
@@ -598,7 +599,8 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
}
}
- aNewArr1.ImplSetRealSize( nCount = nNewPos );
+ nCount = nNewPos;
+ aNewArr1.ImplSetRealSize( nCount );
// pass 2
aNewArr2.ImplSetSize( nCount );
@@ -620,7 +622,8 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
pLeast = &( aNewArr1[ n++ ] );
}
- aNewArr2[ nNewPos++ ] = *( pLast = pLeast );
+ pLast = pLeast;
+ aNewArr2[ nNewPos++ ] = *pLast;
}
aNewArr2.ImplSetRealSize( nNewPos );
@@ -675,7 +678,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
if( n )
fPercentStep_2 = 45.0 / n;
- VECT_PROGRESS( pProgress, FRound( fPercent += 10.0 ) );
+ fPercent += 10.0;
+ VECT_PROGRESS( pProgress, FRound( fPercent ) );
for( sal_uInt16 i = 0; i < n; i++ )
{
@@ -683,7 +687,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() );
std::unique_ptr<ImplVectMap> xMap(ImplExpand( pRAcc.get(), aFindColor ));
- VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
+ fPercent += fPercentStep_2;
+ VECT_PROGRESS( pProgress, FRound( fPercent ) );
if( xMap )
{
@@ -706,7 +711,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
}
}
- VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
+ fPercent += fPercentStep_2;
+ VECT_PROGRESS( pProgress, FRound( fPercent ) );
}
delete[] pColorSet;
@@ -935,7 +941,9 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain
if( pMap->IsCont( nTryY, nTryX ) )
{
rChain.ImplAdd( static_cast<sal_uInt8>(nLastDir) );
- pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX );
+ nActY = nTryY;
+ nActX = nTryX;
+ pMap->Set( nActY, nActX, VECT_DONE_INDEX );
nFound = 1;
}
else
@@ -952,7 +960,9 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain
if( pMap->IsCont( nTryY, nTryX ) )
{
rChain.ImplAdd( static_cast<sal_uInt8>(nDir) );
- pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX );
+ nActY = nTryY;
+ nActX = nTryX;
+ pMap->Set( nActY, nActX, VECT_DONE_INDEX );
nFound = 1;
nLastDir = nDir;
break;
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index c62e2d177b0b..7189791ae315 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -279,8 +279,10 @@ bool PNGWriterImpl::Write(SvStream& rOStm)
bool PNGWriterImpl::ImplWriteHeader()
{
ImplOpenChunk(PNGCHUNK_IHDR);
- ImplWriteChunk(sal_uInt32(mnWidth = mpAccess->Width()));
- ImplWriteChunk(sal_uInt32(mnHeight = mpAccess->Height()));
+ mnWidth = mpAccess->Width();
+ ImplWriteChunk(sal_uInt32(mnWidth));
+ mnHeight = mpAccess->Height();
+ ImplWriteChunk(sal_uInt32(mnHeight));
if (mnWidth && mnHeight && mnBitsPerPixel && mbStatus)
{
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 6af3de0fd755..1e4a4870c1a9 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -196,7 +196,8 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDs
for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
{
- aCol.SetBlue( *( pPixel = ( pSrcScan + pMapX[ nX ] * 3 ) )++ );
+ pPixel = pSrcScan + pMapX[ nX ] * 3;
+ aCol.SetBlue( *pPixel++ );
aCol.SetGreen( *pPixel++ );
aCol.SetRed( *pPixel );
pFncSetPixel( pDstScan, nX, aCol, rDstMask );
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index bb2cd50f4fe3..aeace07e4710 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -521,7 +521,8 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
if( xPolyPoly )
{
- xPolyPoly->Insert( aPoly = rRect );
+ aPoly = rRect;
+ xPolyPoly->Insert( aPoly );
xPolyPoly->Insert( aPoly );
}
else
@@ -534,17 +535,22 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
aExtRect.AdjustRight(1 );
aExtRect.AdjustBottom(1 );
- ImplDrawPolygon( aPoly = aExtRect, pClixPolyPoly );
+ aPoly = aExtRect;
+ ImplDrawPolygon( aPoly, pClixPolyPoly );
}
// loop to output Polygon/PolyPolygon sequentially
for( long i = 1; i < nSteps; i++ )
{
// calculate new Polygon
- aRect.SetLeft( static_cast<long>( fScanLeft += fScanIncX ) );
- aRect.SetTop( static_cast<long>( fScanTop += fScanIncY ) );
- aRect.SetRight( static_cast<long>( fScanRight -= fScanIncX ) );
- aRect.SetBottom( static_cast<long>( fScanBottom -= fScanIncY ) );
+ fScanLeft += fScanIncX;
+ aRect.SetLeft( static_cast<long>( fScanLeft ) );
+ fScanTop += fScanIncY;
+ aRect.SetTop( static_cast<long>( fScanTop ) );
+ fScanRight -= fScanIncX;
+ aRect.SetRight( static_cast<long>( fScanRight ) );
+ fScanBottom -= fScanIncY;
+ aRect.SetBottom( static_cast<long>( fScanBottom ) );
if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) )
break;
@@ -863,17 +869,22 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) );
- xPolyPoly->Insert( aPoly = rRect );
+ aPoly = rRect;
+ xPolyPoly->Insert( aPoly );
xPolyPoly->Insert( aPoly );
// loop to output Polygon/PolyPolygon sequentially
for( long i = 1; i < nSteps; i++ )
{
// calculate new Polygon
- aRect.SetLeft( static_cast<long>( fScanLeft += fScanIncX ) );
- aRect.SetTop( static_cast<long>( fScanTop += fScanIncY ) );
- aRect.SetRight( static_cast<long>( fScanRight -= fScanIncX ) );
- aRect.SetBottom( static_cast<long>( fScanBottom -= fScanIncY ) );
+ fScanLeft += fScanIncX;
+ aRect.SetLeft( static_cast<long>( fScanLeft ) );
+ fScanTop += fScanIncY;
+ aRect.SetTop( static_cast<long>( fScanTop ) );
+ fScanRight -= fScanIncX;
+ aRect.SetRight( static_cast<long>( fScanRight ) );
+ fScanBottom -= fScanIncY;
+ aRect.SetBottom( static_cast<long>( fScanBottom ) );
if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) )
break;
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index cc1a79c6068c..28fe43fda5f3 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -331,8 +331,8 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co
if( GraphicConverter::Export( aDstStm, aGraphic, ConvertDataFormat::EMF ) == ERRCODE_NONE )
{
- maAny <<= ( aSeq = Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ),
- aDstStm.TellEnd() ) );
+ maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ),
+ aDstStm.TellEnd() );
bDone = true;
}
}
@@ -361,8 +361,8 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co
// taking wmf without file header
if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, nullptr, false ) )
{
- maAny <<= ( aSeq = Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ),
- aDstStm.TellEnd() ) );
+ maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ),
+ aDstStm.TellEnd() );
bDone = true;
}
}
@@ -913,9 +913,10 @@ void TransferableHelper::CopyToClipboard( vcl::Window *pWindow ) const
try
{
- TransferableHelper* pThis = const_cast< TransferableHelper* >( this );
+ TransferableHelper* pThis = const_cast< TransferableHelper* >( this );
+ pThis->mxTerminateListener = new TerminateListener( *pThis );
Reference< XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
- xDesktop->addTerminateListener( pThis->mxTerminateListener = new TerminateListener( *pThis ) );
+ xDesktop->addTerminateListener( pThis->mxTerminateListener );
mxClipboard->setContents( pThis, pThis );
}
@@ -938,9 +939,10 @@ void TransferableHelper::CopyToSelection( vcl::Window *pWindow ) const
try
{
- TransferableHelper* pThis = const_cast< TransferableHelper* >( this );
+ TransferableHelper* pThis = const_cast< TransferableHelper* >( this );
+ pThis->mxTerminateListener = new TerminateListener( *pThis );
Reference< XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
- xDesktop->addTerminateListener( pThis->mxTerminateListener = new TerminateListener( *pThis ) );
+ xDesktop->addTerminateListener( pThis->mxTerminateListener );
xSelection->setContents( pThis, pThis );
}