diff options
Diffstat (limited to 'connectivity/source/drivers/odbc/ODatabaseMetaData.cxx')
-rw-r--r-- | connectivity/source/drivers/odbc/ODatabaseMetaData.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx index 957142027182..bd721d60a617 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx @@ -28,11 +28,10 @@ #include <TPrivilegesResultSet.hxx> #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> +#include <o3tl/string_view.hxx> using namespace connectivity::odbc; using namespace com::sun::star::uno; -using namespace com::sun::star::lang; -using namespace com::sun::star::beans; using namespace com::sun::star::sdbc; ODatabaseMetaData::ODatabaseMetaData(const SQLHANDLE _pHandle,OConnection* _pCon) @@ -1241,7 +1240,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion( ) try { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_VER,aValue,*this,m_pConnection->getTextEncoding()); - return aValue.copy(0,aValue.indexOf('.')).toInt32(); + return o3tl::toInt32(aValue.subView(0,aValue.indexOf('.'))); } catch (const SQLException &) { @@ -1277,7 +1276,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) try { OUString aValue; OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_DRIVER_VER,aValue,*this,m_pConnection->getTextEncoding()); - return aValue.copy(0,aValue.lastIndexOf('.')).toInt32(); + return o3tl::toInt32(aValue.subView(0,aValue.lastIndexOf('.'))); } catch (const SQLException &) { |