diff options
Diffstat (limited to 'framework')
4 files changed, 7 insertions, 25 deletions
diff --git a/framework/inc/uielement/rootitemcontainer.hxx b/framework/inc/uielement/rootitemcontainer.hxx index cdfc82fada3e..159137f0f67e 100644 --- a/framework/inc/uielement/rootitemcontainer.hxx +++ b/framework/inc/uielement/rootitemcontainer.hxx @@ -25,7 +25,6 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/lang/XSingleComponentFactory.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <rtl/ustring.hxx> #include <cppuhelper/basemutex.hxx> @@ -40,8 +39,7 @@ class ConstItemContainer; typedef ::cppu::WeakImplHelper< css::container::XIndexContainer, - css::lang::XSingleComponentFactory, - css::lang::XUnoTunnel > RootItemContainer_BASE; + css::lang::XSingleComponentFactory > RootItemContainer_BASE; class RootItemContainer final : private cppu::BaseMutex, public ::cppu::OBroadcastHelper , @@ -65,10 +63,6 @@ class RootItemContainer final : private cppu::BaseMutex, // XTypeProvider virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; - // XUnoTunnel - static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() noexcept; - sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override; - // XIndexContainer virtual void SAL_CALL insertByIndex( sal_Int32 Index, const css::uno::Any& Element ) override; diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index db267f54a658..fdfb6b709c4a 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -138,18 +138,6 @@ Reference< XIndexAccess > RootItemContainer::deepCopyContainer( const Reference< return xReturn; } -// XUnoTunnel -sal_Int64 RootItemContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) -{ - return comphelper::getSomethingImpl(rIdentifier, this); -} - -const Sequence< sal_Int8 >& RootItemContainer::getUnoTunnelId() noexcept -{ - static const comphelper::UnoIdInit theRootItemContainerUnoTunnelId; - return theRootItemContainerUnoTunnelId.getSeq(); -} - // XElementAccess sal_Bool SAL_CALL RootItemContainer::hasElements() { diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 235190ac9d0d..a75b84e7457f 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -429,7 +429,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement { MenuConfiguration aMenuCfg( m_xContext ); Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream )); - auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xContainer ); + auto pRootItemContainer = dynamic_cast<RootItemContainer*>( xContainer.get() ); if ( pRootItemContainer ) aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); else @@ -448,7 +448,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement { Reference< XIndexContainer > xIndexContainer( new RootItemContainer() ); ToolBoxConfiguration::LoadToolBox( m_xContext, xInputStream, xIndexContainer ); - auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xIndexContainer ); + auto pRootItemContainer = dynamic_cast<RootItemContainer*>( xIndexContainer.get() ); aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); return; } @@ -465,7 +465,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement { Reference< XIndexContainer > xIndexContainer( new RootItemContainer() ); StatusBarConfiguration::LoadStatusBar( m_xContext, xInputStream, xIndexContainer ); - auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xIndexContainer ); + auto pRootItemContainer = dynamic_cast<RootItemContainer*>( xIndexContainer.get() ); aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); return; } diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 4950cbfc4cf3..e0527d481504 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -350,7 +350,7 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, { MenuConfiguration aMenuCfg( m_xContext ); Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream )); - auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xContainer ); + auto pRootItemContainer = dynamic_cast<RootItemContainer*>( xContainer.get() ); if ( pRootItemContainer ) aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); else @@ -369,7 +369,7 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, { Reference< XIndexContainer > xIndexContainer( new RootItemContainer() ); ToolBoxConfiguration::LoadToolBox( m_xContext, xInputStream, xIndexContainer ); - auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xIndexContainer ); + auto pRootItemContainer = dynamic_cast<RootItemContainer*>( xIndexContainer.get() ); aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); return; } @@ -386,7 +386,7 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, { Reference< XIndexContainer > xIndexContainer( new RootItemContainer() ); StatusBarConfiguration::LoadStatusBar( m_xContext, xInputStream, xIndexContainer ); - auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xIndexContainer ); + auto pRootItemContainer = dynamic_cast<RootItemContainer*>( xIndexContainer.get() ); aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); return; } |