From 05bc93db2de56000f65764d7e394d03747cac23d Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 14 Sep 2021 08:19:47 +0300 Subject: Use 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 - 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 --- accessibility/source/standard/vclxaccessibletoolbox.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'accessibility') diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index cf3bf77169e7..61c837697576 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -142,7 +142,7 @@ namespace sal_Int64 SAL_CALL OToolBoxWindowItem::getSomething( const Sequence< sal_Int8 >& _rId ) { - if (isUnoTunnelId(_rId)) + if (comphelper::isUnoTunnelId(_rId)) return reinterpret_cast< sal_Int64>( this ); return 0; @@ -301,7 +301,7 @@ void VCLXAccessibleToolBox::implReleaseToolboxItem( ToolBoxItemsMap::iterator co NotifyAccessibleEvent( AccessibleEventId::CHILD, Any( xItemAcc ), Any() ); } - auto pWindowItem = comphelper::getUnoTunnelImplementation(xItemAcc); + auto pWindowItem = comphelper::getFromUnoTunnel(xItemAcc); if ( !pWindowItem ) { static_cast< VCLXAccessibleToolBoxItem* >( xItemAcc.get() )->ReleaseToolBox(); @@ -333,7 +333,7 @@ void VCLXAccessibleToolBox::UpdateItem_Impl( ToolBox::ImplToolItems::size_type _ { Reference< XAccessible > xItemAcc( aIndexAdjust->second ); - auto pWindowItem = comphelper::getUnoTunnelImplementation(xItemAcc); + auto pWindowItem = comphelper::getFromUnoTunnel(xItemAcc); if ( !pWindowItem ) { VCLXAccessibleToolBoxItem* pItem = static_cast< VCLXAccessibleToolBoxItem* >( xItemAcc.get() ); -- cgit v1.2.3