tdf#39593 Remove toolkit::GridColumn::getImplementation
Replace with comphelper::getUnoTunnelImplementation. Change-Id: I6b32cf388f32e7aa8f073daea0423fcbf169386d Reviewed-on: https://gerrit.libreoffice.org/74235 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
committed by
Stephan Bergmann
parent
e062d42f58
commit
b0efb1be8e
@@ -28,6 +28,7 @@
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
|
||||
#include <comphelper/sequence.hxx>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <comphelper/componentguard.hxx>
|
||||
#include <comphelper/interfacecontainer2.hxx>
|
||||
#include <cppuhelper/basemutex.hxx>
|
||||
@@ -115,7 +116,7 @@ private:
|
||||
Reference< css::util::XCloneable > const xCloneable( *col, UNO_QUERY_THROW );
|
||||
Reference< XGridColumn > const xClone( xCloneable->createClone(), UNO_QUERY_THROW );
|
||||
|
||||
GridColumn* const pGridColumn = GridColumn::getImplementation( xClone );
|
||||
GridColumn* const pGridColumn = comphelper::getUnoTunnelImplementation<GridColumn>( xClone );
|
||||
if ( pGridColumn == nullptr )
|
||||
throw RuntimeException( "invalid clone source implementation", *this );
|
||||
// that's indeed a RuntimeException, not an IllegalArgumentException or some such:
|
||||
@@ -151,7 +152,7 @@ private:
|
||||
{
|
||||
::comphelper::ComponentGuard aGuard( *this, rBHelper );
|
||||
|
||||
GridColumn* const pGridColumn = GridColumn::getImplementation( i_column );
|
||||
GridColumn* const pGridColumn = comphelper::getUnoTunnelImplementation<GridColumn>( i_column );
|
||||
if ( pGridColumn == nullptr )
|
||||
throw css::lang::IllegalArgumentException( "invalid column implementation", *this, 1 );
|
||||
|
||||
@@ -190,7 +191,7 @@ private:
|
||||
++updatePos, ++columnIndex
|
||||
)
|
||||
{
|
||||
GridColumn* pColumnImpl = GridColumn::getImplementation( *updatePos );
|
||||
GridColumn* pColumnImpl = comphelper::getUnoTunnelImplementation<GridColumn>( *updatePos );
|
||||
if ( !pColumnImpl )
|
||||
{
|
||||
SAL_WARN( "toolkit.controls", "DefaultGridColumnModel::removeColumn: invalid column implementation!" );
|
||||
|
@@ -298,15 +298,6 @@ namespace toolkit
|
||||
static ::cppu::OImplementationId const aId;
|
||||
return aId.getImplementationId();
|
||||
}
|
||||
|
||||
|
||||
GridColumn* GridColumn::getImplementation( const Reference< XInterface >& i_component )
|
||||
{
|
||||
Reference< XUnoTunnel > const xTunnel( i_component, UNO_QUERY );
|
||||
if ( xTunnel.is() )
|
||||
return reinterpret_cast< GridColumn* >( ::sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething( getUnoTunnelId() ) ) );
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
|
||||
|
@@ -88,7 +88,6 @@ public:
|
||||
// XUnoTunnel and friends
|
||||
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& i_identifier ) override;
|
||||
static css::uno::Sequence< sal_Int8 > getUnoTunnelId() throw();
|
||||
static GridColumn* getImplementation( const css::uno::Reference< css::uno::XInterface >& i_component );
|
||||
|
||||
// attribute access
|
||||
void setIndex( sal_Int32 const i_index );
|
||||
|
Reference in New Issue
Block a user