summaryrefslogtreecommitdiff
path: root/dbaccess
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 /dbaccess
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 'dbaccess')
-rw-r--r--dbaccess/source/core/api/RowSet.cxx10
-rw-r--r--dbaccess/source/core/api/TableDeco.cxx5
-rw-r--r--dbaccess/source/core/api/querydescriptor.cxx4
-rw-r--r--dbaccess/source/core/api/table.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/ContentHelper.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/JoinExchange.cxx5
7 files changed, 16 insertions, 22 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 798783587995..22369333205a 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -445,9 +445,8 @@ sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId )
Sequence< sal_Int8 > ORowSet::getUnoTunnelId()
{
- static ::cppu::OImplementationId s_Id;
-
- return s_Id.getImplementationId();
+ static const comphelper::UnoIdInit s_Id;
+ return s_Id.getSeq();
}
// css::XAggregation
@@ -2901,9 +2900,8 @@ void ORowSetClone::close()
Sequence< sal_Int8 > ORowSetClone::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
// css::XUnoTunnel
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index e4b3a07e697d..9cf3538de89c 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -463,9 +463,8 @@ sal_Int64 SAL_CALL ODBTableDecorator::getSomething( const Sequence< sal_Int8 >&
Sequence< sal_Int8 > ODBTableDecorator::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
void ODBTableDecorator::fillPrivileges() const
diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx
index bd0c59c75fbf..012efe81793f 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -148,8 +148,8 @@ sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8
css::uno::Sequence<sal_Int8> OQueryDescriptor_Base::getUnoTunnelId()
{
- static cppu::OImplementationId aId;
- return aId.getImplementationId();
+ static const comphelper::UnoIdInit aId;
+ return aId.getSeq();
}
css::uno::Sequence<sal_Int8> OQueryDescriptor_Base::getImplementationId()
diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx
index 94cb5646032d..11ca5852b99a 100644
--- a/dbaccess/source/core/api/table.cxx
+++ b/dbaccess/source/core/api/table.cxx
@@ -307,9 +307,8 @@ sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId )
Sequence< sal_Int8 > ODBTable::getUnoTunnelId()
{
- static ::cppu::OImplementationId s_Id;
-
- return s_Id.getImplementationId();
+ static const comphelper::UnoIdInit s_Id;
+ return s_Id.getSeq();
}
Reference< XPropertySet > ODBTable::createColumnDescriptor()
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index d18be06e882b..0cb510dc3dd5 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -91,8 +91,8 @@ IMPLEMENT_SERVICE_INFO1(OContentHelper,"com.sun.star.comp.sdb.Content","com.sun.
css::uno::Sequence<sal_Int8> OContentHelper::getUnoTunnelId()
{
- static cppu::OImplementationId aId;
- return aId.getImplementationId();
+ static const comphelper::UnoIdInit aId;
+ return aId.getSeq();
}
css::uno::Sequence<sal_Int8> OContentHelper::getImplementationId()
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 651dca08f674..d47fa88c3f16 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -717,9 +717,8 @@ sal_Int64 SAL_CALL ODatabaseContext::getSomething( const Sequence< sal_Int8 >& r
Sequence< sal_Int8 > ODatabaseContext::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForDocument, BasicManager& _rBasicManager )
diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx
index d2c5c98b94e1..051fbd8c4928 100644
--- a/dbaccess/source/ui/querydesign/JoinExchange.cxx
+++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx
@@ -64,9 +64,8 @@ namespace dbaui
Sequence< sal_Int8 > OJoinExchObj::getUnoTunnelId()
{
- static ::cppu::OImplementationId implId;
-
- return implId.getImplementationId();
+ static const comphelper::UnoIdInit implId;
+ return implId.getSeq();
}
sal_Int64 SAL_CALL OJoinExchObj::getSomething( const Sequence< sal_Int8 >& _rIdentifier )