User: hr      
Date: 06/06/19 20:20:39

Modified:
 /dba/dbaccess/source/ui/misc/
  TableCopyHelper.cxx

Log:
 INTEGRATION: CWS warnings01 (1.5.6); FILE MERGED
 2006/05/29 11:19:13 sb 1.5.6.3: #i53898# Made code warning-free and/or compile 
at all after resync to SRC680m170.
 2006/05/23 23:58:14 sb 1.5.6.2: RESYNC: (1.5-1.6); FILE MERGED
 2006/03/24 15:36:21 fs 1.5.6.1: #i57457# warning-free code (unxlngi6/.pro + 
unxsoli4.pro)

File Changes:

Directory: /dba/dbaccess/source/ui/misc/
========================================

File [changed]: TableCopyHelper.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/TableCopyHelper.cxx?r1=1.6&r2=1.7
Delta lines:  +12 -13
---------------------
--- TableCopyHelper.cxx 19 Apr 2006 13:23:14 -0000      1.6
+++ TableCopyHelper.cxx 20 Jun 2006 03:20:36 -0000      1.7
@@ -152,11 +152,11 @@
        // 
-----------------------------------------------------------------------------
 #define FILL_PARAM(type,method)                                                
        \
 {                                                                              
                        \
-       type nValue = xRow->g##method(i);                               \
+       type nValue = xRow->g##method(column);                  \
        if ( !xRow->wasNull() )                                                 
\
                xParameter->s##method(nPos,nValue);                     \
        else                                                                    
                \
-               xParameter->setNull(nPos,aColumnTypes[i]);  \
+               xParameter->setNull(nPos,aColumnTypes[column]); \
 }
 // 
-----------------------------------------------------------------------------
 namespace
@@ -251,12 +251,12 @@
                        SQLExceptionInfo aInfo;
                        try
                        {
-                               for(sal_Int32 i = 1;aPosIter != 
_rvColumns.end();++aPosIter)
+                               for( sal_Int32 column = 1; aPosIter != 
_rvColumns.end(); ++aPosIter)
                                {
                                        sal_Int32 nPos = aPosIter->first;
-                                       if ( nPos == CONTAINER_ENTRY_NOTFOUND )
+                                       if ( nPos == COLUMN_POSITION_NOT_FOUND )
                                        {
-                                               ++i; // otherwise we don't get 
the correct value when only the 2nd source column was selected
+                                               ++column; // otherwise we don't 
get the correct value when only the 2nd source column was selected
                                                continue;
                                        }
                                        if ( bIsAutoIncrement && 
bInsertAutoIncrement )
@@ -266,8 +266,8 @@
                                                continue;
                                        }
                                        // we have to check here against 1 
because the parameters are 1 based
-                                       OSL_ENSURE( i >= 1 && i < 
(sal_Int32)aColumnTypes.size(),"Index out of range for column types!");
-                                       switch(aColumnTypes[i])
+                                       OSL_ENSURE( column >= 1 && column < 
(sal_Int32)aColumnTypes.size(),"Index out of range for column types!");
+                                       switch(aColumnTypes[column])
                                        {
                                                case DataType::CHAR:
                                                case DataType::VARCHAR:
@@ -316,7 +316,7 @@
                                                default:
                                                        OSL_ENSURE(0,"Unknown 
type");
                                        }
-                                       ++i;
+                                       ++column;
                                }
                                xPrep->executeUpdate();
                        }
@@ -338,12 +338,11 @@
                                        {
                                                case 
SQLExceptionInfo::SQL_EXCEPTION:
                                                        throw *(const 
SQLException*)aInfo;
-                                                       break;
                                                case 
SQLExceptionInfo::SQL_WARNING:
                                                        throw *(const 
SQLWarning*)aInfo;
-                                                       break;
                                                case 
SQLExceptionInfo::SQL_CONTEXT:
                                                        throw *(const 
SQLContext*)aInfo;
+                        default:
                                                        break;
                                        }
                                }
@@ -667,13 +666,13 @@
                                                                        
Reference< XColumnLocate> xLocate(xSrcRs,UNO_QUERY);
                                                                        
Reference<XColumnsSupplier> xSrcColsSup(xSourceObject,UNO_QUERY);
                                                                        
OSL_ENSURE(xSrcColsSup.is(),"No source columns!");
-                                                                       
Reference<XNameAccess> xNameAccess = xSrcColsSup->getColumns();
-                                                                       
Sequence< ::rtl::OUString> aSeq = xNameAccess->getElementNames();
+                                                                       
Reference<XNameAccess> xSourceColumns = xSrcColsSup->getColumns();
+                                                                       
Sequence< ::rtl::OUString> aSeq = xSourceColumns->getElementNames();
                                                                        const 
::rtl::OUString* pBegin = aSeq.getConstArray();
                                                                        const 
::rtl::OUString* pEnd       = pBegin + aSeq.getLength();
 
                                                                        
ODatabaseExport::TPositions aNewColMapping;
-                                                                       
aNewColMapping.resize( aColumnMapping.size() 
,ODatabaseExport::TPositions::value_type(CONTAINER_ENTRY_NOTFOUND,CONTAINER_ENTRY_NOTFOUND)
 );
+                                                                       
aNewColMapping.resize( aColumnMapping.size() 
,ODatabaseExport::TPositions::value_type( COLUMN_POSITION_NOT_FOUND, 
COLUMN_POSITION_NOT_FOUND ) );
 
                                                                        
for(sal_Int32 k = 0;pBegin != pEnd;++pBegin,++k)
                                                                        {




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to