Tag: cws_src680_oj14
User: oj      
Date: 2006/07/04 00:27:02

Modified:
   dba/dbaccess/source/core/api/SingleSelectQueryComposer.cxx

Log:
 RESYNC: (1.12-1.14); FILE MERGED

File Changes:

Directory: /dba/dbaccess/source/core/api/
=========================================

File [changed]: SingleSelectQueryComposer.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/SingleSelectQueryComposer.cxx?r1=1.11.8.1&r2=1.11.8.2
Delta lines:  +28 -30
---------------------
--- SingleSelectQueryComposer.cxx       3 Jan 2006 08:07:46 -0000       1.11.8.1
+++ SingleSelectQueryComposer.cxx       4 Jul 2006 07:27:00 -0000       1.11.8.2
@@ -86,9 +86,6 @@
 #ifndef _COMPHELPER_TYPES_HXX_
 #include <comphelper/types.hxx>
 #endif
-#ifndef _ISOLANG_HXX
-#include <tools/isolang.hxx>
-#endif
 #ifndef _TOOLS_DEBUG_HXX
 #include <tools/debug.hxx>
 #endif
@@ -236,18 +233,18 @@
 OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< 
XNameAccess>& _xTableSupplier,
                                                           const Reference< 
XConnection>& _xConnection,
                                                           const Reference< 
XMultiServiceFactory >& _xServiceFactory)
- : OSubComponent(m_aMutex,_xConnection)
+    :OSubComponent(m_aMutex,_xConnection)
  ,OPropertyContainer(m_aBHelper)
- , m_xConnection(_xConnection)
- , m_xMetaData(_xConnection->getMetaData())
- , m_aSqlIterator(_xTableSupplier,_xConnection->getMetaData(),NULL)
- , m_aAdditiveIterator(_xTableSupplier,_xConnection->getMetaData(),NULL)
- , m_xTableSupplier(_xTableSupplier)
- , m_aSqlParser(_xServiceFactory)
+    ,m_aSqlParser(_xServiceFactory)
+    ,m_aSqlIterator(_xTableSupplier,_xConnection->getMetaData(),NULL)
+    ,m_aAdditiveIterator(_xTableSupplier,_xConnection->getMetaData(),NULL)
+    ,m_aElementaryParts( (size_t)SQLPartCount )
+    ,m_xConnection(_xConnection)
+    ,m_xMetaData(_xConnection->getMetaData())
+    ,m_xTableSupplier(_xTableSupplier)
  ,m_xServiceFactory(_xServiceFactory)
  ,m_pTables(NULL)
  ,m_nBoolCompareMode(BOOL_COMPARISON_DEFAULT)
