[Libreoffice-commits] .: 5 commits - comphelper/source toolkit/source vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Sat Nov 27 04:49:21 PST 2010


 comphelper/source/container/IndexedPropertyValuesContainer.cxx |   16 +++++-----
 toolkit/source/layout/core/flow.cxx                            |   10 +++---
 toolkit/source/layout/core/table.cxx                           |   12 +++----
 toolkit/source/layout/core/timer.cxx                           |    8 ++---
 vcl/source/control/tabctrl.cxx                                 |    2 -
 vcl/source/gdi/image.cxx                                       |    2 -
 6 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit 15c8e9e9894882524936c7fffdaf5243b06934be
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 27 12:40:28 2010 +0000

    cppcheck: use prefix form

diff --git a/toolkit/source/layout/core/table.cxx b/toolkit/source/layout/core/table.cxx
index d724c8c..c8258b8 100644
--- a/toolkit/source/layout/core/table.cxx
+++ b/toolkit/source/layout/core/table.cxx
@@ -125,7 +125,7 @@ Table::getMinimumSize() throw( uno::RuntimeException )
         int col = 0;
         int row = 0;
         for ( std::list<Box_Base::ChildData *>::iterator it
-                  = maChildren.begin(); it != maChildren.end(); it++ )
+                  = maChildren.begin(); it != maChildren.end(); ++it )
         {
             ChildData *child = static_cast<Table::ChildData*> ( *it );
             if ( !child->isVisible() )
@@ -172,7 +172,7 @@ Table::getMinimumSize() throw( uno::RuntimeException )
 
         // 2.1 base sizes on one-column/row children
         for ( std::list<Box_Base::ChildData *>::iterator it
-                  = maChildren.begin(); it != maChildren.end(); it++ )
+                  = maChildren.begin(); it != maChildren.end(); ++it )
         {
             ChildData *child = static_cast<Table::ChildData*> ( *it );
             if ( !child->isVisible() )
@@ -195,7 +195,7 @@ Table::getMinimumSize() throw( uno::RuntimeException )
 
         // 2.2 make sure multiple-columns/rows children fit
         for ( std::list<Box_Base::ChildData *>::iterator it
-                  = maChildren.begin(); it != maChildren.end(); it++ )
+                  = maChildren.begin(); it != maChildren.end(); ++it )
         {
             ChildData *child = static_cast<Table::ChildData*> ( *it );
             if ( !child->isVisible() )
@@ -237,14 +237,14 @@ Table::getMinimumSize() throw( uno::RuntimeException )
     mnColExpandables =( mnRowExpandables = 0 );
     maRequisition.Width =( maRequisition.Height = 0 );
     for ( std::vector<GroupData>::iterator it = maCols.begin();
-          it != maCols.end(); it++ )
+          it != maCols.end(); ++it )
     {
         maRequisition.Width += it->mnSize;
         if ( it->mbExpand )
             mnColExpandables++;
     }
     for ( std::vector<GroupData>::iterator it = maRows.begin();
-          it != maRows.end(); it++ )
+          it != maRows.end(); ++it )
     {
         maRequisition.Height += it->mnSize;
         if ( it->mbExpand )
@@ -269,7 +269,7 @@ Table::allocateArea( const awt::Rectangle &rArea )
     nExtraSize[ 1 ] /= mnRowExpandables ? mnRowExpandables : maRows.size();
 
     for ( std::list<Box_Base::ChildData *>::const_iterator it
-              = maChildren.begin(); it != maChildren.end(); it++ )
+              = maChildren.begin(); it != maChildren.end(); ++it )
     {
         ChildData *child = static_cast<Table::ChildData*> ( *it );
         if ( !child->isVisible() )
diff --git a/toolkit/source/layout/core/timer.cxx b/toolkit/source/layout/core/timer.cxx
index 1749a9a..da95988 100644
--- a/toolkit/source/layout/core/timer.cxx
+++ b/toolkit/source/layout/core/timer.cxx
@@ -70,7 +70,7 @@ public:
             if ( it != jt && isParentOf( *it, *jt ) )
                 jt = list.erase( jt );
             else
-                jt++;
+                ++jt;
         }
     }
 
@@ -98,12 +98,12 @@ public:
 
         // 1. remove duplications and children
         for ( ContainerList::iterator it = mxContainers.begin();
-             it != mxContainers.end(); it++ )
+             it != mxContainers.end(); ++it )
             eraseChildren( it, mxContainers );
 
         // 2. check damage extent
         for ( ContainerList::iterator it = mxContainers.begin();
-             it != mxContainers.end(); it++ )
+             it != mxContainers.end(); ++it )
         {
             uno::Reference< awt::XLayoutContainer > xContainer = *it;
             while ( xContainer->getParent().is() && isContainerDamaged( xContainer ) )
@@ -124,7 +124,7 @@ public:
 
         // 3. force re-calculations
         for ( ContainerList::iterator it = mxContainers.begin();
-             it != mxContainers.end(); it++ )
+             it != mxContainers.end(); ++it )
             (*it)->allocateArea( (*it)->getAllocatedArea() );
     }
 };
commit f39cd5afc2d020ee768967f35c1c92d72b78023b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 27 12:22:13 2010 +0000

    cppcheck: use prefix form

diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index 47c77da..db4cfdb 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -797,7 +797,7 @@ Image ImageList::GetImage( USHORT nId ) const
     {
         std::vector<ImageAryData *>::iterator aIter;
         for( aIter = mpImplData->maImages.begin();
-             aIter != mpImplData->maImages.end(); aIter++)
+             aIter != mpImplData->maImages.end(); ++aIter)
         {
             if ((*aIter)->mnId == nId)
             {
commit 278f2bc44bc53f814d387c79f804bf1a86051b6c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 27 12:19:46 2010 +0000

    cppcheck: use prefix form

diff --git a/toolkit/source/layout/core/flow.cxx b/toolkit/source/layout/core/flow.cxx
index d772f7c..b12d667 100644
--- a/toolkit/source/layout/core/flow.cxx
+++ b/toolkit/source/layout/core/flow.cxx
@@ -79,7 +79,7 @@ Flow::removeChild( const css::uno::Reference< css::awt::XLayoutConstrains >& xCh
     throw (css::uno::RuntimeException)
 {
     for ( std::list< ChildData * >::iterator it = maChildren.begin();
-          it != maChildren.end(); it++ )
+          it != maChildren.end(); ++it )
     {
         if ( (*it)->xChild == xChild )
         {
@@ -100,7 +100,7 @@ Flow::getChildren()
     uno::Sequence< uno::Reference< awt::XLayoutConstrains > > children( maChildren.size() );
     unsigned int i = 0;
     for ( std::list< ChildData * >::iterator it = maChildren.begin();
-          it != maChildren.end(); it++, i++ )
+          it != maChildren.end(); ++it, ++i )
         children[i] = (*it)->xChild;
 
     return children;
@@ -121,7 +121,7 @@ Flow::calculateSize( long nMaxWidth )
     std::list<ChildData *>::const_iterator it;
     mnEachWidth = 0;
     // first pass, for homogeneous property
-    for (it = maChildren.begin(); it != maChildren.end(); it++)
+    for (it = maChildren.begin(); it != maChildren.end(); ++it)
     {
         if ( !(*it)->isVisible() )
             continue;
@@ -131,7 +131,7 @@ Flow::calculateSize( long nMaxWidth )
     }
 
     long nRowWidth = 0, nRowHeight = 0;
-    for (it = maChildren.begin(); it != maChildren.end(); it++)
+    for (it = maChildren.begin(); it != maChildren.end(); ++it)
     {
         if ( !(*it)->isVisible() )
             continue;
@@ -182,7 +182,7 @@ Flow::allocateArea( const css::awt::Rectangle &rArea )
 
     std::list<ChildData *>::const_iterator it;
     long nX = 0, nY = 0, nRowHeight = 0;
-    for (it = maChildren.begin(); it != maChildren.end(); it++)
+    for (it = maChildren.begin(); it != maChildren.end(); ++it)
     {
         ChildData *child = *it;
         if ( !child->isVisible() )
commit 4d88394b85b21111210585308f94678a329c1fc3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 27 11:09:16 2010 +0000

    cppcheck: use prefix form

diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
index 6687488..407899f 100644
--- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
@@ -121,8 +121,8 @@ void SAL_CALL IndexedPropertyValuesContainer::insertByIndex( sal_Int32 nIndex, c
                 sal_Int32 i(0);
                 while(i < nIndex)
                 {
-                    i++;
-                    aItr++;
+                    ++i;
+                    ++aItr;
                 }
             }
             else
@@ -131,8 +131,8 @@ void SAL_CALL IndexedPropertyValuesContainer::insertByIndex( sal_Int32 nIndex, c
                 sal_Int32 i(nSize - 1);
                 while(i > nIndex)
                 {
-                    i--;
-                    aItr--;
+                    --i;
+                    --aItr;
                 }
             }
             maProperties.insert(aItr, aProps);
@@ -156,8 +156,8 @@ void SAL_CALL IndexedPropertyValuesContainer::removeByIndex( sal_Int32 nIndex )
             sal_Int32 i(0);
             while(i < nIndex)
             {
-                i++;
-                aItr++;
+                ++i;
+                ++aItr;
             }
         }
         else
@@ -166,8 +166,8 @@ void SAL_CALL IndexedPropertyValuesContainer::removeByIndex( sal_Int32 nIndex )
             sal_Int32 i(nSize - 1);
             while(i > nIndex)
             {
-                i--;
-                aItr--;
+                --i;
+                --aItr;
             }
         }
         maProperties.erase(aItr);
commit af9cb859669a85187060a4dbec588c4811fbe390
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 27 10:55:15 2010 +0000

    cppcheck: the scope of this variable can be reduced

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index fe497f2..986901a 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1217,7 +1217,6 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
     // Draw the TabPage border
     const StyleSettings&    rStyleSettings  = GetSettings().GetStyleSettings();
     Rectangle               aCurRect;
-    long                    nTopOff = 1;
     aRect.Left()   -= TAB_OFFSET;
     aRect.Top()    -= TAB_OFFSET;
     aRect.Right()  += TAB_OFFSET;
@@ -1259,6 +1258,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
     }
     else
     {
+        long nTopOff = 1;
         if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
             SetLineColor( rStyleSettings.GetLightColor() );
         else


More information about the Libreoffice-commits mailing list