[Libreoffice-commits] .: 2 commits - basctl/source forms/source

Caolán McNamara caolan at kemper.freedesktop.org
Sun Dec 19 08:44:38 PST 2010


 basctl/source/basicide/bastypes.cxx |    4 ++--
 forms/source/xforms/binding.cxx     |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 92af49f10a88ec1bf8aea1a5f17b8821e9d8abc7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 19 16:28:33 2010 +0000

    prefix prefix variant

diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx
index 853e429..4c08e36 100644
--- a/forms/source/xforms/binding.cxx
+++ b/forms/source/xforms/binding.cxx
@@ -580,7 +580,7 @@ void lcl_removeListenerFromNode( Reference<XNode> xNode,
     sal_Int32 nCount = 0; // count nodes for context position
     for( PathExpression::NodeVector_t::iterator aIter = aNodes.begin();
          aIter != aNodes.end();
-         aIter++, nCount++ )
+         ++aIter, ++nCount )
     {
         OSL_ENSURE( aIter->is(), "no node?" );
 
@@ -634,13 +634,13 @@ void Binding::bind( bool bForceRebind )
     {
         for( XNodes_t::iterator aIter = maEventNodes.begin();
              aIter != maEventNodes.end();
-             aIter ++ )
+             ++aIter )
             lcl_removeListenerFromNode( *aIter, this );
         maEventNodes.clear();
         if( isSimpleBinding() )
             for( PathExpression::NodeVector_t::iterator aIter = aNodes.begin();
                  aIter != aNodes.end();
-                 aIter++ )
+                 ++aIter )
                 maEventNodes.push_back( *aIter );
         else
             maEventNodes.push_back( 
@@ -648,7 +648,7 @@ void Binding::bind( bool bForceRebind )
                                   UNO_QUERY_THROW ) );
         for( PathExpression::NodeVector_t::iterator aIter2 = maEventNodes.begin();
              aIter2 != maEventNodes.end();
-             aIter2 ++ )
+             ++aIter2 )
             lcl_addListenerToNode( *aIter2, this );
     }
 
@@ -872,7 +872,7 @@ void Binding::clear()
     // remove all references
     for( XNodes_t::iterator aIter = maEventNodes.begin();
          aIter != maEventNodes.end();
-         aIter ++ )
+         ++aIter )
         lcl_removeListenerFromNode( *aIter, this );
     maEventNodes.clear();
 
commit 21e5de234d8fba461fad8efcdc2a80854186c40d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 19 16:22:15 2010 +0000

    cppcheck: the scope of this variable can be reduced

diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 6ca8151..aeb7b38 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -731,7 +731,6 @@ void BasicIDETabBar::Sort()
 void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines )
 {
     sal_Int32 nStartPos = 0;
-    sal_Int32 nEndPos = 0;
     sal_Int32 nLine = 0;
     while ( nLine < nStartLine )
     {
@@ -746,7 +745,8 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BO
 
     if ( nStartPos != -1 )
     {
-        nEndPos = nStartPos;
+        sal_Int32 nEndPos = nStartPos;
+
         for ( sal_Int32 i = 0; i < nLines; i++ )
             nEndPos = searchEOL( rStr, nEndPos+1 );
 


More information about the Libreoffice-commits mailing list