- ,m_aElementaryParts( (size_t)SQLPartCount )
 {
        DBG_CTOR(OSingleSelectQueryComposer,NULL);
        OSL_ENSURE(_xServiceFactory.is()," ServiceFactory cant be null!");
@@ -596,7 +593,7 @@
     }
     catch( const Exception& e )
     {
-        e;
+        (void)e;
         DBG_ERROR( "OSingleSelectQueryComposer::setElementaryQuery: there 
should be no error anymore for the additive statement!" );
         // every part of the additive statement should have passed other tests 
already, and should not
         // be able to cause any errors ... me thinks
@@ -673,7 +670,7 @@
     }
     catch( const Exception& e )
     {
-        e;
+        (void)e;
         DBG_ERROR( "OSingleSelectQueryComposer::setSingleAdditiveClause: there 
should be no error anymore for the additive statement!" );
         // every part of the additive statement should have passed other tests 
already, and should not
         // be able to cause any errors ... me thinks
@@ -752,24 +749,24 @@
                                Reference<XResultSetMetaData> xMeta = 
xResMetaDataSup->getMetaData();
 
                                sal_Int32 nCount = xMeta.is() ? 
xMeta->getColumnCount() : sal_Int32(0);
-                               ::comphelper::UStringMixEqual 
bCase(m_xMetaData->storesMixedCaseQuotedIdentifiers());
-                               ::comphelper::TStringMixEqualFunctor 
bCase2(m_xMetaData->storesMixedCaseQuotedIdentifiers());
+                               ::comphelper::UStringMixEqual 
stringComp(m_xMetaData->storesMixedCaseQuotedIdentifiers());
+                               ::comphelper::TStringMixEqualFunctor 
stringFunc(m_xMetaData->storesMixedCaseQuotedIdentifiers());
                                ::std::map<OSQLColumns::const_iterator,int> 
aColumnMap;
 
                                for(sal_Int32 i=1;i<=nCount;++i)
                                {
                                        ::rtl::OUString sName = 
xMeta->getColumnName(i);
                     sal_Bool bFound = sal_False;
-                                       OSQLColumns::const_iterator aFind = 
::connectivity::find(aCols->begin(),aCols->end(),sName,bCase);
+                                       OSQLColumns::const_iterator aFind = 
::connectivity::find(aCols->begin(),aCols->end(),sName,stringComp);
                                        if(aFind != aCols->end())
-                                               //aNames.end() == 
::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(bCase2,sName)))
+                                               //aNames.end() == 
::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(stringFunc,sName)))
                                        {
                                                if(aColumnMap.find(aFind) != 
aColumnMap.end())
                                                {       // we found a column 
name which exists twice
                                                        // so we start after 
the first found
                                                        do
                                                        {
-                                                               aFind = 
::connectivity::findRealName(++aFind,aCols->end(),sName,bCase);
+                                                               aFind = 
::connectivity::findRealName(++aFind,aCols->end(),sName,stringComp);
                                                        }
                                                        
while(aColumnMap.find(aFind) != aColumnMap.end() && aFind != aCols->end());
                                                }
@@ -783,7 +780,7 @@
                                        }
                                        if ( !bFound )
                                        { // we can now only look if we found 
it under the realname propertery
-                                               OSQLColumns::const_iterator 
aRealFind = 
::connectivity::findRealName(aCols->begin(),aCols->end(),sName,bCase);
+                                               OSQLColumns::const_iterator 
aRealFind = 
::connectivity::findRealName(aCols->begin(),aCols->end(),sName,stringComp);
 
                                                if ( i <= static_cast< 
sal_Int32>(aCols->size()) )
                                                {
@@ -804,12 +801,12 @@
                                                                                
xProp->getPropertyValue(PROPERTY_NAME) >>= sName;
 
                                     
-                                    aFindName = 
::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(bCase2,sName));
+                                    aFindName = 
::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(stringFunc,sName));
                                     sal_Int32 j = 0;
                                     while ( aFindName != aNames.end() )
                                     {                                        
                                         sName += ::rtl::OUString::valueOf(++j);
-                                        aFindName = 
::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(bCase2,sName));
+                                        aFindName = 
::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(stringFunc,sName));
                                     }
 
                                     pColumn->setName(sName);
@@ -1022,7 +1019,7 @@
                {
                        nPos = pCondition->count()-1;
 
-                       sal_uInt32 i = pCondition->count() - 2;
+                       sal_Int32 i = pCondition->count() - 2;
                        switch (pCondition->getChild(i)->getNodeType())
                        {
                                case SQL_NODE_EQUAL:
@@ -1058,6 +1055,8 @@
                                        aValue = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<"));
                                        aItem.Handle = SQLFilterOperator::LESS;
                                        break;
+                default:
+                    break;
                        }
 
                        // go backward
@@ -1522,7 +1521,6 @@
                                                                aSql += 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" TRUE "));
                                                        else
                                                                aSql += 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FALSE "));
-                                                       break;
                                                        break;
                                                case BOOL_COMPARISON_ACCESS:
                                                        if ( bValue )




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

Reply via email to