[Libreoffice-commits] core.git: 2 commits - sdext/source svl/source

Stephan Bergmann sbergman at redhat.com
Mon Feb 27 12:04:12 UTC 2017


 sdext/source/minimizer/configurationaccess.cxx     |    3 +--
 sdext/source/minimizer/optimizerdialogcontrols.cxx |   10 ++++------
 svl/source/numbers/zforlist.cxx                    |    5 ++---
 3 files changed, 7 insertions(+), 11 deletions(-)

New commits:
commit 5d84a5a591ff353fbd386be5f1f4192e5606897f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Feb 27 13:03:10 2017 +0100

    loplugin:loopvartoosmall
    
    Change-Id: I2e80e15ded19e09853ec16f9876e425a88cf910e

diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index c9dab53..9266c43 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -2800,7 +2800,6 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
         eLnge = IniLnge;
     }
     short eType = GetType(nIndex);
-    sal_uInt16 i;
     ImpGenerateCL(eLnge);           // create new standard formats if necessary
 
     utl::DigitGroupingIterator aGrouping( xLocaleData->getDigitGrouping());
@@ -2833,7 +2832,7 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
     }
     else
     {
-        for (i = 0; i < nLeadingZeros; i++)
+        for (sal_uInt16 i = 0; i < nLeadingZeros; i++)
         {
             if (bThousand && i > 0 && i == aGrouping.getPos())
             {
@@ -2845,7 +2844,7 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
         if ( bThousand )
         {
             sal_Int32 nDigits = (eType == css::util::NumberFormat::SCIENTIFIC) ?  3*((nLeadingZeros-1)/3 + 1) : nDigitsInFirstGroup + 1;
-            for (i = nLeadingZeros; i < nDigits; i++)
+            for (sal_Int32 i = nLeadingZeros; i < nDigits; i++)
             {
                 if ( i % nDigitsInFirstGroup == 0 )
                     sString.insert(0, rThSep);
commit 36a5d940e7b95cf96e23bcd6dc70c28ce52db2b1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Feb 27 13:02:26 2017 +0100

    loplugin:loopvartoosmall
    
    Change-Id: Id2771f413798ed9ceb76e9c4dd3113633d4e481e

diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index dd39419..efd9252 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -251,7 +251,6 @@ void ConfigurationAccess::SaveConfiguration()
         do
         {
             int i;
-            unsigned int k;
             Reference<util::XChangesBatch> xRoot( OpenConfiguration( false ), UNO_QUERY_THROW );
 
             // storing the last used settings
@@ -267,7 +266,7 @@ void ConfigurationAccess::SaveConfiguration()
             for( i = 0; i < aElements.getLength(); i++ )
                 xNameContainer->removeByName( aElements[ i ] );
 
-            for( k = 1; k < maSettings.size(); k++ )
+            for( std::vector<OptimizerSettings>::size_type k = 1; k < maSettings.size(); k++ )
             {
                 OptimizerSettings& rSettings( maSettings[ k ] );
                 OUString aElementName( "Template" + OUString::number( k ) );
diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx
index 45c54a9..647cbc3 100644
--- a/sdext/source/minimizer/optimizerdialogcontrols.cxx
+++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx
@@ -377,14 +377,13 @@ void OptimizerDialog::InitNavigationBar()
 
 void OptimizerDialog::UpdateControlStatesPage0()
 {
-    sal_uInt32 i;
     short nSelectedItem = -1;
     Sequence< OUString > aItemList;
     const std::vector< OptimizerSettings >& rList( GetOptimizerSettings() );
     if ( rList.size() > 1 ) // the first session in the list is the actual one -> skipping first one
     {
         aItemList.realloc( rList.size() - 1 );
-        for ( i = 1; i < rList.size(); i++ )
+        for ( std::vector<OptimizerSettings>::size_type i = 1; i < rList.size(); i++ )
         {
             aItemList[ i - 1 ] = rList[ i ].maName;
             if ( nSelectedItem < 0 )
@@ -598,13 +597,12 @@ void OptimizerDialog::UpdateControlStatesPage4()
     }
     setControlProperty( "ComboBox0Pg4", "Enabled", Any( false ) );
 
-    sal_uInt32 w;
     Sequence< OUString > aItemList;
     const std::vector< OptimizerSettings >& rList( GetOptimizerSettings() );
     if ( rList.size() > 1 ) // the first session in the list is the actual one -> skipping first one
     {
         aItemList.realloc( rList.size() - 1 );
-        for ( w = 1; w < rList.size(); w++ )
+        for ( std::vector<OptimizerSettings>::size_type w = 1; w < rList.size(); w++ )
             aItemList[ w - 1 ] = rList[ w ].maName;
     }
     setControlProperty( "ComboBox0Pg4", "StringItemList", Any( aItemList ) );
@@ -613,7 +611,7 @@ void OptimizerDialog::UpdateControlStatesPage4()
     bool bSaveSettingsEnabled = true;
     if ( rList.size() > 1 ) // the first session in the list is the actual one -> skipping first one
     {
-        for ( w = 1; w < rList.size(); w++ )
+        for ( std::vector<OptimizerSettings>::size_type w = 1; w < rList.size(); w++ )
         {
             if ( rList[ w ] == rList[ 0 ] )
             {
@@ -877,7 +875,7 @@ void OptimizerDialog::InitPage4()
     OUString aSettingsName;
     OUString aDefault( getString( STR_MY_SETTINGS ) );
     sal_Int32 nSession = 1;
-    sal_uInt32 i;
+    std::vector<OptimizerSettings>::size_type i;
     const std::vector< OptimizerSettings >& rList( GetOptimizerSettings() );
     do
     {


More information about the Libreoffice-commits mailing list