User: hr      
Date: 06/04/19 06:16:39

Modified:
 /dba/connectivity/source/drivers/flat/
  ETable.cxx

Log:
 INTEGRATION: CWS oj17 (1.51.46); FILE MERGED
 2006/03/10 08:56:27 oj 1.51.46.1: #131099# check row length

File Changes:

Directory: /dba/connectivity/source/drivers/flat/
=================================================

File [changed]: ETable.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/flat/ETable.cxx?r1=1.52&r2=1.53
Delta lines:  +11 -10
---------------------
--- ETable.cxx  7 Apr 2006 13:11:36 -0000       1.52
+++ ETable.cxx  19 Apr 2006 13:16:36 -0000      1.53
@@ -561,12 +561,13 @@
        xub_StrLen nStartPos = 0;
        String aStr;
        OSQLColumns::const_iterator aIter = _rCols.begin();
-       for (sal_Int32 i = 0; aIter != _rCols.end();++aIter, ++i)
+    OSQLColumns::const_iterator aEnd = _rCols.end();
+       for (sal_Int32 i = 1; aIter != aEnd && i < _rRow->size();++aIter, i++)
        {
                
m_aCurrentLine.GetTokenSpecial(aStr,nStartPos,pConnection->getFieldDelimiter(),pConnection->getStringDelimiter());
 
                if (aStr.Len() == 0)
-                       (*_rRow)[i+1]->setNull();
+                       (*_rRow)[i]->setNull();
                else
                {
                        // Laengen je nach Datentyp:
@@ -600,18 +601,18 @@
                                                switch(nType)
                                                {
                                                        case DataType::DATE:
-                                                               *(*_rRow)[i+1] 
= 
::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDate(nRes,aDate));
+                                                               *(*_rRow)[i] = 
::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDate(nRes,aDate));
                                                                break;
                                                        case 
DataType::TIMESTAMP:
-                                                               *(*_rRow)[i+1] 
= 
::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDateTime(nRes,aDate));
+                                                               *(*_rRow)[i] = 
::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDateTime(nRes,aDate));
                                                                break;
                                                        default:
-                                                               *(*_rRow)[i+1] 
= 
::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(nRes));
+                                                               *(*_rRow)[i] = 
::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(nRes));
                                                }
                                        }
                                        catch(Exception&)
                                        {
-                                               (*_rRow)[i+1]->setNull();
+                                               (*_rRow)[i]->setNull();
                                        }
                                }       break;
                                case DataType::DOUBLE:
@@ -645,15 +646,15 @@
 
                                        // #99178# OJ
                                        if ( DataType::DECIMAL == nType || 
DataType::NUMERIC == nType )
-                                               *(*_rRow)[i+1] = 
ORowSetValue(String::CreateFromDouble(nVal));
+                                               *(*_rRow)[i] = 
ORowSetValue(String::CreateFromDouble(nVal));
                                        else
-                                               *(*_rRow)[i+1] = nVal;
+                                               *(*_rRow)[i] = nVal;
                                } break;
 
                                default:
                                {
                                        // Wert als String in Variable der Row 
uebernehmen
-                                       *(*_rRow)[i+1] = ORowSetValue(aStr);
+                                       *(*_rRow)[i] = ORowSetValue(aStr);
                                }
                                break;
                        }




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

Reply via email to