Tag: cws_src680_warnings01
User: sb      
Date: 06/05/23 16:33:23

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

Log:
 RESYNC: (1.51-1.53); FILE MERGED

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.49.16.5&r2=1.49.16.6
Delta lines:  +15 -19
---------------------
--- ETable.cxx  25 Jan 2006 20:50:14 -0000      1.49.16.5
+++ ETable.cxx  23 May 2006 23:33:20 -0000      1.49.16.6
@@ -68,9 +68,6 @@
 #ifndef _COMPHELPER_SEQUENCE_HXX_
 #include <comphelper/sequence.hxx>
 #endif
-#ifndef _INTN_HXX //autogen
-#include <tools/intn.hxx>
-#endif
 #ifndef _ZFORLIST_HXX //autogen
 #include <svtools/zforlist.hxx>
 #endif
@@ -96,8 +93,8 @@
 #ifndef _UTL_CONFIGMGR_HXX_
 #include <unotools/configmgr.hxx>
 #endif
-#ifndef _ISOLANG_HXX
-#include <tools/isolang.hxx>
+#ifndef INCLUDED_I18NPOOL_MSLANGID_HXX
+#include <i18npool/mslangid.hxx>
 #endif
 #ifndef _DBHELPER_DBCONVERSION_HXX_
 #include "connectivity/dbconversion.hxx"
@@ -382,11 +379,9 @@
 void OFlatTable::construct()
 {
        Any aValue = 
ConfigManager::GetDirectConfigProperty(ConfigManager::LOCALE);
-       LanguageType eLanguage = 
ConvertIsoStringToLanguage(comphelper::getString(aValue),'-');
+       LanguageType eLanguage = 
MsLangId::convertIsoStringToLanguage(comphelper::getString(aValue),'-');
 
-       String sLanguage, sCountry;
-       ConvertLanguageToIsoNames(eLanguage, sLanguage, sCountry);
-       ::com::sun::star::lang::Locale 
aAppLocale(sLanguage,sCountry,rtl::OUString());
+       ::com::sun::star::lang::Locale 
aAppLocale(MsLangId::convertLanguageToLocale(eLanguage));
        Sequence< ::com::sun::star::uno::Any > aArg(1);
        aArg[0] <<= aAppLocale;
 
@@ -565,12 +560,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:
@@ -604,18 +600,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:
@@ -649,15 +645,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