User: kz Date: 2006/12/13 08:44:46 Modified: dba/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
Log: INTEGRATION: CWS dba22ui (1.21.12); FILE MERGED 2006/12/05 09:47:49 fs 1.21.12.1: copying the fix for #i72252# from CWS dba22b to dba22ui - intended for the latter, but wrongly checked in into the former 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.21&r2=1.22 Delta lines: +16 -14 --------------------- --- SingleSelectQueryComposer.cxx 17 Sep 2006 06:32:58 -0000 1.21 +++ SingleSelectQueryComposer.cxx 13 Dec 2006 16:44:42 -0000 1.22 @@ -220,13 +220,13 @@ /** transforms a parse node describing a complete statement into a pure select statement, without any filter/order/groupby/having clauses */ - ::rtl::OUString getPureSelectStatement( const OSQLParseNode* _pRootNode, Reference< XDatabaseMetaData > _rxMedaData ) + ::rtl::OUString getPureSelectStatement( const OSQLParseNode* _pRootNode, Reference< XConnection > _rxConnection ) { ::rtl::OUString sSQL = STR_SELECT; - _pRootNode->getChild(1)->parseNodeToStr( sSQL, _rxMedaData ); - _pRootNode->getChild(2)->parseNodeToStr( sSQL, _rxMedaData ); + _pRootNode->getChild(1)->parseNodeToStr( sSQL, _rxConnection ); + _pRootNode->getChild(2)->parseNodeToStr( sSQL, _rxConnection ); sSQL += STR_FROM; - _pRootNode->getChild(3)->getChild(0)->getChild(1)->parseNodeToStr( sSQL, _rxMedaData ); + _pRootNode->getChild(3)->getChild(0)->getChild(1)->parseNodeToStr( sSQL, _rxConnection ); return sSQL; } @@ -385,7 +385,7 @@ parseAndCheck_throwError( m_aSqlParser, command, m_aSqlIterator, *this ); // strip it from all clauses, to have the pure SELECT statement - m_aPureSelectSQL = getPureSelectStatement( m_aSqlIterator.getParseTree(), m_xMetaData ); + m_aPureSelectSQL = getPureSelectStatement( m_aSqlIterator.getParseTree(), m_xConnection ); // update columns and tables getColumns(); @@ -965,9 +965,9 @@ // pCondition->parseNodeToStr(aValue,m_xMetaData, xFormatter, m_aLocale,static_cast<sal_Char>(m_sDecimalSep.toChar())); - pCondition->parseNodeToStr(aValue,m_xMetaData,NULL); + pCondition->parseNodeToStr( aValue, m_xConnection, NULL ); // pCondition->getChild(0)->parseNodeToStr(aColumnName,m_xMetaData, xFormatter, m_aLocale,static_cast<sal_Char>(m_sDecimalSep.toChar())); - pCondition->getChild(0)->parseNodeToStr(aColumnName,m_xMetaData, NULL); + pCondition->getChild(0)->parseNodeToStr( aColumnName, m_xConnection, NULL ); // don't display the column name aValue = aValue.copy(aColumnName.getLength()); @@ -1069,7 +1069,8 @@ // go forward for (;i < pCondition->count();i++) - pCondition->getChild(i)->parseNodeToPredicateStr(aValue,m_xMetaData, xFormatter, m_aLocale,static_cast<sal_Char>(m_sDecimalSep.toChar())); + pCondition->getChild(i)->parseNodeToPredicateStr( + aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>(m_sDecimalSep.toChar() ) ); } else if (SQL_ISRULE(pCondition->getChild(pCondition->count()-1), column_ref)) { @@ -1117,7 +1118,8 @@ // go backward for (; i >= 0; i--) - pCondition->getChild(i)->parseNodeToPredicateStr(aValue,m_xMetaData, xFormatter, m_aLocale,static_cast<sal_Char>(m_sDecimalSep.toChar())); + pCondition->getChild(i)->parseNodeToPredicateStr( + aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); } else return sal_False; @@ -1133,8 +1135,8 @@ ::rtl::OUString aValue; ::rtl::OUString aColumnName; - pCondition->parseNodeToPredicateStr(aValue,m_xMetaData, xFormatter, m_aLocale,static_cast<sal_Char>(m_sDecimalSep.toChar())); - pCondition->getChild(0)->parseNodeToPredicateStr(aColumnName,m_xMetaData, xFormatter, m_aLocale,static_cast<sal_Char>(m_sDecimalSep.toChar())); + pCondition->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); + pCondition->getChild(0)->parseNodeToPredicateStr( aColumnName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep .toChar() ) ); // don't display the column name aValue = aValue.copy(aColumnName.getLength()); @@ -1156,13 +1158,13 @@ // Feldnamen sal_uInt16 i; for (i=0;i< pLhs->count();i++) - pCondition->getChild(i)->parseNodeToPredicateStr(aName,m_xMetaData, xFormatter, m_aLocale,static_cast<sal_Char>(m_sDecimalSep.toChar())); + pCondition->getChild(i)->parseNodeToPredicateStr( aName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); // Kriterium aItem.Handle = pCondition->getChild(1)->getNodeType(); aValue = pCondition->getChild(1)->getTokenValue(); for(i=0;i< pRhs->count();i++) - pCondition->getChild(i)->parseNodeToPredicateStr(aValue,m_xMetaData, xFormatter, m_aLocale,static_cast<sal_Char>(m_sDecimalSep.toChar())); + pCondition->getChild(i)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); aItem.Name = aName; aItem.Value <<= aValue; @@ -1380,7 +1382,7 @@ const OSQLParseNode* pNode = _aGetFunctor( &_rIterator ); if ( pNode ) - pNode->parseNodeToStr(sResult,m_xMetaData); + pNode->parseNodeToStr( sResult, m_xConnection ); return sResult; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
