summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-09-22 18:20:39 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-09-23 15:47:12 +0200
commit1d398fb983d8f8b53a78e7c47b588fc1f1e7f748 (patch)
tree89e11384ea13d73b3c1dc198c5fee8675036abbe /svtools
parentcd6780aae1392d4c1af0b15b311a4966834a9602 (diff)
tdf#39593 use getUnoTunnelImplementation
Change-Id: I78eb67913a568c610e38e5002f914773c4906dfd Reviewed-on: https://gerrit.libreoffice.org/79350 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/valueacc.cxx12
1 files changed, 4 insertions, 8 deletions
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<ValueSetAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( ValueSetAcc::getUnoTunnelId() ))) : nullptr );
+ return comphelper::getUnoTunnelImplementation<ValueSetAcc>(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<ValueItemAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( ValueItemAcc::getUnoTunnelId() ))) : nullptr );
+ return comphelper::getUnoTunnelImplementation<ValueItemAcc>(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<SvtValueItemAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( SvtValueItemAcc::getUnoTunnelId() ))) : nullptr );
+ return comphelper::getUnoTunnelImplementation<SvtValueItemAcc>(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<SvtValueSetAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( SvtValueSetAcc::getUnoTunnelId() ))) : nullptr );
+ return comphelper::getUnoTunnelImplementation<SvtValueSetAcc>(rxData);
}
catch(const css::uno::Exception&)
{