diff options
Diffstat (limited to 'vcl')
33 files changed, 381 insertions, 132 deletions
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx index 3f59cdd903e5..68ea2f324f2e 100644 --- a/vcl/headless/svpbmp.cxx +++ b/vcl/headless/svpbmp.cxx @@ -203,7 +203,8 @@ void SvpSalBitmap::Destroy() if (mpDIB) { delete[] mpDIB->mpBits; - delete mpDIB, mpDIB = nullptr; + delete mpDIB; + mpDIB = nullptr; } } @@ -212,7 +213,10 @@ Size SvpSalBitmap::GetSize() const Size aSize; if (mpDIB) - aSize.Width() = mpDIB->mnWidth, aSize.Height() = mpDIB->mnHeight; + { + aSize.Width() = mpDIB->mnWidth; + aSize.Height() = mpDIB->mnHeight; + } return aSize; } diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 19c663a5b1f9..dd34d106a85b 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -100,17 +100,32 @@ void ImplDeInitSVData() // delete global instance data if( pSVData->mpSettingsConfigItem ) - delete pSVData->mpSettingsConfigItem, pSVData->mpSettingsConfigItem = nullptr; + { + delete pSVData->mpSettingsConfigItem; + pSVData->mpSettingsConfigItem = nullptr; + } if( pSVData->mpDockingManager ) - delete pSVData->mpDockingManager, pSVData->mpDockingManager = nullptr; + { + delete pSVData->mpDockingManager; + pSVData->mpDockingManager = nullptr; + } if( pSVData->maCtrlData.mpFieldUnitStrings ) - delete pSVData->maCtrlData.mpFieldUnitStrings, pSVData->maCtrlData.mpFieldUnitStrings = nullptr; + { + delete pSVData->maCtrlData.mpFieldUnitStrings; + pSVData->maCtrlData.mpFieldUnitStrings = nullptr; + } if( pSVData->maCtrlData.mpCleanUnitStrings ) - delete pSVData->maCtrlData.mpCleanUnitStrings, pSVData->maCtrlData.mpCleanUnitStrings = nullptr; + { + delete pSVData->maCtrlData.mpCleanUnitStrings; + pSVData->maCtrlData.mpCleanUnitStrings = nullptr; + } if( pSVData->mpPaperNames ) - delete pSVData->mpPaperNames, pSVData->mpPaperNames = nullptr; + { + delete pSVData->mpPaperNames; + pSVData->mpPaperNames = nullptr; + } } /// Returns either the application window, or the default GL context window diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 1546bc39af6c..5fdd2687d013 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -383,10 +383,16 @@ void DeInitVCL() delete pSVData->maGDIData.mpGrfConverter; if( pSVData->mpSettingsConfigItem ) - delete pSVData->mpSettingsConfigItem, pSVData->mpSettingsConfigItem = nullptr; + { + delete pSVData->mpSettingsConfigItem; + pSVData->mpSettingsConfigItem = nullptr; + } if ( pSVData->maAppData.mpIdleMgr ) - delete pSVData->maAppData.mpIdleMgr, pSVData->maAppData.mpIdleMgr = nullptr; + { + delete pSVData->maAppData.mpIdleMgr; + pSVData->maAppData.mpIdleMgr = nullptr; + } Scheduler::ImplDeInitScheduler(); if ( pSVData->maWinData.mpMsgBoxImgList ) @@ -526,7 +532,10 @@ void DeInitVCL() ImplFreeEventHookData(); if (pSVData->mpBlendFrameCache) - delete pSVData->mpBlendFrameCache, pSVData->mpBlendFrameCache = nullptr; + { + delete pSVData->mpBlendFrameCache; + pSVData->mpBlendFrameCache = nullptr; + } if (pSVData->mpCommandInfoProvider) { diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index f7e04c7eb1cb..72ee5948a50e 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -73,7 +73,8 @@ Control::~Control() void Control::dispose() { - delete mpControlData, mpControlData = nullptr; + delete mpControlData; + mpControlData = nullptr; Window::dispose(); } diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx index edbfbad5bdb4..84721c8061bd 100644 --- a/vcl/source/edit/textdoc.cxx +++ b/vcl/source/edit/textdoc.cxx @@ -30,7 +30,7 @@ static bool CompareStart( const std::unique_ptr<TextCharAttrib>& pFirst, const s TextCharAttrib::TextCharAttrib( const TextAttrib& rAttr, sal_Int32 nStart, sal_Int32 nEnd ) { mpAttr = rAttr.Clone(); - mnStart = nStart, + mnStart = nStart; mnEnd = nEnd; } diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 85b28dc78889..0c8026d0ff6a 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1119,7 +1119,8 @@ GraphicFilter::~GraphicFilter() } if( pFilterHdlList->empty() ) { - delete pFilterHdlList, pFilterHdlList = nullptr; + delete pFilterHdlList; + pFilterHdlList = nullptr; delete pConfig; } } diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx index b12aea3b973c..d34076fde8c6 100644 --- a/vcl/source/filter/ixbm/xbmread.cxx +++ b/vcl/source/filter/ixbm/xbmread.cxx @@ -233,7 +233,10 @@ bool XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat pAcc1->SetPixel( nRow, nCol++, ( nValue & ( 1 << nBit++ ) ) ? aBlack : aWhite ); if( nCol == nWidth ) - nCol = 0, nRow++; + { + nCol = 0; + nRow++; + } } } } @@ -319,7 +322,8 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) { Bitmap aBlackBmp( Size( pAcc1->Width(), pAcc1->Height() ), 1 ); - Bitmap::ReleaseAccess( pAcc1 ), pAcc1 = nullptr; + Bitmap::ReleaseAccess( pAcc1 ); + pAcc1 = nullptr; aBlackBmp.Erase( Color( COL_BLACK ) ); rGraphic = BitmapEx( aBlackBmp, aBmp1 ); eReadState = XBMREAD_OK; diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx index c456d4ed1877..2622bf0d467b 100644 --- a/vcl/source/filter/ixpm/xpmread.cxx +++ b/vcl/source/filter/ixpm/xpmread.cxx @@ -181,21 +181,32 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) { if ( mpMaskAcc ) { - Bitmap::ReleaseAccess ( mpMaskAcc), mpMaskAcc = nullptr; - Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr; + Bitmap::ReleaseAccess ( mpMaskAcc); + mpMaskAcc = nullptr; + Bitmap::ReleaseAccess( mpAcc ); + mpAcc = nullptr; rGraphic = Graphic( BitmapEx( maBmp, maMaskBmp ) ); } else { - Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr; + Bitmap::ReleaseAccess( mpAcc ); + mpAcc = nullptr; rGraphic = maBmp; } eReadState = XPMREAD_OK; } else { - if ( mpMaskAcc ) Bitmap::ReleaseAccess ( mpMaskAcc), mpMaskAcc = nullptr; - if ( mpAcc ) Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr; + if ( mpMaskAcc ) + { + Bitmap::ReleaseAccess ( mpMaskAcc); + mpMaskAcc = nullptr; + } + if ( mpAcc ) + { + Bitmap::ReleaseAccess( mpAcc ); + mpAcc = nullptr; + } eReadState = XPMREAD_ERROR; } } diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index eb7864d47e31..7f33702e1838 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -1237,10 +1237,12 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) if( fScaleX != 1.0 || fScaleY != 1.0 ) { aTmpMtf.Scale( fScaleX, fScaleY ); - aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); + aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ); + aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); } - nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y(); + nMoveX = aDestPt.X() - aSrcPt.X(); + nMoveY = aDestPt.Y() - aSrcPt.Y(); if( nMoveX || nMoveY ) aTmpMtf.Move( nMoveX, nMoveY ); diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 79f56f0fa09d..46464ac7c7e1 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -1581,10 +1581,12 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) if( fScaleX != 1.0 || fScaleY != 1.0 ) { aTmpMtf.Scale( fScaleX, fScaleY ); - aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); + aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ); + aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); } - nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y(); + nMoveX = aDestPt.X() - aSrcPt.X(); + nMoveY = aDestPt.Y() - aSrcPt.Y(); if( nMoveX || nMoveY ) aTmpMtf.Move( nMoveX, nMoveY ); diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 257eaa43ea40..5d08e16aa8ff 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -2027,7 +2027,8 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, while( nPixNew < nTest ) { - nB++, nPixOld = nPixNew; + nB++; + nPixOld = nPixNew; for( long nR = nR1; nR <= nR2; nR++ ) for( long nG = nG1; nG <= nG2; nG++ ) nPixNew += pBuf[ RGB15( nR, nG, nB ) ]; @@ -2050,7 +2051,8 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, while( nPixNew < nTest ) { - nG++, nPixOld = nPixNew; + nG++; + nPixOld = nPixNew; for( long nR = nR1; nR <= nR2; nR++ ) for( long nB = nB1; nB <= nB2; nB++ ) nPixNew += pBuf[ RGB15( nR, nG, nB ) ]; @@ -2073,7 +2075,8 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, while( nPixNew < nTest ) { - nR++, nPixOld = nPixNew; + nR++; + nPixOld = nPixNew; for( long nG = nG1; nG <= nG2; nG++ ) for( long nB = nB1; nB <= nB2; nB++ ) nPixNew += pBuf[ RGB15( nR, nG, nB ) ]; diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx index f40ab4bddf0b..d5b190e9728c 100644 --- a/vcl/source/gdi/bitmap4.cxx +++ b/vcl/source/gdi/bitmap4.cxx @@ -215,11 +215,23 @@ bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor ) if( ++nY < nHeight ) { if( pRowTmp1 == pColRow1 ) - pRowTmp1 = pColRow2, pRowTmp2 = pColRow3, pRowTmp3 = pColRow1; + { + pRowTmp1 = pColRow2; + pRowTmp2 = pColRow3; + pRowTmp3 = pColRow1; + } else if( pRowTmp1 == pColRow2 ) - pRowTmp1 = pColRow3, pRowTmp2 = pColRow1, pRowTmp3 = pColRow2; + { + pRowTmp1 = pColRow3; + pRowTmp2 = pColRow1; + pRowTmp3 = pColRow2; + } else - pRowTmp1 = pColRow1, pRowTmp2 = pColRow2, pRowTmp3 = pColRow3; + { + pRowTmp1 = pColRow1; + pRowTmp2 = pColRow2; + pRowTmp3 = pColRow3; + } for( i = 0; i < nWidth2; i++ ) pRowTmp3[ i ] = pReadAcc->GetColor( pRows[ nY + 2 ], pColm[ i ] ); @@ -311,17 +323,35 @@ bool Bitmap::ImplMedianFilter() { for( nX = 0; nX < nWidth; nX++ ) { - nR1 = ( pColor = pRowTmp1 + nX )->GetRed(), nG1 = pColor->GetGreen(), nB1 = pColor->GetBlue(); - nR2 = ( ++pColor )->GetRed(), nG2 = pColor->GetGreen(), nB2 = pColor->GetBlue(); - nR3 = ( ++pColor )->GetRed(), nG3 = pColor->GetGreen(), nB3 = pColor->GetBlue(); - - nR4 = ( pColor = pRowTmp2 + nX )->GetRed(), nG4 = pColor->GetGreen(), nB4 = pColor->GetBlue(); - nR5 = ( ++pColor )->GetRed(), nG5 = pColor->GetGreen(), nB5 = pColor->GetBlue(); - nR6 = ( ++pColor )->GetRed(), nG6 = pColor->GetGreen(), nB6 = pColor->GetBlue(); - - nR7 = ( pColor = pRowTmp3 + nX )->GetRed(), nG7 = pColor->GetGreen(), nB7 = pColor->GetBlue(); - nR8 = ( ++pColor )->GetRed(), nG8 = pColor->GetGreen(), nB8 = pColor->GetBlue(); - nR9 = ( ++pColor )->GetRed(), nG9 = pColor->GetGreen(), nB9 = pColor->GetBlue(); + nR1 = ( pColor = pRowTmp1 + nX )->GetRed(); + nG1 = pColor->GetGreen(); + nB1 = pColor->GetBlue(); + nR2 = ( ++pColor )->GetRed(); + nG2 = pColor->GetGreen(); + nB2 = pColor->GetBlue(); + nR3 = ( ++pColor )->GetRed(); + nG3 = pColor->GetGreen(); + nB3 = pColor->GetBlue(); + + nR4 = ( pColor = pRowTmp2 + nX )->GetRed(); + nG4 = pColor->GetGreen(); + nB4 = pColor->GetBlue(); + nR5 = ( ++pColor )->GetRed(); + nG5 = pColor->GetGreen(); + nB5 = pColor->GetBlue(); + nR6 = ( ++pColor )->GetRed(); + nG6 = pColor->GetGreen(); + nB6 = pColor->GetBlue(); + + nR7 = ( pColor = pRowTmp3 + nX )->GetRed(); + nG7 = pColor->GetGreen(); + nB7 = pColor->GetBlue(); + nR8 = ( ++pColor )->GetRed(); + nG8 = pColor->GetGreen(); + nB8 = pColor->GetBlue(); + nR9 = ( ++pColor )->GetRed(); + nG9 = pColor->GetGreen(); + nB9 = pColor->GetBlue(); MNMX6( nR1, nR2, nR3, nR4, nR5, nR6 ); MNMX5( nR7, nR2, nR3, nR4, nR5 ); @@ -345,11 +375,23 @@ bool Bitmap::ImplMedianFilter() if( ++nY < nHeight ) { if( pRowTmp1 == pColRow1 ) - pRowTmp1 = pColRow2, pRowTmp2 = pColRow3, pRowTmp3 = pColRow1; + { + pRowTmp1 = pColRow2; + pRowTmp2 = pColRow3; + pRowTmp3 = pColRow1; + } else if( pRowTmp1 == pColRow2 ) - pRowTmp1 = pColRow3, pRowTmp2 = pColRow1, pRowTmp3 = pColRow2; + { + pRowTmp1 = pColRow3; + pRowTmp2 = pColRow1; + pRowTmp3 = pColRow2; + } else - pRowTmp1 = pColRow1, pRowTmp2 = pColRow2, pRowTmp3 = pColRow3; + { + pRowTmp1 = pColRow1; + pRowTmp2 = pColRow2; + pRowTmp3 = pColRow3; + } for( i = 0; i < nWidth2; i++ ) pRowTmp3[ i ] = pReadAcc->GetColor( pRows[ nY + 2 ], pColm[ i ] ); diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index bfcafe184c9b..9547318ba680 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -564,7 +564,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r { if( !nShift ) { - nShift = 8L, + nShift = 8L; cTmp = *pTmp++; } @@ -590,7 +590,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r { if( !nShift ) { - nShift = 2UL, + nShift = 2UL; cTmp = *pTmp++; } diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 10d0e9294c12..4c586872fedd 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -692,14 +692,26 @@ bool GDIMetaFile::Mirror( BmpMirrorFlags nMirrorFlags ) bool bRet; if( nMirrorFlags & BmpMirrorFlags::Horizontal ) - nMoveX = SAL_ABS( aOldPrefSize.Width() ) - 1, fScaleX = -1.0; + { + nMoveX = SAL_ABS( aOldPrefSize.Width() ) - 1; + fScaleX = -1.0; + } else - nMoveX = 0, fScaleX = 1.0; + { + nMoveX = 0; + fScaleX = 1.0; + } if( nMirrorFlags & BmpMirrorFlags::Vertical ) - nMoveY = SAL_ABS( aOldPrefSize.Height() ) - 1, fScaleY = -1.0; + { + nMoveY = SAL_ABS( aOldPrefSize.Height() ) - 1; + fScaleY = -1.0; + } else - nMoveY = 0, fScaleY = 1.0; + { + nMoveY = 0; + fScaleY = 1.0; + } if( ( fScaleX != 1.0 ) || ( fScaleY != 1.0 ) ) { diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index b003198877de..5839d071b966 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -361,7 +361,10 @@ sal_uInt8* ImpSwap::GetData() const xIStm.reset(); if( bError ) - delete[] pData, pData = nullptr; + { + delete[] pData; + pData = nullptr; + } } else pData = nullptr; diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index e12d49ee38e3..0d05aa7de5e5 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -1233,7 +1233,8 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData ) if ( mnIndex + mnLen > maStr.getLength() ) { mnIndex = 0; - delete[] mpDXAry, mpDXAry = nullptr; + delete[] mpDXAry; + mpDXAry = nullptr; } } } @@ -3196,7 +3197,8 @@ void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 { if ( nDataSize && pData ) { - mnDataSize = nDataSize, mpData = new sal_uInt8[ mnDataSize ]; + mnDataSize = nDataSize; + mpData = new sal_uInt8[ mnDataSize ]; memcpy( mpData, pData, mnDataSize ); } else diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 1077d68a5742..b4ce854c4a28 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -424,7 +424,10 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint ) // release write access of the bitmaps if ( mpAcc ) - Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr; + { + Bitmap::ReleaseAccess( mpAcc ); + mpAcc = nullptr; + } if ( mpMaskAcc ) { @@ -1101,7 +1104,10 @@ void PNGReaderImpl::ImplApplyFilter() npc =-npc; if( npa > npb ) - na = nb, npa = npb; + { + na = nb; + npa = npb; + } if( npa > npc ) na = nc; diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx index a5b62c284adb..759c0121a62d 100644 --- a/vcl/source/gdi/regionband.cxx +++ b/vcl/source/gdi/regionband.cxx @@ -490,7 +490,10 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi if ( nD < 0L ) nD += nDY2; else - nD += nDYX, nY += nYInc; + { + nD += nDYX; + nY += nYInc; + } } } else @@ -506,7 +509,10 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi if ( nD < 0L ) nD += nDY2; else - nD += nDYX, nX += nXInc; + { + nD += nDYX; + nX += nXInc; + } } } diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx index 1754a9a905b6..b7abeb466a96 100644 --- a/vcl/source/gdi/salmisc.cxx +++ b/vcl/source/gdi/salmisc.cxx @@ -431,7 +431,10 @@ BitmapBuffer* StretchAndConvert( Scanline pTmpScan; long nOffset; if( BMP_SCANLINE_ADJUSTMENT( rSrcBuffer.mnFormat ) == BMP_FORMAT_TOP_DOWN ) - pTmpScan = rSrcBuffer.mpBits, nOffset = rSrcBuffer.mnScanlineSize; + { + pTmpScan = rSrcBuffer.mpBits; + nOffset = rSrcBuffer.mnScanlineSize; + } else { pTmpScan = rSrcBuffer.mpBits + ( rSrcBuffer.mnHeight - 1 ) * rSrcBuffer.mnScanlineSize; @@ -443,7 +446,10 @@ BitmapBuffer* StretchAndConvert( // destination scanline buffer if( BMP_SCANLINE_ADJUSTMENT( pDstBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) - pTmpScan = pDstBuffer->mpBits, nOffset = pDstBuffer->mnScanlineSize; + { + pTmpScan = pDstBuffer->mpBits; + nOffset = pDstBuffer->mnScanlineSize; + } else { pTmpScan = pDstBuffer->mpBits + ( pDstBuffer->mnHeight - 1 ) * pDstBuffer->mnScanlineSize; diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index 150590a5dcfe..bfa97a6a863b 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -2265,10 +2265,12 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, if( fScaleX != 1.0 || fScaleY != 1.0 ) { aMtf.Scale( fScaleX, fScaleY ); - aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); + aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ); + aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); } - nMoveX = rPos.X() - aSrcPt.X(), nMoveY = rPos.Y() - aSrcPt.Y(); + nMoveX = rPos.X() - aSrcPt.X(); + nMoveY = rPos.Y() - aSrcPt.Y(); if( nMoveX || nMoveY ) aMtf.Move( nMoveX, nMoveY ); diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index b6b1ce5db7f9..b36ca699679c 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -395,7 +395,8 @@ void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr, MenuItemBits nIt NbcInsertItem(nItemId, nItemBits, rStr, this, nPos, rIdent); vcl::Window* pWin = ImplGetWindow(); - delete mpLayoutData, mpLayoutData = nullptr; + delete mpLayoutData; + mpLayoutData = nullptr; if ( pWin ) { ImplCalcSize( pWin ); @@ -522,7 +523,8 @@ void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos ) } IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE*>(GetClassRes()) ) ); } - delete mpLayoutData, mpLayoutData = nullptr; + delete mpLayoutData; + mpLayoutData = nullptr; } void Menu::InsertItem(const OUString& rCommand, const css::uno::Reference<css::frame::XFrame>& rFrame, @@ -559,7 +561,8 @@ void Menu::InsertSeparator(const OString &rIdent, sal_uInt16 nPos) if( ImplGetSalMenu() && pData && pData->pSalMenuItem ) ImplGetSalMenu()->InsertItem( pData->pSalMenuItem, nPos ); - delete mpLayoutData, mpLayoutData = nullptr; + delete mpLayoutData; + mpLayoutData = nullptr; ImplCallEventListeners( VCLEVENT_MENU_INSERTITEM, nPos ); } @@ -585,7 +588,8 @@ void Menu::RemoveItem( sal_uInt16 nPos ) if ( pWin->IsVisible() ) pWin->Invalidate(); } - delete mpLayoutData, mpLayoutData = nullptr; + delete mpLayoutData; + mpLayoutData = nullptr; if ( bRemove ) ImplCallEventListeners( VCLEVENT_MENU_REMOVEITEM, nPos ); @@ -1045,7 +1049,8 @@ void Menu::SetItemText( sal_uInt16 nItemId, const OUString& rStr ) ImplGetSalMenu()->SetItemText( nPos, pData->pSalMenuItem, rStr ); vcl::Window* pWin = ImplGetWindow(); - delete mpLayoutData, mpLayoutData = nullptr; + delete mpLayoutData; + mpLayoutData = nullptr; if (pWin && IsMenuBar()) { ImplCalcSize( pWin ); @@ -2288,7 +2293,8 @@ void Menu::RemoveDisabledEntries( bool bCheckPopups, bool bRemoveEmptyPopups ) if ( pItem->eType == MenuItemType::SEPARATOR ) RemoveItem( nLast ); } - delete mpLayoutData, mpLayoutData = nullptr; + delete mpLayoutData; + mpLayoutData = nullptr; } bool Menu::HasValidEntries( bool bCheckPopups ) @@ -2321,7 +2327,8 @@ void Menu::MenuBarKeyInput(const KeyEvent&) void Menu::ImplKillLayoutData() const { - delete mpLayoutData, mpLayoutData = nullptr; + delete mpLayoutData; + mpLayoutData = nullptr; } void Menu::ImplFillLayoutData() const @@ -2924,7 +2931,8 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangl if( pSFrom && pSFrom->IsMenuBar()) ((static_cast<MenuBarWindow*>(pSFrom->pWindow.get())))->SetMBWHideAccel(!(static_cast<MenuBarWindow*>(pSFrom->pWindow.get())->GetMBWMenuKey())); - delete mpLayoutData, mpLayoutData = nullptr; + delete mpLayoutData; + mpLayoutData = nullptr; ImplSVData* pSVData = ImplGetSVData(); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 7cca69c45099..a50978665cf6 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1393,18 +1393,30 @@ void PrintDialog::updateNupFromPages() if( nPages == 2 ) { if( bPortrait ) - nRows = 1, nCols = 2; + { + nRows = 1; + nCols = 2; + } else - nRows = 2, nCols = 1; + { + nRows = 2; + nCols = 1; + } } else if( nPages == 4 ) nRows = nCols = 2; else if( nPages == 6 ) { if( bPortrait ) - nRows = 2, nCols = 3; + { + nRows = 2; + nCols = 3; + } else - nRows = 3, nCols = 2; + { + nRows = 3; + nCols = 2; + } } else if( nPages == 9 ) nRows = nCols = 3; diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index cd8cbb5e9a46..e93b81dfca7c 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -325,14 +325,14 @@ void ImplWheelWindow::MouseMove( const MouseEvent& rMEvt ) { switch( eActStyle ) { - case( PointerStyle::AutoScrollN ): mnActDeltaX = +0L, mnActDeltaY = +1L; break; - case( PointerStyle::AutoScrollS ): mnActDeltaX = +0L, mnActDeltaY = -1L; break; - case( PointerStyle::AutoScrollW ): mnActDeltaX = +1L, mnActDeltaY = +0L; break; - case( PointerStyle::AutoScrollE ): mnActDeltaX = -1L, mnActDeltaY = +0L; break; - case( PointerStyle::AutoScrollNW ): mnActDeltaX = +1L, mnActDeltaY = +1L; break; - case( PointerStyle::AutoScrollNE ): mnActDeltaX = -1L, mnActDeltaY = +1L; break; - case( PointerStyle::AutoScrollSW ): mnActDeltaX = +1L, mnActDeltaY = -1L; break; - case( PointerStyle::AutoScrollSE ): mnActDeltaX = -1L, mnActDeltaY = -1L; break; + case( PointerStyle::AutoScrollN ): mnActDeltaX = +0L; mnActDeltaY = +1L; break; + case( PointerStyle::AutoScrollS ): mnActDeltaX = +0L; mnActDeltaY = -1L; break; + case( PointerStyle::AutoScrollW ): mnActDeltaX = +1L; mnActDeltaY = +0L; break; + case( PointerStyle::AutoScrollE ): mnActDeltaX = -1L; mnActDeltaY = +0L; break; + case( PointerStyle::AutoScrollNW ): mnActDeltaX = +1L; mnActDeltaY = +1L; break; + case( PointerStyle::AutoScrollNE ): mnActDeltaX = -1L; mnActDeltaY = +1L; break; + case( PointerStyle::AutoScrollSW ): mnActDeltaX = +1L; mnActDeltaY = -1L; break; + case( PointerStyle::AutoScrollSE ): mnActDeltaX = -1L; mnActDeltaY = -1L; break; default: break; diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx index eda878510b6f..40ec7a486215 100644 --- a/vcl/unx/generic/app/i18n_status.cxx +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -510,7 +510,10 @@ bool I18NStatus::exists() void I18NStatus::free() { if (g_pI18NStatusInstance) - delete g_pI18NStatusInstance, g_pI18NStatusInstance = nullptr; + { + delete g_pI18NStatusInstance; + g_pI18NStatusInstance = nullptr; + } } I18NStatus::I18NStatus() : diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index dcc92d3cc090..ed0eaf768797 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -313,8 +313,10 @@ void SalDisplay::doDestruct() if( IsDisplay() ) { - delete mpInputMethod, mpInputMethod = nullptr; - delete mpKbdExtension, mpKbdExtension = nullptr; + delete mpInputMethod; + mpInputMethod = nullptr; + delete mpKbdExtension; + mpKbdExtension = nullptr; for( size_t i = 0; i < m_aScreens.size(); i++ ) { diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 26ddf87a0cc6..44de6812d3b3 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -181,7 +181,10 @@ WMAdaptor* WMAdaptor::createWMAdaptor( SalDisplay* pSalDisplay ) // try a NetWM pAdaptor = new NetWMAdaptor( pSalDisplay ); if( ! pAdaptor->isValid() ) - delete pAdaptor, pAdaptor = nullptr; + { + delete pAdaptor; + pAdaptor = nullptr; + } #if OSL_DEBUG_LEVEL > 1 else fprintf( stderr, "WM supports extended WM hints\n" ); @@ -192,7 +195,10 @@ WMAdaptor* WMAdaptor::createWMAdaptor( SalDisplay* pSalDisplay ) { pAdaptor = new GnomeWMAdaptor( pSalDisplay ); if( ! pAdaptor->isValid() ) - delete pAdaptor, pAdaptor = nullptr; + { + delete pAdaptor; + pAdaptor = nullptr; + } #if OSL_DEBUG_LEVEL > 1 else fprintf( stderr, "WM supports GNOME WM hints\n" ); @@ -1305,7 +1311,10 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy // evaluate decoration flags if( nDecorationFlags & decoration_All ) - aHint.deco = 1, aHint.func = 1; + { + aHint.deco = 1; + aHint.func = 1; + } else { if( nDecorationFlags & decoration_Title ) @@ -1313,13 +1322,25 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy if( nDecorationFlags & decoration_Border ) aHint.deco |= 1L << 1; if( nDecorationFlags & decoration_Resize ) - aHint.deco |= 1L << 2, aHint.func |= 1L << 1; + { + aHint.deco |= 1L << 2; + aHint.func |= 1L << 1; + } if( nDecorationFlags & decoration_MinimizeBtn ) - aHint.deco |= 1L << 5, aHint.func |= 1L << 3; + { + aHint.deco |= 1L << 5; + aHint.func |= 1L << 3; + } if( nDecorationFlags & decoration_MaximizeBtn ) - aHint.deco |= 1L << 6, aHint.func |= 1L << 4; + { + aHint.deco |= 1L << 6; + aHint.func |= 1L << 4; + } if( nDecorationFlags & decoration_CloseBtn ) - aHint.deco |= 1L << 4, aHint.func |= 1L << 5; + { + aHint.deco |= 1L << 4; + aHint.func |= 1L << 5; + } } // evaluate window type switch( eType ) diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx index 8d3bdee36c0d..daf538c696d9 100644 --- a/vcl/unx/generic/dtrans/bmp.cxx +++ b/vcl/unx/generic/dtrans/bmp.cxx @@ -651,9 +651,15 @@ Pixmap PixmapHolder::setBitmapData( const sal_uInt8* pData ) sal_uInt32 nHeight = readLE32( pData+8 ); if( m_aPixmap != None ) - XFreePixmap( m_pDisplay, m_aPixmap ), m_aPixmap = None; + { + XFreePixmap( m_pDisplay, m_aPixmap ); + m_aPixmap = None; + } if( m_aBitmap != None ) - XFreePixmap( m_pDisplay, m_aBitmap ), m_aBitmap = None; + { + XFreePixmap( m_pDisplay, m_aBitmap ); + m_aBitmap = None; + } m_aPixmap = limitXCreatePixmap( m_pDisplay, RootWindow( m_pDisplay, m_aInfo.screen ), diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index db1edd8bee37..9203e042b533 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -248,19 +248,28 @@ XID X11SalGraphicsImpl::GetXRenderPicture() return mrParent.m_aXRenderPicture; } +static void freeGC(Display *pDisplay, GC& rGC) +{ + if( rGC ) + { + XFreeGC( pDisplay, rGC ); + rGC = None; + } +} + void X11SalGraphicsImpl::freeResources() { Display *pDisplay = mrParent.GetXDisplay(); - if( mpPenGC ) XFreeGC( pDisplay, mpPenGC ), mpPenGC = None; - if( mpBrushGC ) XFreeGC( pDisplay, mpBrushGC ), mpBrushGC = None; - if( mpMonoGC ) XFreeGC( pDisplay, mpMonoGC ), mpMonoGC = None; - if( mpTrackingGC ) XFreeGC( pDisplay, mpTrackingGC ), mpTrackingGC = None; - if( mpCopyGC ) XFreeGC( pDisplay, mpCopyGC ), mpCopyGC = None; - if( mpMaskGC ) XFreeGC( pDisplay, mpMaskGC ), mpMaskGC = None; - if( mpInvertGC ) XFreeGC( pDisplay, mpInvertGC ), mpInvertGC = None; - if( mpInvert50GC ) XFreeGC( pDisplay, mpInvert50GC ), mpInvert50GC = None; - if( mpStippleGC ) XFreeGC( pDisplay, mpStippleGC ), mpStippleGC = None; + freeGC( pDisplay, mpPenGC ); + freeGC( pDisplay, mpBrushGC ); + freeGC( pDisplay, mpMonoGC ); + freeGC( pDisplay, mpTrackingGC ); + freeGC( pDisplay, mpCopyGC ); + freeGC( pDisplay, mpMaskGC ); + freeGC( pDisplay, mpInvertGC ); + freeGC( pDisplay, mpInvert50GC ); + freeGC( pDisplay, mpStippleGC ); mbTrackingGC = mbPenGC = mbBrushGC = mbMonoGC = mbCopyGC = mbInvertGC = mbInvert50GC = mbStippleGC = false; } @@ -609,7 +618,8 @@ void X11SalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, SalTwoRect aPosAry( rPosAry ); - aPosAry.mnSrcX = 0, aPosAry.mnSrcY = 0; + aPosAry.mnSrcX = 0; + aPosAry.mnSrcY = 0; drawBitmap( aPosAry, *xDDB ); } else { @@ -713,7 +723,9 @@ void X11SalGraphicsImpl::drawMaskedBitmap( const SalTwoRect& rPosAry, DBG_TESTTRANS( aBG ); // mask out paint bitmap in pixmap #1 (transparent areas 0) - aValues.function = GXand, aValues.foreground = 0x00000000, aValues.background = 0xffffffff; + aValues.function = GXand; + aValues.foreground = 0x00000000; + aValues.background = 0xffffffff; XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); static_cast<const X11SalBitmap&>(rTransBitmap).ImplDraw( aFG, mrParent.m_nXScreen, 1, aTmpRect, aTmpGC ); @@ -723,7 +735,9 @@ void X11SalGraphicsImpl::drawMaskedBitmap( const SalTwoRect& rPosAry, if( !mbXORMode ) { // mask out background in pixmap #2 (nontransparent areas 0) - aValues.function = GXand, aValues.foreground = 0xffffffff, aValues.background = 0x00000000; + aValues.function = GXand; + aValues.foreground = 0xffffffff; + aValues.background = 0x00000000; XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); static_cast<const X11SalBitmap&>(rTransBitmap).ImplDraw( aBG, mrParent.m_nXScreen, 1, aTmpRect, aTmpGC ); @@ -731,7 +745,9 @@ void X11SalGraphicsImpl::drawMaskedBitmap( const SalTwoRect& rPosAry, } // merge pixmap #1 and pixmap #2 in pixmap #2 - aValues.function = GXxor, aValues.foreground = 0xffffffff, aValues.background = 0x00000000; + aValues.function = GXxor; + aValues.foreground = 0xffffffff; + aValues.background = 0x00000000; XChangeGC( pXDisp, aTmpGC, nValues, &aValues ); XCopyArea( pXDisp, aFG, aBG, aTmpGC, 0, 0, @@ -965,7 +981,8 @@ void X11SalGraphicsImpl::drawMask( const SalTwoRect& rPosAry, // create a stipple bitmap first (set bits are changed to unset bits and vice versa) aValues.function = GXcopyInverted; - aValues.foreground = 1, aValues.background = 0; + aValues.foreground = 1; + aValues.background = 0; aTmpGC = XCreateGC( pXDisp, aStipple, GCFunction | GCForeground | GCBackground, &aValues ); static_cast<const X11SalBitmap&>(rSalBitmap).ImplDraw( aStipple, mrParent.m_nXScreen, 1, aTwoRect, aTmpGC ); diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx index e9833d3d6869..d18fa7261ec7 100644 --- a/vcl/unx/generic/gdi/salbmp.cxx +++ b/vcl/unx/generic/gdi/salbmp.cxx @@ -86,13 +86,19 @@ void X11SalBitmap::ImplDestroyCache() DBG_ASSERT( mnCacheInstCount, "X11SalBitmap::ImplDestroyCache(): underflow" ); if( mnCacheInstCount && !--mnCacheInstCount ) - delete mpCache, mpCache = nullptr; + { + delete mpCache; + mpCache = nullptr; + } } void X11SalBitmap::ImplRemovedFromCache() { if( mpDDB ) - delete mpDDB, mpDDB = nullptr; + { + delete mpDDB; + mpDDB = nullptr; + } } #if defined HAVE_VALGRIND_HEADERS @@ -607,7 +613,8 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB( mbGrey ); } - delete mpDDB, const_cast<X11SalBitmap*>(this)->mpDDB = nullptr; + delete mpDDB; + const_cast<X11SalBitmap*>(this)->mpDDB = nullptr; } if( mpCache ) @@ -670,7 +677,8 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB( if( pImage ) { const_cast<X11SalBitmap*>(this)->mpDDB = new ImplSalDDB( pImage, aDrawable, nXScreen, aTwoRect ); - delete[] pImage->data, pImage->data = nullptr; + delete[] pImage->data; + pImage->data = nullptr; XDestroyImage( pImage ); if( mpCache ) @@ -794,11 +802,15 @@ void X11SalBitmap::Destroy() if( mpDIB ) { delete[] mpDIB->mpBits; - delete mpDIB, mpDIB = nullptr; + delete mpDIB; + mpDIB = nullptr; } if( mpDDB ) - delete mpDDB, mpDDB = nullptr; + { + delete mpDDB; + mpDDB = nullptr; + } if( mpCache ) mpCache->ImplRemove( this ); @@ -809,9 +821,15 @@ Size X11SalBitmap::GetSize() const Size aSize; if( mpDIB ) - aSize.Width() = mpDIB->mnWidth, aSize.Height() = mpDIB->mnHeight; + { + aSize.Width() = mpDIB->mnWidth; + aSize.Height() = mpDIB->mnHeight; + } else if( mpDDB ) - aSize.Width() = mpDDB->ImplGetWidth(), aSize.Height() = mpDDB->ImplGetHeight(); + { + aSize.Width() = mpDDB->ImplGetWidth(); + aSize.Height() = mpDDB->ImplGetHeight(); + } return aSize; } @@ -853,7 +871,10 @@ void X11SalBitmap::ReleaseBuffer( BitmapBuffer*, BitmapAccessMode nMode ) if( nMode == BITMAP_WRITE_ACCESS ) { if( mpDDB ) - delete mpDDB, mpDDB = nullptr; + { + delete mpDDB; + mpDDB = nullptr; + } if( mpCache ) mpCache->ImplRemove( this ); @@ -908,7 +929,8 @@ ImplSalDDB::ImplSalDDB( XImage* pImage, Drawable aDrawable, if( 1 == mnDepth ) { nValues |= ( GCForeground | GCBackground ); - aValues.foreground = 1, aValues.background = 0; + aValues.foreground = 1; + aValues.background = 0; } aGC = XCreateGC( pXDisp, maPixmap, nValues, &aValues ); @@ -943,7 +965,8 @@ ImplSalDDB::ImplSalDDB( if( 1 == mnDepth ) { nValues |= ( GCForeground | GCBackground ); - aValues.foreground = 1, aValues.background = 0; + aValues.foreground = 1; + aValues.background = 0; } aGC = XCreateGC( pXDisp, maPixmap, nValues, &aValues ); @@ -1080,7 +1103,8 @@ void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uLong nMemSize, sal_uL if( bFound ) { mnTotalSize -= pObj->mnMemSize; - pObj->mnMemSize = nMemSize, pObj->mnFlags = nFlags; + pObj->mnMemSize = nMemSize; + pObj->mnFlags = nFlags; } else maBmpList.push_back( new ImplBmpObj( pBmp, nMemSize, nFlags ) ); diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 1a0e34e53b9c..d72873b68abb 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -112,17 +112,34 @@ void X11SalGraphics::freeResources() Display *pDisplay = GetXDisplay(); DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" ); - if( mpClipRegion ) XDestroyRegion( mpClipRegion ), mpClipRegion = None; + if( mpClipRegion ) + { + XDestroyRegion( mpClipRegion ); + mpClipRegion = None; + } mxImpl->freeResources(); - if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None; - if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ), pFontGC_ = None; + if( hBrush_ ) + { + XFreePixmap( pDisplay, hBrush_ ); + hBrush_ = None; + } + if( pFontGC_ ) + { + XFreeGC( pDisplay, pFontGC_ ); + pFontGC_ = None; + } if( m_pDeleteColormap ) - delete m_pDeleteColormap, m_pColormap = m_pDeleteColormap = nullptr; - + { + delete m_pDeleteColormap; + m_pColormap = m_pDeleteColormap = nullptr; + } if( m_aXRenderPicture ) - XRenderPeer::GetInstance().FreePicture( m_aXRenderPicture ), m_aXRenderPicture = 0; + { + XRenderPeer::GetInstance().FreePicture( m_aXRenderPicture ); + m_aXRenderPicture = 0; + } bFontGC_ = false; } diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index a6c7cdbf8fe0..e25a2e0d31f7 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -950,7 +950,9 @@ void ServerFont::InitGlyphData( sal_GlyphId aGlyphId, GlyphData& rGD ) const FT_Glyph_Get_CBox( pGlyphFT, FT_GLYPH_BBOX_PIXELS, &aBbox ); if( aBbox.yMin > aBbox.yMax ) // circumvent freetype bug { - int t=aBbox.yMin; aBbox.yMin=aBbox.yMax, aBbox.yMax=t; + int t=aBbox.yMin; + aBbox.yMin=aBbox.yMax; + aBbox.yMax=t; } rGD.SetOffset( aBbox.xMin, -aBbox.yMax ); @@ -1265,7 +1267,8 @@ bool ServerFont::GetGlyphOutline( sal_GlyphId aGlyphId, { FT_Matrix aMatrix; aMatrix.xx = aMatrix.yy = 0x10000L; - aMatrix.xy = 0x6000L, aMatrix.yx = 0; + aMatrix.xy = 0x6000L; + aMatrix.yx = 0; FT_Glyph_Transform( pGlyphFT, &aMatrix, nullptr ); } diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index f5a20a4f1346..6c7e795a8db7 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -332,13 +332,15 @@ void PPDDecompressStream::Open( const OUString& i_rFile ) if( nComp < 0 ) { // decompression failed, must be an uncompressed stream after all - delete mpMemStream, mpMemStream = nullptr; + delete mpMemStream; + mpMemStream = nullptr; mpFileStream->Seek( 0 ); } else { // compression successful, can get rid of file stream - delete mpFileStream, mpFileStream = nullptr; + delete mpFileStream; + mpFileStream = nullptr; mpMemStream->Seek( 0 ); } } @@ -346,8 +348,10 @@ void PPDDecompressStream::Open( const OUString& i_rFile ) void PPDDecompressStream::Close() { - delete mpMemStream, mpMemStream = nullptr; - delete mpFileStream, mpFileStream = nullptr; + delete mpMemStream; + mpMemStream = nullptr; + delete mpFileStream; + mpFileStream = nullptr; } bool PPDDecompressStream::IsOpen() const diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx index a20e1d25a7d3..c61a04c52aa4 100644 --- a/vcl/unx/generic/printer/printerinfomanager.cxx +++ b/vcl/unx/generic/printer/printerinfomanager.cxx @@ -840,7 +840,8 @@ const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::get { m_aSystemPrintCommand = m_pQueueInfo->getCommand(); m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues ); - delete m_pQueueInfo, m_pQueueInfo = nullptr; + delete m_pQueueInfo; + m_pQueueInfo = nullptr; } return m_aSystemPrintQueues; |