[Libreoffice-commits] core.git: vcl/headless vcl/source vcl/unx

Noel Grandin noel at peralex.com
Mon Feb 22 13:39:06 UTC 2016


 vcl/headless/svpbmp.cxx                        |    8 +-
 vcl/source/app/svdata.cxx                      |   25 ++++++--
 vcl/source/app/svmain.cxx                      |   15 +++-
 vcl/source/control/ctrl.cxx                    |    3 
 vcl/source/edit/textdoc.cxx                    |    2 
 vcl/source/filter/graphicfilter.cxx            |    3 
 vcl/source/filter/ixbm/xbmread.cxx             |    8 +-
 vcl/source/filter/ixpm/xpmread.cxx             |   21 +++++-
 vcl/source/filter/wmf/emfwr.cxx                |    6 +
 vcl/source/filter/wmf/wmfwr.cxx                |    6 +
 vcl/source/gdi/bitmap3.cxx                     |    9 +-
 vcl/source/gdi/bitmap4.cxx                     |   76 +++++++++++++++++++------
 vcl/source/gdi/dibtools.cxx                    |    4 -
 vcl/source/gdi/gdimtf.cxx                      |   20 +++++-
 vcl/source/gdi/gfxlink.cxx                     |    5 +
 vcl/source/gdi/metaact.cxx                     |    6 +
 vcl/source/gdi/pngread.cxx                     |   10 ++-
 vcl/source/gdi/regionband.cxx                  |   10 ++-
 vcl/source/gdi/salmisc.cxx                     |   10 ++-
 vcl/source/gdi/svmconverter.cxx                |    6 +
 vcl/source/window/menu.cxx                     |   24 +++++--
 vcl/source/window/printdlg.cxx                 |   20 +++++-
 vcl/source/window/scrwnd.cxx                   |   16 ++---
 vcl/unx/generic/app/i18n_status.cxx            |    5 +
 vcl/unx/generic/app/saldisp.cxx                |    6 +
 vcl/unx/generic/app/wmadaptor.cxx              |   35 +++++++++--
 vcl/unx/generic/dtrans/bmp.cxx                 |   10 ++-
 vcl/unx/generic/gdi/gdiimpl.cxx                |   45 ++++++++++----
 vcl/unx/generic/gdi/salbmp.cxx                 |   48 +++++++++++----
 vcl/unx/generic/gdi/salgdi.cxx                 |   29 +++++++--
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |    7 +-
 vcl/unx/generic/printer/ppdparser.cxx          |   12 ++-
 vcl/unx/generic/printer/printerinfomanager.cxx |    3 
 33 files changed, 381 insertions(+), 132 deletions(-)

New commits:
commit 84db33a4569c67c0164b85bd218246e1741f6815
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Feb 22 15:38:12 2016 +0200

    loplugin:commaoperator in vcl/
    
    Change-Id: Ia5bbce27d9e9526122ce1e27389c7845e6709f27

diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index 3f59cdd..68ea2f3 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 19c663a..dd34d10 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 1546bc3..5fdd268 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 f7e04c7..72ee594 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 edbfbad..84721c8 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 85b28dc7..0c8026d 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 b12aea3..d34076f 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 c456d4e..2622bf0 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 eb7864d..7f33702 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 79f56f0..46464ac 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 257eaa4..5d08e16 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 f40ab4b..d5b190e 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 bfcafe1..9547318 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 10d0e92..4c58687 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 b003198..5839d07 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 e12d49e..0d05aa7 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 1077d68..b4ce854 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 a5b62c2..759c012 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 1754a9a..b7abeb4 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 150590a..bfa97a6 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 b6b1ce5..b36ca69 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 7cca69c..a509786 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 cd8cbb5..e93b81d 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 eda8785..40ec7a4 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 dcc92d3..ed0eaf7 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 26ddf87..44de681 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 8d3bdee..daf538c 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 db1edd8..9203e04 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 e9833d3..d18fa72 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 1a0e34e..d72873b 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 a6c7cdb..e25a2e0 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 f5a20a4..6c7e795 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 a20e1d2..c61a04c 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;


More information about the Libreoffice-commits mailing list