diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-09-22 18:20:39 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-09-23 15:47:12 +0200 |
commit | 1d398fb983d8f8b53a78e7c47b588fc1f1e7f748 (patch) | |
tree | 89e11384ea13d73b3c1dc198c5fee8675036abbe /sc | |
parent | cd6780aae1392d4c1af0b15b311a4966834a9602 (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 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 6 |
2 files changed, 2 insertions, 7 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index fa2a8fc9c961..f0e2be876858 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -5244,8 +5244,7 @@ ErrCode ScXMLExport::exportDoc( enum XMLTokenEnum eClass ) uno::Reference< frame::XModel > xModel = GetModel(); if ( xModel.is() ) { - uno::Reference< lang::XUnoTunnel > xObjShellTunnel( xModel, uno::UNO_QUERY ); - SfxObjectShell* pFoundShell = reinterpret_cast<SfxObjectShell*>( xObjShellTunnel.is() ? xObjShellTunnel->getSomething(SfxObjectShell::getUnoTunnelId()) : 0 ); + auto pFoundShell = comphelper::getUnoTunnelImplementation<SfxObjectShell>(xModel); if ( pFoundShell && ooo::vba::isAlienExcelDoc( *pFoundShell ) ) { xRowStylesPropertySetMapper = new XMLPropertySetMapper(aXMLScFromXLSRowStylesProperties, xScPropHdlFactory, true); diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index 59f1b724442f..914a398d82f2 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -157,11 +157,7 @@ const uno::Sequence<sal_Int8>& ScHeaderFooterContentObj::getUnoTunnelId() rtl::Reference<ScHeaderFooterContentObj> ScHeaderFooterContentObj::getImplementation( const uno::Reference<sheet::XHeaderFooterContent>& rObj) { - rtl::Reference<ScHeaderFooterContentObj> pRet; - uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY); - if (xUT.is()) - pRet = reinterpret_cast<ScHeaderFooterContentObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId()))); - return pRet; + return comphelper::getUnoTunnelImplementation<ScHeaderFooterContentObj>(rObj); } void ScHeaderFooterContentObj::Init( const EditTextObject* pLeft, |