summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-14 12:51:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-17 07:48:50 +0000
commit81fd038c81e5ebbb8a52d9b2fbdca1fd48f445e3 (patch)
tree9308b45e3f27536fc857231dcb116956fd655870 /framework
parent959fbfc000d2e3167b2b57b6d11bea231993b4f0 (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')
-rw-r--r--framework/inc/uielement/constitemcontainer.hxx6
-rw-r--r--framework/inc/uielement/itemcontainer.hxx3
-rw-r--r--framework/source/fwi/uielement/constitemcontainer.cxx14
-rw-r--r--framework/source/fwi/uielement/itemcontainer.cxx8
-rw-r--r--framework/source/fwi/uielement/rootitemcontainer.cxx2
5 files changed, 3 insertions, 30 deletions
diff --git a/framework/inc/uielement/constitemcontainer.hxx b/framework/inc/uielement/constitemcontainer.hxx
index e25edc57fc7a..2cec0b9a3017 100644
--- a/framework/inc/uielement/constitemcontainer.hxx
+++ b/framework/inc/uielement/constitemcontainer.hxx
@@ -23,7 +23,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <rtl/ustring.hxx>
#include <cppuhelper/implbase.hxx>
@@ -38,7 +37,6 @@ class RootItemContainer;
class ItemContainer;
class ConstItemContainer final : public ::cppu::WeakImplHelper<
css::container::XIndexAccess,
- css::lang::XUnoTunnel ,
css::beans::XFastPropertySet,
css::beans::XPropertySet >
{
@@ -51,10 +49,6 @@ class ConstItemContainer final : public ::cppu::WeakImplHelper<
ConstItemContainer( const css::uno::Reference< css::container::XIndexAccess >& rSourceContainer, bool bFastCopy = false );
virtual ~ConstItemContainer() override;
- // XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() noexcept;
- sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
-
// XIndexAccess
virtual sal_Int32 SAL_CALL getCount() override;
diff --git a/framework/inc/uielement/itemcontainer.hxx b/framework/inc/uielement/itemcontainer.hxx
index 5d5bc9c85c41..927beea584af 100644
--- a/framework/inc/uielement/itemcontainer.hxx
+++ b/framework/inc/uielement/itemcontainer.hxx
@@ -43,9 +43,6 @@ class ItemContainer final : public ::cppu::WeakImplHelper< css::container::XInde
// XInterface, XTypeProvider
- // XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() noexcept;
-
// XIndexContainer
virtual void SAL_CALL insertByIndex( sal_Int32 Index, const css::uno::Any& Element ) override;
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 );