[Libreoffice-commits] core.git: dbaccess/source

Julien Nabet serval2412 at yahoo.fr
Wed Aug 14 15:05:23 PDT 2013


 dbaccess/source/ui/misc/WCopyTable.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 1d6ef2446eaaf9e412b76e7b792d6f0af1783460
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu Aug 15 00:04:55 2013 +0200

    Reduce scope + use SAL_N_ELEMENTS
    
    Change-Id: I33fd212f6ab82f802fa85af804980c2e8c4c9ec7

diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index f8e86dd..c00dc88 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -171,8 +171,6 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _
                 ,::std::pair< OUString, OUString >(PROPERTY_ORDER,OUString(" ORDER BY "))
     };
 
-    size_t i = 0;
-
     try
     {
         const String sSourceName = (::dbtools::composeTableNameForSelect(m_xConnection,m_xObject) + OUString("."));
@@ -184,7 +182,7 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _
         sStatement += OUString(" WHERE 0=1");
 
 
-        for ( i=0; i < sizeof( aProperties ) / sizeof( aProperties[0] ); ++i )
+        for ( size_t i=0; i < SAL_N_ELEMENTS(aProperties); ++i )
         {
             if ( m_xObjectPSI->hasPropertyByName( aProperties[i].first ) )
             {


More information about the Libreoffice-commits mailing list