Tag: cws_src680_dba24d User: oj Date: 2007-11-21 12:37:36+0000 Modified: dba/dbaccess/source/ui/dlg/DbAdminImpl.cxx dba/dbaccess/source/ui/dlg/DriverSettings.cxx
Log: #i68854# impl TypeSettingInfo for Oracle 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.18.70.2&r2=1.18.70.3 Delta lines: +26 -4 -------------------- --- DbAdminImpl.cxx 2007-11-06 10:59:18+0000 1.18.70.2 +++ DbAdminImpl.cxx 2007-11-21 12:37:34+0000 1.18.70.3 @@ -4,9 +4,9 @@ * * $RCSfile: DbAdminImpl.cxx,v $ * - * $Revision: 1.18.70.2 $ + * $Revision: 1.18.70.3 $ * - * last change: $Author: oj $ $Date: 2007/11/06 10:59:18 $ + * last change: $Author: oj $ $Date: 2007/11/21 12:37:34 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -75,6 +75,8 @@ #ifndef _COM_SUN_STAR_SDBC_XDRIVERACCESS_HPP_ #include <com/sun/star/sdbc/XDriverAccess.hpp> #endif +#include <com/sun/star/beans/Pair.hpp> +#include <com/sun/star/beans/Optional.hpp> #ifndef _COM_SUN_STAR_SDBC_XDRIVER_HPP_ #include <com/sun/star/sdbc/XDriver.hpp> #endif @@ -134,6 +136,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; @@ -763,7 +766,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 @@ -874,6 +877,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() ) { File [changed]: DriverSettings.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/DriverSettings.cxx?r1=1.8.26.3&r2=1.8.26.4 Delta lines: +2 -3 ------------------- --- DriverSettings.cxx 2007-11-07 07:47:05+0000 1.8.26.3 +++ DriverSettings.cxx 2007-11-21 12:37:34+0000 1.8.26.4 @@ -4,9 +4,9 @@ * * $RCSfile: DriverSettings.cxx,v $ * - * $Revision: 1.8.26.3 $ + * $Revision: 1.8.26.4 $ * - * last change: $Author: oj $ $Date: 2007/11/07 07:47:05 $ + * last change: $Author: oj $ $Date: 2007/11/21 12:37:34 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -59,7 +59,6 @@ DSID_CATALOG, DSID_SCHEMA, DSID_INDEXAPPENDIX, - DSID_DOSLINEENDS, DSID_CHECK_REQUIRED_FIELDS, DSID_AUTORETRIEVEENABLED, DSID_AUTOINCREMENTVALUE, --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
