From e5824f31b3295a5d21f31f1eb160b027ac26dc6c Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Wed, 10 Feb 2010 13:05:28 +0100 Subject: dba33e: #i107717# some renaming and wording changed --- connectivity/source/commontools/TTableHelper.cxx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'connectivity') 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&) -- cgit