diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-10 14:17:11 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-10 14:17:11 +0100 |
commit | 3775747092c2db31a2be994d1085fc7a3db28bac (patch) | |
tree | dff903051e383e904a43095bd4c5831b66f367de /connectivity | |
parent | bec6c2b0014b2b5f0d291914db4957c57eac4642 (diff) | |
parent | 1a3e4d377a9eda5037fee202d841c856178d6ab8 (diff) |
merge
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/commontools/TTableHelper.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index 38b5d7fc52f3..0107c6dab2bb 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -98,6 +98,16 @@ public: } namespace connectivity { + ::rtl::OUString lcl_getServiceNameForSetting(const Reference< ::com::sun::star::sdbc::XConnection >& _xConnection,const ::rtl::OUString& i_sSetting) + { + ::rtl::OUString sSupportService; + Any aValue; + if ( ::dbtools::getDataSourceSetting(_xConnection,i_sSetting,aValue) ) + { + aValue >>= sSupportService; + } + return sSupportService; + } struct OTableHelperImpl { TKeyMap m_aKeys; @@ -122,13 +132,13 @@ namespace connectivity if ( xFac.is() ) { static const ::rtl::OUString s_sTableRename(RTL_CONSTASCII_USTRINGPARAM("TableRenameServiceName")); - m_xRename.set(xFac->createInstance(s_sTableRename),UNO_QUERY); + m_xRename.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sTableRename)),UNO_QUERY); static const ::rtl::OUString s_sTableAlteration(RTL_CONSTASCII_USTRINGPARAM("TableAlterationServiceName")); - m_xAlter.set(xFac->createInstance(s_sTableAlteration),UNO_QUERY); + m_xAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sTableAlteration)),UNO_QUERY); static const ::rtl::OUString s_sKeyAlteration(RTL_CONSTASCII_USTRINGPARAM("KeyAlterationServiceName")); - m_xKeyAlter.set(xFac->createInstance(s_sKeyAlteration),UNO_QUERY); + m_xKeyAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sKeyAlteration)),UNO_QUERY); static const ::rtl::OUString s_sIndexAlteration(RTL_CONSTASCII_USTRINGPARAM("IndexAlterationServiceName")); - m_xIndexAlter.set(xFac->createInstance(s_sIndexAlteration),UNO_QUERY); + m_xIndexAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sIndexAlteration)),UNO_QUERY); } } catch(const Exception&) |