sc/inc/fmtuno.hxx                |    9 ---------
 sc/source/ui/unoobj/cellsuno.cxx |    4 ++--
 sc/source/ui/unoobj/fmtuno.cxx   |    8 --------
 3 files changed, 2 insertions(+), 19 deletions(-)

New commits:
commit e7ad863764052b8d5334a20b56c7d415d81b82db
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jan 20 18:41:25 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Jan 22 19:11:24 2023 +0000

    XUnoTunnel->dynamic_cast in ScTableConditionalFormat
    
    Change-Id: Ice24bb4e6258b40228213b82436ea6d1d50d0e8e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145975
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index e9086a84048d..548ca3ec93bc 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -30,7 +30,6 @@
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 
 #include <com/sun/star/sheet/XMultiFormulaTokens.hpp>
@@ -68,7 +67,6 @@ class ScTableConditionalFormat final : public 
cppu::WeakImplHelper<
                             css::sheet::XSheetConditionalEntries,
                             css::container::XNameAccess,
                             css::container::XEnumerationAccess,
-                            css::lang::XUnoTunnel,
                             css::lang::XServiceInfo >
 {
 private:
@@ -107,9 +105,6 @@ public:
     virtual css::uno::Type SAL_CALL getElementType() override;
     virtual sal_Bool SAL_CALL hasElements() override;
 
-                            // XUnoTunnel
-    UNO3_GETIMPLEMENTATION_DECL(ScTableConditionalFormat)
-
                             // 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 079645d79166..9216ba7a4a31 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2255,7 +2255,7 @@ void ScCellRangesBase::SetOnePropertyValue( const 
SfxItemPropertyMapEntry* pEntr
                     if ( !aRanges.empty() && xInterface.is() )  // empty = 
nothing to do
                     {
                         ScTableConditionalFormat* pFormat =
-                                
comphelper::getFromUnoTunnel<ScTableConditionalFormat>( xInterface );
+                                dynamic_cast<ScTableConditionalFormat*>( 
xInterface.get() );
                         if (pFormat)
                         {
                             ScDocument& rDoc = pDocShell->GetDocument();
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index eabdd7a17be1..d380b95f2314 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -445,10 +445,6 @@ sal_Bool SAL_CALL ScTableConditionalFormat::hasByName( 
const OUString& aName )
     return false;
 }
 
-// XUnoTunnel
-
-UNO3_GETIMPLEMENTATION_IMPL(ScTableConditionalFormat);
-
 ScTableConditionalEntry::ScTableConditionalEntry(ScCondFormatEntryItem  aItem) 
:
     aData(std::move( aItem ))
 {
commit a32675a5fef9cc8a32234ba7ba1eacb53265e735
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jan 20 18:39:52 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Jan 22 19:11:14 2023 +0000

    XUnoTunnel->dynamic_cast in ScTableValidationObj
    
    Change-Id: I7b42ed7b7d7332c24908d0011a216e9617e6c80d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145974
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index 81d1532381ea..e9086a84048d 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -157,7 +157,6 @@ class ScTableValidationObj final : public 
cppu::WeakImplHelper<
                             css::sheet::XSheetCondition2,
                             css::sheet::XMultiFormulaTokens,
                             css::beans::XPropertySet,
-                            css::lang::XUnoTunnel,
                             css::lang::XServiceInfo >
 {
 private:
@@ -231,9 +230,6 @@ public:
     virtual void SAL_CALL   removeVetoableChangeListener( const OUString& 
PropertyName,
                                     const css::uno::Reference< 
css::beans::XVetoableChangeListener >& aListener ) override;
 
-                            // XUnoTunnel
-    UNO3_GETIMPLEMENTATION_DECL(ScTableValidationObj)
-
                             // 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 851c85645351..079645d79166 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2302,7 +2302,7 @@ void ScCellRangesBase::SetOnePropertyValue( const 
SfxItemPropertyMapEntry* pEntr
                     if ( !aRanges.empty() && xInterface.is() )  // empty = 
nothing to do
                     {
                         ScTableValidationObj* pValidObj =
-                                
comphelper::getFromUnoTunnel<ScTableValidationObj>( xInterface );
+                                dynamic_cast<ScTableValidationObj*>( 
xInterface.get() );
                         if (pValidObj)
                         {
                             ScDocument& rDoc = pDocShell->GetDocument();
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index e218634b82ec..eabdd7a17be1 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -914,8 +914,4 @@ uno::Any SAL_CALL ScTableValidationObj::getPropertyValue( 
const OUString& aPrope
 
 SC_IMPL_DUMMY_PROPERTY_LISTENER( ScTableValidationObj )
 
-// XUnoTunnel
-
-UNO3_GETIMPLEMENTATION_IMPL(ScTableValidationObj);
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to