User: rt      
Date: 2008-01-30 08:43:29+0000
Modified:
   dba/dbaccess/source/ui/dlg/DbAdminImpl.cxx

Log:
 INTEGRATION: CWS dba24d (1.18.70); FILE MERGED
 2007/12/01 13:40:38 fs 1.18.70.5: RESYNC: (1.19-1.21); FILE MERGED
 2007/11/21 20:54:19 fs 1.18.70.4: #i10000#
 2007/11/21 12:37:34 oj 1.18.70.3: #i68854# impl TypeSettingInfo for Oracle
 2007/11/06 10:59:18 oj 1.18.70.2: RESYNC: (1.18-1.19); FILE MERGED
 2007/11/06 09:21:00 oj 1.18.70.1: #i11746# new property IgnoreCurrency

File Changes:

Directory: /dba/dbaccess/source/ui/dlg/
=======================================

File [changed]: DbAdminImpl.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/DbAdminImpl.cxx?r1=1.21&r2=1.22
Delta lines:  +21 -1
--------------------
--- DbAdminImpl.cxx     2007-11-27 12:09:10+0000        1.21
+++ DbAdminImpl.cxx     2008-01-30 08:43:26+0000        1.22
@@ -134,6 +134,7 @@
 //.........................................................................
 using namespace ::dbtools;
 using namespace com::sun::star::uno;
+using namespace com::sun::star;
 using namespace com::sun::star::sdbc;
 using namespace com::sun::star::sdb;
 using namespace com::sun::star::lang;
@@ -764,7 +765,7 @@
 
 
 //-------------------------------------------------------------------------
-void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& 
_rSource, ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue >& _rInfo)
+void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& 
_rSource, Sequence< ::com::sun::star::beans::PropertyValue >& _rInfo)
 {
        // within the current "Info" sequence, replace the ones we can examine 
from the item set
        // (we don't just fill a completely new sequence with our own items, 
but we preserve any properties unknown to
@@ -875,6 +876,25 @@
 #endif
        }
 
+    // here we have a special entry for types from oracle
+    if ( eType == DST_ORACLE_JDBC )
+    {
+        Sequence< Any > aTypeSettings;
+        static const ::rtl::OUString 
s_sCondition(RTL_CONSTASCII_USTRINGPARAM("Column(2) = "));
+        static const ::rtl::OUString 
s_sValue(RTL_CONSTASCII_USTRINGPARAM("Column(6) = PRECISION"));
+        static const sal_Int32 pTypes[] = { -5, -4, -3, -2, -1, 1, 2, 12};
+        aTypeSettings.realloc((sizeof(pTypes)/sizeof(pTypes[0])) * 2);
+        Any* pCondIter = aTypeSettings.getArray();
+        const Any* pCondEnd  = pCondIter + aTypeSettings.getLength();
+        for(const sal_Int32* pType = pTypes;pCondIter != 
pCondEnd;++pCondIter,++pType)
+        {
+            *pCondIter <<= (s_sCondition + ::rtl::OUString::valueOf(*pType));
+            ++pCondIter;
+            *pCondIter <<= s_sValue;
+        }
+        
aRelevantSettings.insert(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeInfoSettings")),
 0, makeAny(aTypeSettings), PropertyState_DIRECT_VALUE));
+    }
+
        // check which values are still left ('cause they were not present in 
the original sequence, but are to be set)
        if ( !aRelevantSettings.empty() )
        {




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

Reply via email to