From 1d398fb983d8f8b53a78e7c47b588fc1f1e7f748 Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Sun, 22 Sep 2019 18:20:39 +0300 Subject: tdf#39593 use getUnoTunnelImplementation Change-Id: I78eb67913a568c610e38e5002f914773c4906dfd Reviewed-on: https://gerrit.libreoffice.org/79350 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov --- svtools/source/control/valueacc.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'svtools') diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 08838f343d1a..869dc818061c 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -144,8 +144,7 @@ ValueSetAcc* ValueSetAcc::getImplementation( const uno::Reference< uno::XInterfa { try { - uno::Reference< lang::XUnoTunnel > xUnoTunnel( rxData, uno::UNO_QUERY ); - return( xUnoTunnel.is() ? reinterpret_cast(sal::static_int_cast(xUnoTunnel->getSomething( ValueSetAcc::getUnoTunnelId() ))) : nullptr ); + return comphelper::getUnoTunnelImplementation(rxData); } catch(const css::uno::Exception&) { @@ -747,8 +746,7 @@ ValueItemAcc* ValueItemAcc::getImplementation( const uno::Reference< uno::XInter { try { - uno::Reference< lang::XUnoTunnel > xUnoTunnel( rxData, uno::UNO_QUERY ); - return( xUnoTunnel.is() ? reinterpret_cast(sal::static_int_cast(xUnoTunnel->getSomething( ValueItemAcc::getUnoTunnelId() ))) : nullptr ); + return comphelper::getUnoTunnelImplementation(rxData); } catch(const css::uno::Exception&) { @@ -1096,8 +1094,7 @@ SvtValueItemAcc* SvtValueItemAcc::getImplementation( const uno::Reference< uno:: { try { - uno::Reference< lang::XUnoTunnel > xUnoTunnel( rxData, uno::UNO_QUERY ); - return( xUnoTunnel.is() ? reinterpret_cast(sal::static_int_cast(xUnoTunnel->getSomething( SvtValueItemAcc::getUnoTunnelId() ))) : nullptr ); + return comphelper::getUnoTunnelImplementation(rxData); } catch(const css::uno::Exception&) { @@ -1486,8 +1483,7 @@ SvtValueSetAcc* SvtValueSetAcc::getImplementation( const uno::Reference< uno::XI { try { - uno::Reference< lang::XUnoTunnel > xUnoTunnel( rxData, uno::UNO_QUERY ); - return( xUnoTunnel.is() ? reinterpret_cast(sal::static_int_cast(xUnoTunnel->getSomething( SvtValueSetAcc::getUnoTunnelId() ))) : nullptr ); + return comphelper::getUnoTunnelImplementation(rxData); } catch(const css::uno::Exception&) { -- cgit