diff options
-rw-r--r-- | sc/inc/nameuno.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/unoobj/nameuno.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaname.cxx | 4 |
3 files changed, 2 insertions, 23 deletions
diff --git a/sc/inc/nameuno.hxx b/sc/inc/nameuno.hxx index 4cd5423cfc0b..ee37dc365d2f 100644 --- a/sc/inc/nameuno.hxx +++ b/sc/inc/nameuno.hxx @@ -31,7 +31,6 @@ #include <com/sun/star/sheet/XNamedRanges.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/document/XActionLockable.hpp> #include <cppuhelper/implbase.hxx> @@ -47,7 +46,6 @@ class SC_DLLPUBLIC ScNamedRangeObj final : public ::cppu::WeakImplHelper< css::sheet::XFormulaTokens, css::sheet::XCellRangeReferrer, css::beans::XPropertySet, - css::lang::XUnoTunnel, css::lang::XServiceInfo >, public SfxListener { @@ -109,11 +107,6 @@ public: virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; - /// XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - - static const css::uno::Sequence<sal_Int8>& getUnoTunnelId(); - /// XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 6d6a56a6d85b..a49748b1a951 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -419,20 +419,6 @@ uno::Sequence<OUString> SAL_CALL ScNamedRangeObj::getSupportedServiceNames() return {SCNAMEDRANGEOBJ_SERVICE, SCLINKTARGET_SERVICE}; } -// XUnoTunnel - -sal_Int64 SAL_CALL ScNamedRangeObj::getSomething( - const uno::Sequence<sal_Int8 >& rId ) -{ - return comphelper::getSomethingImpl(rId, this); -} - -const uno::Sequence<sal_Int8>& ScNamedRangeObj::getUnoTunnelId() -{ - static const comphelper::UnoIdInit theScNamedRangeObjUnoTunnelId; - return theScNamedRangeObjUnoTunnelId.getSeq(); -} - ScNamedRangesObj::ScNamedRangesObj(ScDocShell* pDocSh) : mbModifyAndBroadcast(true), pDocShell( pDocSh ) diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx index ec0dbe982d28..98a242401e7d 100644 --- a/sc/source/ui/vba/vbaname.cxx +++ b/sc/source/ui/vba/vbaname.cxx @@ -87,7 +87,7 @@ ScVbaName::setVisible( sal_Bool /*bVisible*/ ) OUString ScVbaName::getContent( const formula::FormulaGrammar::Grammar eGrammar ) { - ScNamedRangeObj* pNamedRange = comphelper::getFromUnoTunnel< ScNamedRangeObj >( mxNamedRange ); + ScNamedRangeObj* pNamedRange = dynamic_cast< ScNamedRangeObj* >( mxNamedRange.get() ); OUString aContent; if ( pNamedRange ) { @@ -105,7 +105,7 @@ void ScVbaName::setContent( const OUString& rContent, const formula::FormulaGra OUString sContent( rContent ); if (sContent.startsWith("=")) sContent = sContent.copy(1); - ScNamedRangeObj* pNamedRange = comphelper::getFromUnoTunnel< ScNamedRangeObj >( mxNamedRange ); + ScNamedRangeObj* pNamedRange = dynamic_cast< ScNamedRangeObj* >( mxNamedRange.get() ); // We should be able to do the below by just setting calling SetCode on pNamedRange // right? |