diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-14 12:51:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-17 07:48:50 +0000 |
commit | 81fd038c81e5ebbb8a52d9b2fbdca1fd48f445e3 (patch) | |
tree | 9308b45e3f27536fc857231dcb116956fd655870 /framework/source/fwi | |
parent | 959fbfc000d2e3167b2b57b6d11bea231993b4f0 (diff) |
XUnoTunnel->dynamic_cast in ConstItemContainer
Change-Id: I0b3bf3e2c30a150aa3986e05951e0978fc16f1bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145629
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/fwi')
-rw-r--r-- | framework/source/fwi/uielement/constitemcontainer.cxx | 14 | ||||
-rw-r--r-- | framework/source/fwi/uielement/itemcontainer.cxx | 8 | ||||
-rw-r--r-- | framework/source/fwi/uielement/rootitemcontainer.cxx | 2 |
3 files changed, 3 insertions, 21 deletions
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index 7e43a5009c36..cab82acd870c 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -147,7 +147,7 @@ Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference Reference< XIndexAccess > xReturn; if ( rSubContainer.is() ) { - ItemContainer* pSource = comphelper::getFromUnoTunnel<ItemContainer>( rSubContainer ); + ItemContainer* pSource = dynamic_cast<ItemContainer*>( rSubContainer.get() ); rtl::Reference<ConstItemContainer> pSubContainer; if ( pSource ) pSubContainer = new ConstItemContainer( *pSource ); @@ -159,18 +159,6 @@ Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference return xReturn; } -// XUnoTunnel -sal_Int64 ConstItemContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) -{ - return comphelper::getSomethingImpl(rIdentifier, this); -} - -const Sequence< sal_Int8 >& ConstItemContainer::getUnoTunnelId() noexcept -{ - static const comphelper::UnoIdInit theConstItemContainerUnoTunnelId; - return theConstItemContainerUnoTunnelId.getSeq(); -} - // XElementAccess sal_Bool SAL_CALL ConstItemContainer::hasElements() { diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx index 389bbaeaaf9d..bc0116b2f3f7 100644 --- a/framework/source/fwi/uielement/itemcontainer.cxx +++ b/framework/source/fwi/uielement/itemcontainer.cxx @@ -122,7 +122,7 @@ Reference< XIndexAccess > ItemContainer::deepCopyContainer( const Reference< XIn Reference< XIndexAccess > xReturn; if ( rSubContainer.is() ) { - ConstItemContainer* pSource = comphelper::getFromUnoTunnel<ConstItemContainer>( rSubContainer ); + ConstItemContainer* pSource = dynamic_cast<ConstItemContainer*>( rSubContainer.get() ); rtl::Reference<ItemContainer> pSubContainer; if ( pSource ) pSubContainer = new ItemContainer( *pSource, rMutex ); @@ -134,12 +134,6 @@ Reference< XIndexAccess > ItemContainer::deepCopyContainer( const Reference< XIn return xReturn; } -const Sequence< sal_Int8 >& ItemContainer::getUnoTunnelId() noexcept -{ - static const comphelper::UnoIdInit theItemContainerUnoTunnelId; - return theItemContainerUnoTunnelId.getSeq(); -} - // XElementAccess sal_Bool SAL_CALL ItemContainer::hasElements() { diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index 50ecd0d53bde..db267f54a658 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -126,7 +126,7 @@ Reference< XIndexAccess > RootItemContainer::deepCopyContainer( const Reference< Reference< XIndexAccess > xReturn; if ( rSubContainer.is() ) { - ConstItemContainer* pSource = comphelper::getFromUnoTunnel<ConstItemContainer>( rSubContainer ); + ConstItemContainer* pSource = dynamic_cast<ConstItemContainer*>( rSubContainer.get() ); rtl::Reference<ItemContainer> pSubContainer; if ( pSource ) pSubContainer = new ItemContainer( *pSource, m_aShareMutex ); |