summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-09-14 09:47:38 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-15 06:08:01 +0200
commit6444b026b4039458d01ada5fee58eae98166585b (patch)
treee1c697dc90e22fb48609e3d59ea12d4e1f37c060 /connectivity
parent21a9ec75777f97886aa92a2a8a7c5945a8d0746f (diff)
Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 3 [API CHANGE]
- Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> OImplementationId uses broken double checked locking; additionally, it uses it at the first call to getImplementationId, not when the object is constructed. This implementation can't be changed, cince it's part of published API; it can't rely on C++11, which would be required for use of thread-safe statics and move the initialization to ctor. The class has obsolete _bUseEthernetAddress member, that is unused and ignored since 4e9fa7e339a1cd6cb2fec643715991bcf5057cec. No need to implement it when replacing its uses to UnoIdInit. The deprecation is the API CHANGE. No published API is introduced to replace it; 3rd-party code should seek alternative solutions, or just keep using the deprecated functionality. TODO (in separate commits): - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: I8b6e684e5389bc0d5bb3b7f21f72a4c8f684107d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122077 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/ConnectionWrapper.cxx5
-rw-r--r--connectivity/source/commontools/TConnection.cxx5
-rw-r--r--connectivity/source/drivers/ado/AColumn.cxx5
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx5
-rw-r--r--connectivity/source/drivers/ado/AGroup.cxx5
-rw-r--r--connectivity/source/drivers/ado/AIndex.cxx5
-rw-r--r--connectivity/source/drivers/ado/AKey.cxx5
-rw-r--r--connectivity/source/drivers/ado/ATable.cxx5
-rw-r--r--connectivity/source/drivers/ado/AUser.cxx5
-rw-r--r--connectivity/source/drivers/ado/AView.cxx5
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx5
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx5
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx5
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx5
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx5
-rw-r--r--connectivity/source/drivers/file/FTable.cxx5
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx4
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx5
-rw-r--r--connectivity/source/drivers/hsqldb/HTable.cxx5
-rw-r--r--connectivity/source/drivers/mysql_jdbc/YTable.cxx5
-rw-r--r--connectivity/source/drivers/writer/WTable.cxx5
-rw-r--r--connectivity/source/sdbcx/VDescriptor.cxx5
22 files changed, 44 insertions, 65 deletions
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx
index eb08aa4fe82c..614c91b7440b 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -165,9 +165,8 @@ sal_Int64 SAL_CALL OConnectionWrapper::getSomething( const Sequence< sal_Int8 >&
Sequence< sal_Int8 > OConnectionWrapper::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
namespace
diff --git a/connectivity/source/commontools/TConnection.cxx b/connectivity/source/commontools/TConnection.cxx
index 6e7709cc2e1a..e15b5ad464d9 100644
--- a/connectivity/source/commontools/TConnection.cxx
+++ b/connectivity/source/commontools/TConnection.cxx
@@ -64,9 +64,8 @@ sal_Int64 SAL_CALL OMetaConnection::getSomething( const css::uno::Sequence< sal_
Sequence< sal_Int8 > OMetaConnection::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
::dbtools::OPropertyMap& OMetaConnection::getPropMap()
diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx
index 2f0f5ca53f2e..5315f858c7b2 100644
--- a/connectivity/source/drivers/ado/AColumn.cxx
+++ b/connectivity/source/drivers/ado/AColumn.cxx
@@ -81,9 +81,8 @@ OAdoColumn::OAdoColumn(bool _bCase,OConnection* _pConnection)
Sequence< sal_Int8 > OAdoColumn::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 0669955356bf..394fe0ed3666 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -499,9 +499,8 @@ sal_Int64 SAL_CALL OConnection::getSomething( const css::uno::Sequence< sal_Int8
Sequence< sal_Int8 > OConnection::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
diff --git a/connectivity/source/drivers/ado/AGroup.cxx b/connectivity/source/drivers/ado/AGroup.cxx
index 3a5a736431c0..2504616a9f6d 100644
--- a/connectivity/source/drivers/ado/AGroup.cxx
+++ b/connectivity/source/drivers/ado/AGroup.cxx
@@ -84,9 +84,8 @@ void OAdoGroup::refreshUsers()
Sequence< sal_Int8 > OAdoGroup::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/ado/AIndex.cxx b/connectivity/source/drivers/ado/AIndex.cxx
index 3445ab78a240..44d562bfea61 100644
--- a/connectivity/source/drivers/ado/AIndex.cxx
+++ b/connectivity/source/drivers/ado/AIndex.cxx
@@ -73,9 +73,8 @@ void OAdoIndex::refreshColumns()
Sequence< sal_Int8 > OAdoIndex::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/ado/AKey.cxx b/connectivity/source/drivers/ado/AKey.cxx
index 6c3db4537e85..d27d93e8ce3f 100644
--- a/connectivity/source/drivers/ado/AKey.cxx
+++ b/connectivity/source/drivers/ado/AKey.cxx
@@ -69,9 +69,8 @@ void OAdoKey::refreshColumns()
Sequence< sal_Int8 > OAdoKey::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx
index 6b2175a46b29..d656dad7ff45 100644
--- a/connectivity/source/drivers/ado/ATable.cxx
+++ b/connectivity/source/drivers/ado/ATable.cxx
@@ -130,9 +130,8 @@ void OAdoTable::refreshIndexes()
Sequence< sal_Int8 > OAdoTable::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/ado/AUser.cxx b/connectivity/source/drivers/ado/AUser.cxx
index 4d86ce97d63f..da73707489ae 100644
--- a/connectivity/source/drivers/ado/AUser.cxx
+++ b/connectivity/source/drivers/ado/AUser.cxx
@@ -68,9 +68,8 @@ void OAdoUser::refreshGroups()
Sequence< sal_Int8 > OAdoUser::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/ado/AView.cxx b/connectivity/source/drivers/ado/AView.cxx
index 5460bab249c2..32ed99a112ff 100644
--- a/connectivity/source/drivers/ado/AView.cxx
+++ b/connectivity/source/drivers/ado/AView.cxx
@@ -43,9 +43,8 @@ OAdoView::OAdoView(bool _bCase,ADOView* _pView) : OView_ADO(_bCase,nullptr)
Sequence< sal_Int8 > OAdoView::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index 382142ece38e..676ffa051371 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -612,9 +612,8 @@ void SAL_CALL OCalcTable::disposing()
Sequence< sal_Int8 > OCalcTable::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index f2dce48c62b7..0c269bf847d6 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -102,9 +102,8 @@ void ODbaseIndex::refreshColumns()
Sequence< sal_Int8 > ODbaseIndex::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// XUnoTunnel
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index a270d3ad007f..32b599e03129 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -733,9 +733,8 @@ Any SAL_CALL ODbaseTable::queryInterface( const Type & rType )
Sequence< sal_Int8 > ODbaseTable::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 3b0dacea6f37..4d28d218bca6 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -408,9 +408,8 @@ sal_Int64 SAL_CALL OConnection::getSomething( const Sequence< sal_Int8 >& rId )
Sequence< sal_Int8 > OConnection::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
void OConnection::throwUrlNotValid(const OUString & _rsUrl,const OUString & _rsMessage)
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 7c2649d8fc8f..13a678656fae 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1382,9 +1382,8 @@ void OResultSet::OpenImpl()
Sequence< sal_Int8 > OResultSet::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx
index 7da609bb4ae0..6a6c10886c89 100644
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -121,9 +121,8 @@ void SAL_CALL OFileTable::disposing()
Sequence< sal_Int8 > OFileTable::getUnoTunnelId()
{
- static ::cppu::OImplementationId s_Id;
-
- return s_Id.getImplementationId();
+ static const comphelper::UnoIdInit s_Id;
+ return s_Id.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index dd827eca52a7..a4ed730c896c 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -388,8 +388,8 @@ sal_Int64 SAL_CALL Connection::getSomething(const css::uno::Sequence<sal_Int8>&
// static
css::uno::Sequence<sal_Int8> Connection::getUnoTunnelId()
{
- static const cppu::OImplementationId implId;
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
//----- XConnection ----------------------------------------------------------
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 43116033add6..efc24d3bed4b 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -553,9 +553,8 @@ Any SAL_CALL OFlatTable::queryInterface( const Type & rType )
Sequence< sal_Int8 > OFlatTable::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx
index 76d0c5b332ee..21179a69778f 100644
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
@@ -118,9 +118,8 @@ sdbcx::OCollection* OHSQLTable::createIndexes(const ::std::vector< OUString>& _r
Sequence< sal_Int8 > OHSQLTable::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
index 22c6bfa6df6c..83a8cb2081af 100644
--- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
@@ -119,9 +119,8 @@ sdbcx::OCollection* OMySQLTable::createIndexes(const ::std::vector<OUString>& _r
Sequence<sal_Int8> OMySQLTable::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::lang::XUnoTunnel
diff --git a/connectivity/source/drivers/writer/WTable.cxx b/connectivity/source/drivers/writer/WTable.cxx
index a1e97ab836ed..8248973a80af 100644
--- a/connectivity/source/drivers/writer/WTable.cxx
+++ b/connectivity/source/drivers/writer/WTable.cxx
@@ -213,9 +213,8 @@ void SAL_CALL OWriterTable::disposing()
uno::Sequence<sal_Int8> OWriterTable::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
sal_Int64 OWriterTable::getSomething(const uno::Sequence<sal_Int8>& rId)
diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx
index 0d70aa0b41af..4741b5896612 100644
--- a/connectivity/source/sdbcx/VDescriptor.cxx
+++ b/connectivity/source/sdbcx/VDescriptor.cxx
@@ -94,9 +94,8 @@ namespace connectivity::sdbcx
Sequence< sal_Int8 > ODescriptor::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}