summaryrefslogtreecommitdiffstats
path: root/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/odbc/ODatabaseMetaData.cxx')
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaData.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
index 957142027182..ce3f107e2864 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaData.cxx
@@ -28,6 +28,7 @@
#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;
@@ -1241,7 +1242,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 +1278,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 &)
{