diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-21 00:43:56 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-21 19:32:06 +0200 |
commit | fbead41b7d6c0346ff3373279f9c01dc4c7e61fd (patch) | |
tree | 4d37870f6abad5e34b6b02c08ba4d176db3ae209 /forms/source/component/Grid.cxx | |
parent | ac246d6ea1bc43bfc82c9b4c69c9c0f1fd678129 (diff) |
tdf#39593 Remove frm::OGridControlModel::getColumnImplementation
Replace with comphelper::getUnoTunnelImplementation.
Change-Id: I3b662136778340a95216ac08035f7c25d5882349
Reviewed-on: https://gerrit.libreoffice.org/74472
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'forms/source/component/Grid.cxx')
-rw-r--r-- | forms/source/component/Grid.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index ba3bfd222bf8..80294635082f 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/text/WritingMode2.hpp> #include <comphelper/basicio.hxx> #include <comphelper/property.hxx> +#include <comphelper/servicehelper.hxx> #include <comphelper/types.hxx> #include <cppuhelper/queryinterface.hxx> #include <vcl/unohelp.hxx> @@ -688,15 +689,6 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const return aReturn; } -OGridColumn* OGridControlModel::getColumnImplementation(const css::uno::Reference<css::uno::XInterface>& _rxIFace) -{ - OGridColumn* pImplementation = nullptr; - Reference< XUnoTunnel > xUnoTunnel( _rxIFace, UNO_QUERY ); - if ( xUnoTunnel.is() ) - pImplementation = reinterpret_cast<OGridColumn*>(xUnoTunnel->getSomething(OGridColumn::getUnoTunnelImplementationId())); - return pImplementation; -} - void OGridControlModel::gotColumn( const Reference< XInterface >& _rxColumn ) { Reference< XSQLErrorBroadcaster > xBroadcaster( _rxColumn, UNO_QUERY ); @@ -753,7 +745,7 @@ ElementDescription* OGridControlModel::createElementMetaData( ) void OGridControlModel::approveNewElement( const Reference< XPropertySet >& _rxObject, ElementDescription* _pElement ) { - OGridColumn* pCol = getColumnImplementation( _rxObject ); + OGridColumn* pCol = comphelper::getUnoTunnelImplementation<OGridColumn>( _rxObject ); if ( !pCol ) throw IllegalArgumentException(); OInterfaceContainer::approveNewElement( _rxObject, _pElement ); @@ -777,7 +769,7 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream for (sal_Int32 i = 0; i < nLen; i++) { // first the service name for the underlying model - OGridColumn* pCol = getColumnImplementation(m_aItems[i]); + OGridColumn* pCol = comphelper::getUnoTunnelImplementation<OGridColumn>(m_aItems[i]); DBG_ASSERT(pCol != nullptr, "OGridControlModel::write : such items should never reach it into my container !"); _rxOutStream << pCol->getModelName(); // then the object itself @@ -881,7 +873,7 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) sal_Int32 nMark = xMark->createMark(); if (xCol.is()) { - OGridColumn* pCol = getColumnImplementation(xCol); + OGridColumn* pCol = comphelper::getUnoTunnelImplementation<OGridColumn>(xCol); pCol->read(_rxInStream); } xMark->jumpToMark(nMark); |