diff options
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r-- | connectivity/source/drivers/ado/AColumn.cxx | 5 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/AConnection.cxx | 5 | ||||
-rw-r--r-- | connectivity/source/drivers/file/fcomp.cxx | 4 | ||||
-rwxr-xr-x | connectivity/source/drivers/macab/MacabRecord.cxx | 2 |
4 files changed, 12 insertions, 4 deletions
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx index aa287c185b26..510c2790e777 100644 --- a/connectivity/source/drivers/ado/AColumn.cxx +++ b/connectivity/source/drivers/ado/AColumn.cxx @@ -165,7 +165,8 @@ void OAdoColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& r { sal_Int32 nVal=0; rValue >>= nVal; - m_aColumn.put_NumericScale((sal_Int8)nVal); + if ( !m_IsCurrency ) + m_aColumn.put_NumericScale((sal_Int8)nVal); } break; case PROPERTY_ID_ISNULLABLE: @@ -212,6 +213,8 @@ void OAdoColumn::fillPropertyValues() DataTypeEnum eType = m_aColumn.get_Type(); m_IsCurrency = (eType == adCurrency); + if ( m_IsCurrency && !m_Scale) + m_Scale = 4; m_Type = ADOS::MapADOType2Jdbc(eType); sal_Bool bForceTo = sal_True; diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index a7e2ec4df490..6596b9b8d946 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -466,6 +466,11 @@ void OConnection::buildTypeInfo() throw( SQLException) aInfo->aSimpleType.aLocalTypeName = ADOS::getField(pRecordset,nPos++).get_Value(); aInfo->aSimpleType.nMinimumScale = ADOS::getField(pRecordset,nPos++).get_Value(); aInfo->aSimpleType.nMaximumScale = ADOS::getField(pRecordset,nPos++).get_Value(); + if ( adCurrency == aInfo->eType && !aInfo->aSimpleType.nMaximumScale) + { + aInfo->aSimpleType.nMinimumScale = 4; + aInfo->aSimpleType.nMaximumScale = 4; + } aInfo->aSimpleType.nNumPrecRadix = ADOS::getField(pRecordset,nPos++).get_Value(); // Now that we have the type info, save it // in the Hashtable if we don't already have an diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index 4ea918ef3e27..9a303d1f1d27 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -99,7 +99,7 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode) OSQLParseNode * pTableExp = pSQLParseNode->getChild(3); DBG_ASSERT(pTableExp != NULL,"Fehler im Parse Tree"); DBG_ASSERT(SQL_ISRULE(pTableExp,table_exp)," Fehler im Parse Tree"); - DBG_ASSERT(pTableExp->count() == 5,"Fehler im Parse Tree"); + DBG_ASSERT(pTableExp->count() == TABLE_EXPRESSION_CHILD_COUNT,"Fehler im Parse Tree"); // check that we don't use anything other than count(*) as function OSQLParseNode* pSelection = pSQLParseNode->getChild(2); @@ -117,7 +117,7 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode) pWhereClause = pTableExp->getChild(1); - pOrderbyClause = pTableExp->getChild(4); + pOrderbyClause = pTableExp->getChild(ORDER_BY_CHILD_POS); } else if (SQL_ISRULE(pSQLParseNode,update_statement_searched)) { diff --git a/connectivity/source/drivers/macab/MacabRecord.cxx b/connectivity/source/drivers/macab/MacabRecord.cxx index 35817526ff17..e161ece74522 100755 --- a/connectivity/source/drivers/macab/MacabRecord.cxx +++ b/connectivity/source/drivers/macab/MacabRecord.cxx @@ -202,7 +202,7 @@ sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield result = CFStringCompare( (CFStringRef) _field1->value, (CFStringRef) _field2->value, - 0); // 0 = no options (like ignore case) + kCFCompareLocalized); // Specifies that the comparison should take into account differences related to locale, such as the thousands separator character. break; case kABDateProperty: |