summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-16 08:48:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-17 09:03:04 +0000
commit5ed9bb8bdcb1bee63d89909eed82110da31edfe5 (patch)
treec46bb69f5549011b29194abc1945c877e9cd06b4 /framework
parentb8cda1fe1c87af9f378b49bbd3beee25f3c4a942 (diff)
XUnoTunnel->dynamic_cast in RootItemContainer
Change-Id: I79a44f69dd7233a7e885698d29b929d9831025c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145630 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/uielement/rootitemcontainer.hxx8
-rw-r--r--framework/source/fwi/uielement/rootitemcontainer.cxx12
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx6
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx6
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;
}