summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/mysql_jdbc
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-09-06 00:50:24 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-09-06 11:55:50 +0200
commitf599c31fe68882f510cf3d101102e71f9bf795c8 (patch)
treeced0a58620c5aea8420638847192f298d139297b /connectivity/source/drivers/mysql_jdbc
parent8811516e2e9e71dd45198081d26c748cdf4d831a (diff)
tdf#39593 use isUnoTunnelId
Adapt getUnoTunnelId methods where required: rename or make public. Change-Id: I0fd2120bf9f0ff1aa690329a65ff64a154c89315 Reviewed-on: https://gerrit.libreoffice.org/78680 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/drivers/mysql_jdbc')
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YDriver.cxx4
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YTable.cxx9
2 files changed, 6 insertions, 7 deletions
diff --git a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx
index d36f78fb3819..06631edda7f1 100644
--- a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx
@@ -271,7 +271,7 @@ Reference<XConnection> SAL_CALL ODriverDelegator::connect(const OUString& url,
if (xTunnel.is())
{
pMetaConnection = reinterpret_cast<OMetaConnection*>(
- xTunnel->getSomething(OMetaConnection::getUnoTunnelImplementationId()));
+ xTunnel->getSomething(OMetaConnection::getUnoTunnelId()));
if (pMetaConnection)
pMetaConnection->setURL(url);
}
@@ -344,7 +344,7 @@ ODriverDelegator::getDataDefinitionByConnection(const Reference<XConnection>& co
if (xTunnel.is())
{
OMetaConnection* pConnection = reinterpret_cast<OMetaConnection*>(
- xTunnel->getSomething(OMetaConnection::getUnoTunnelImplementationId()));
+ xTunnel->getSomething(OMetaConnection::getUnoTunnelId()));
if (pConnection)
{
TWeakPairVector::iterator i
diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
index a3f303982839..f62779499d58 100644
--- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <comphelper/property.hxx>
+#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/sdbcx/VColumn.hxx>
@@ -125,7 +126,7 @@ sdbcx::OCollection* OMySQLTable::createIndexes(const ::std::vector<OUString>& _r
return new OIndexesHelper(this, m_aMutex, _rNames);
}
-Sequence<sal_Int8> OMySQLTable::getUnoTunnelImplementationId()
+Sequence<sal_Int8> OMySQLTable::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -136,10 +137,8 @@ Sequence<sal_Int8> OMySQLTable::getUnoTunnelImplementationId()
sal_Int64 OMySQLTable::getSomething(const Sequence<sal_Int8>& rId)
{
- return (rId.getLength() == 16
- && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16))
- ? reinterpret_cast<sal_Int64>(this)
- : OTable_TYPEDEF::getSomething(rId);
+ return (isUnoTunnelId<OMySQLTable>(rId)) ? reinterpret_cast<sal_Int64>(this)
+ : OTable_TYPEDEF::getSomething(rId);
}
// XAlterTable