summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-09-14 08:19:47 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-15 06:07:36 +0200
commit05bc93db2de56000f65764d7e394d03747cac23d (patch)
tree975de9ae83572aac8a5c3ea8db281e1017ee5be0 /package
parent8cbb414ed737f9ffc76e1258e6671769bf63fc6c (diff)
Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackage.cxx2
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx2
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 527dcbe203dd..a64413ae4e11 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1683,7 +1683,7 @@ Sequence< sal_Int8 > ZipPackage::getUnoTunnelId()
sal_Int64 SAL_CALL ZipPackage::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier )
{
- if ( isUnoTunnelId<ZipPackage>(aIdentifier) )
+ if ( comphelper::isUnoTunnelId<ZipPackage>(aIdentifier) )
return reinterpret_cast < sal_Int64 > ( this );
return 0;
}
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 838bed728069..8733fc5c6ac6 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -345,7 +345,7 @@ void ZipPackageFolder::saveContents(
sal_Int64 SAL_CALL ZipPackageFolder::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier )
{
sal_Int64 nMe = 0;
- if ( isUnoTunnelId<ZipPackageFolder>(aIdentifier) )
+ if ( comphelper::isUnoTunnelId<ZipPackageFolder>(aIdentifier) )
nMe = reinterpret_cast < sal_Int64 > ( this );
return nMe;
}
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 2077e2f9a77a..13c5758107a8 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -1108,7 +1108,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getPlainRawStream(
sal_Int64 SAL_CALL ZipPackageStream::getSomething( const Sequence< sal_Int8 >& aIdentifier )
{
sal_Int64 nMe = 0;
- if ( isUnoTunnelId<ZipPackageStream>(aIdentifier) )
+ if ( comphelper::isUnoTunnelId<ZipPackageStream>(aIdentifier) )
nMe = reinterpret_cast < sal_Int64 > ( this );
return nMe;
}