[Libreoffice-commits] core.git: framework/inc framework/source
Arkadiy Illarionov (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 19 05:54:12 UTC 2019
framework/inc/uielement/constitemcontainer.hxx | 3 +--
framework/inc/uielement/itemcontainer.hxx | 3 +--
framework/source/fwi/uielement/constitemcontainer.cxx | 13 +++----------
framework/source/fwi/uielement/itemcontainer.cxx | 11 ++---------
framework/source/fwi/uielement/rootitemcontainer.cxx | 2 +-
5 files changed, 8 insertions(+), 24 deletions(-)
New commits:
commit 60271c4433372097ef5ecc74e522532ebf5af8e0
Author: Arkadiy Illarionov <qarkai at gmail.com>
AuthorDate: Wed Jun 19 00:10:12 2019 +0300
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jun 19 07:53:35 2019 +0200
tdf#39593 Remove GetImplementation from ConstItemContainer and ItemContainer
Replace with comphelper::getUnoTunnelImplementation.
Change-Id: I87e1d3afd3a742926c7054179092d3b58b6b4563
Reviewed-on: https://gerrit.libreoffice.org/74310
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/framework/inc/uielement/constitemcontainer.hxx b/framework/inc/uielement/constitemcontainer.hxx
index 5efc22b30fdb..9ed27693829d 100644
--- a/framework/inc/uielement/constitemcontainer.hxx
+++ b/framework/inc/uielement/constitemcontainer.hxx
@@ -56,8 +56,7 @@ class FWI_DLLPUBLIC ConstItemContainer : public ::cppu::WeakImplHelper<
virtual ~ConstItemContainer() override;
// XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
- static ConstItemContainer* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace ) throw();
+ static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() throw();
sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) override;
// XIndexAccess
diff --git a/framework/inc/uielement/itemcontainer.hxx b/framework/inc/uielement/itemcontainer.hxx
index d3fb00b56952..156d7ffd4904 100644
--- a/framework/inc/uielement/itemcontainer.hxx
+++ b/framework/inc/uielement/itemcontainer.hxx
@@ -48,8 +48,7 @@ class FWI_DLLPUBLIC ItemContainer : public ::cppu::WeakImplHelper< css::contai
// XInterface, XTypeProvider
// XUnoTunnel
- static const css::uno::Sequence< sal_Int8 >& GetUnoTunnelId() throw();
- static ItemContainer* GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace ) throw();
+ static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() throw();
// 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 d1e45af96492..03d638f10ae6 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -151,7 +151,7 @@ Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference
Reference< XIndexAccess > xReturn;
if ( rSubContainer.is() )
{
- ItemContainer* pSource = ItemContainer::GetImplementation( rSubContainer );
+ ItemContainer* pSource = comphelper::getUnoTunnelImplementation<ItemContainer>( rSubContainer );
ConstItemContainer* pSubContainer( nullptr );
if ( pSource )
pSubContainer = new ConstItemContainer( *pSource );
@@ -166,7 +166,7 @@ Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference
// XUnoTunnel
sal_Int64 ConstItemContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier )
{
- if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( ConstItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) )
+ if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( ConstItemContainer::getUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) )
{
return reinterpret_cast< sal_Int64 >( this );
}
@@ -178,18 +178,11 @@ namespace
class theConstItemContainerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theConstItemContainerUnoTunnelId > {};
}
-const Sequence< sal_Int8 >& ConstItemContainer::GetUnoTunnelId() throw()
+const Sequence< sal_Int8 >& ConstItemContainer::getUnoTunnelId() throw()
{
return theConstItemContainerUnoTunnelId::get().getSeq();
}
-ConstItemContainer* ConstItemContainer::GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace ) throw()
-{
- css::uno::Reference< css::lang::XUnoTunnel > xUT( rxIFace, css::uno::UNO_QUERY );
- return xUT.is() ? reinterpret_cast< ConstItemContainer* >(sal::static_int_cast< sal_IntPtr >(
- xUT->getSomething( ConstItemContainer::GetUnoTunnelId() ))) : nullptr;
-}
-
// XElementAccess
sal_Bool SAL_CALL ConstItemContainer::hasElements()
{
diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx
index 50f8b5a8bd25..8401274534af 100644
--- a/framework/source/fwi/uielement/itemcontainer.cxx
+++ b/framework/source/fwi/uielement/itemcontainer.cxx
@@ -120,7 +120,7 @@ Reference< XIndexAccess > ItemContainer::deepCopyContainer( const Reference< XIn
Reference< XIndexAccess > xReturn;
if ( rSubContainer.is() )
{
- ConstItemContainer* pSource = ConstItemContainer::GetImplementation( rSubContainer );
+ ConstItemContainer* pSource = comphelper::getUnoTunnelImplementation<ConstItemContainer>( rSubContainer );
ItemContainer* pSubContainer( nullptr );
if ( pSource )
pSubContainer = new ItemContainer( *pSource, rMutex );
@@ -137,18 +137,11 @@ namespace
class theItemContainerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theItemContainerUnoTunnelId > {};
}
-const Sequence< sal_Int8 >& ItemContainer::GetUnoTunnelId() throw()
+const Sequence< sal_Int8 >& ItemContainer::getUnoTunnelId() throw()
{
return theItemContainerUnoTunnelId::get().getSeq();
}
-ItemContainer* ItemContainer::GetImplementation( const css::uno::Reference< css::uno::XInterface >& rxIFace ) throw()
-{
- css::uno::Reference< css::lang::XUnoTunnel > xUT( rxIFace, css::uno::UNO_QUERY );
- return xUT.is() ? reinterpret_cast< ItemContainer* >(sal::static_int_cast< sal_IntPtr >(
- xUT->getSomething( ItemContainer::GetUnoTunnelId() ))) : nullptr;
-}
-
// XElementAccess
sal_Bool SAL_CALL ItemContainer::hasElements()
{
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx
index 94672302cbda..5b330229cb0b 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -128,7 +128,7 @@ Reference< XIndexAccess > RootItemContainer::deepCopyContainer( const Reference<
Reference< XIndexAccess > xReturn;
if ( rSubContainer.is() )
{
- ConstItemContainer* pSource = ConstItemContainer::GetImplementation( rSubContainer );
+ ConstItemContainer* pSource = comphelper::getUnoTunnelImplementation<ConstItemContainer>( rSubContainer );
ItemContainer* pSubContainer( nullptr );
if ( pSource )
pSubContainer = new ItemContainer( *pSource, m_aShareMutex );
More information about the Libreoffice-commits
mailing list