summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-06-20 00:03:05 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-06-20 10:20:23 +0200
commite2814bc4d3a3c8b63018e2733b1ac182adbd96e6 (patch)
treea5957fd4b5590ba59983a430a0969f26f735d8a2
parent6ad13e0e5d1caa8e1ffcf7092e1c04011b5df055 (diff)
tdf#39593 Remove static xforms::Binding::getModelImpl
Replace with comphelper::getUnoTunnelImplementation. Change-Id: I001293ca25387a34cff9872c6db2ab72c6c4d617 Reviewed-on: https://gerrit.libreoffice.org/74385 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--forms/source/xforms/binding.cxx13
-rw-r--r--forms/source/xforms/binding.hxx1
2 files changed, 2 insertions, 12 deletions
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 <com/sun/star/container/XNameContainer.hpp>
#include <unotools/textsearch.hxx>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/typeprovider.hxx>
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<css::xforms::XModel>& xModel )
-{
- Reference<XUnoTunnel> xTunnel( xModel, UNO_QUERY );
- Model* pModel = xTunnel.is()
- ? reinterpret_cast<Model*>(
- xTunnel->getSomething( Model::getUnoTunnelId() ) )
- : nullptr;
- return pModel;
+ return comphelper::getUnoTunnelImplementation<Model>( mxModel );
}
static void lcl_addListenerToNode( const Reference<XNode>& 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<css::xforms::XModel>& xModel );
/// get MIP evaluation contexts
/// (only valid if control has already been bound)