toolkit/source/controls/grid/defaultgridcolumnmodel.cxx |    7 ++++---
 toolkit/source/controls/grid/gridcolumn.cxx             |    9 ---------
 toolkit/source/controls/grid/gridcolumn.hxx             |    1 -
 3 files changed, 4 insertions(+), 13 deletions(-)

New commits:
commit b0efb1be8ed02f34ab4a2bc0c933c4378b2715e3
Author:     Arkadiy Illarionov <qar...@gmail.com>
AuthorDate: Tue Jun 18 00:22:09 2019 +0300
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue Jun 18 13:26:45 2019 +0200

    tdf#39593 Remove toolkit::GridColumn::getImplementation
    
    Replace with comphelper::getUnoTunnelImplementation.
    
    Change-Id: I6b32cf388f32e7aa8f073daea0423fcbf169386d
    Reviewed-on: https://gerrit.libreoffice.org/74235
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Tested-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx 
b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
index 00a34fc696c2..3883f662a48b 100644
--- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
+++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
@@ -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!" );
diff --git a/toolkit/source/controls/grid/gridcolumn.cxx 
b/toolkit/source/controls/grid/gridcolumn.cxx
index 6cf9b0639fdf..acb64eccf76c 100644
--- a/toolkit/source/controls/grid/gridcolumn.cxx
+++ b/toolkit/source/controls/grid/gridcolumn.cxx
@@ -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 *
diff --git a/toolkit/source/controls/grid/gridcolumn.hxx 
b/toolkit/source/controls/grid/gridcolumn.hxx
index 65a61363d7e6..4986fb164b8c 100644
--- a/toolkit/source/controls/grid/gridcolumn.hxx
+++ b/toolkit/source/controls/grid/gridcolumn.hxx
@@ -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 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to