XUnoTunnel->dynamic_cast in ScSubTotalDescriptorBase
Change-Id: I45b15bf9a9be2de82b86701cd3af5c4f8c6fff13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145980
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx
index 5284963..f2ee6b6 100644
--- a/sc/inc/datauno.hxx
+++ b/sc/inc/datauno.hxx
@@ -38,7 +38,6 @@
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/util/XRefreshable.hpp>
#include <comphelper/servicehelper.hxx>
@@ -110,7 +109,6 @@ class ScSubTotalDescriptorBase : public cppu::WeakImplHelper<
css::container::XEnumerationAccess,
css::container::XIndexAccess,
css::beans::XPropertySet,
css::lang::XUnoTunnel,
css::lang::XServiceInfo >
{
private:
@@ -160,9 +158,6 @@ public:
virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
// XUnoTunnel
UNO3_GETIMPLEMENTATION_DECL(ScSubTotalDescriptorBase)
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 5d44da0..69f4cbd 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -5526,7 +5526,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals(
ScDocShell* pDocSh = GetDocShell();
ScSubTotalDescriptorBase* pImp =
comphelper::getFromUnoTunnel<ScSubTotalDescriptorBase>( xDescriptor );
dynamic_cast<ScSubTotalDescriptorBase*>( xDescriptor.get() );
if (!(pDocSh && pImp))
return;
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index ee285d6..5d4dc47 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -731,10 +731,6 @@ uno::Any SAL_CALL ScSubTotalDescriptorBase::getPropertyValue( const OUString& aP
SC_IMPL_DUMMY_PROPERTY_LISTENER( ScSubTotalDescriptorBase )
// XUnoTunnel
UNO3_GETIMPLEMENTATION_IMPL(ScSubTotalDescriptorBase);
ScSubTotalDescriptor::ScSubTotalDescriptor()
{
}