diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index 0601babdf72e..b36d2bf074df 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -53,6 +53,7 @@ #include #include +#include #include using namespace com::sun::star::xml::xpath; @@ -454,17 +455,7 @@ bool Binding::isLive() const Model* Binding::getModelImpl() const { - return getModelImpl( mxModel ); -} - -Model* Binding::getModelImpl( const css::uno::Reference& xModel ) -{ - Reference xTunnel( xModel, UNO_QUERY ); - Model* pModel = xTunnel.is() - ? reinterpret_cast( - xTunnel->getSomething( Model::getUnoTunnelId() ) ) - : nullptr; - return pModel; + return comphelper::getUnoTunnelImplementation( mxModel ); } static void lcl_addListenerToNode( const Reference& xNode, diff --git a/forms/source/xforms/binding.hxx b/forms/source/xforms/binding.hxx index ba65c9bd7c18..a49d0e4567a6 100644 --- a/forms/source/xforms/binding.hxx +++ b/forms/source/xforms/binding.hxx @@ -273,7 +273,6 @@ private: /// get the model implementation xforms::Model* getModelImpl() const; - static xforms::Model* getModelImpl( const css::uno::Reference& xModel ); /// get MIP evaluation contexts /// (only valid if control has already been bound)