summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-20 13:51:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-22 19:11:04 +0000
commitf94dc655ec37ec8f40de70f9105a8427a362f266 (patch)
tree520b98032032fde6c76df373a19aa27ce9cf2ea8
parentf647691a55554f1a3a02aa4e997246ff7c16bcaa (diff)
XUnoTunnel->dynamic_cast in ScCellSearchObj
Change-Id: I6f2eda6daf92959973d97a4be38f58a11415776f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145973 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/inc/srchuno.hxx5
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx6
-rw-r--r--sc/source/ui/unoobj/srchuno.cxx4
3 files changed, 3 insertions, 12 deletions
diff --git a/sc/inc/srchuno.hxx b/sc/inc/srchuno.hxx
index de3ac50cc925..90381fa48579 100644
--- a/sc/inc/srchuno.hxx
+++ b/sc/inc/srchuno.hxx
@@ -22,7 +22,6 @@
#include <memory>
#include <com/sun/star/util/XReplaceDescriptor.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <svl/itemprop.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
@@ -31,7 +30,6 @@ class SvxSearchItem;
class ScCellSearchObj final : public cppu::WeakImplHelper<
css::util::XReplaceDescriptor,
- css::lang::XUnoTunnel,
css::lang::XServiceInfo >
{
private:
@@ -70,9 +68,6 @@ public:
virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
- // XUnoTunnel
- UNO3_GETIMPLEMENTATION_DECL(ScCellSearchObj)
-
// 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 119486d79768..851c85645351 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -3758,7 +3758,7 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangesBase::findAll(
uno::Reference<container::XIndexAccess> xRet;
if ( pDocShell && xDesc.is() )
{
- ScCellSearchObj* pSearch = comphelper::getFromUnoTunnel<ScCellSearchObj>( xDesc );
+ ScCellSearchObj* pSearch = dynamic_cast<ScCellSearchObj*>( xDesc.get() );
if (pSearch)
{
SvxSearchItem* pSearchItem = pSearch->GetSearchItem();
@@ -3797,7 +3797,7 @@ uno::Reference<uno::XInterface> ScCellRangesBase::Find_Impl(
uno::Reference<uno::XInterface> xRet;
if ( pDocShell && xDesc.is() )
{
- ScCellSearchObj* pSearch = comphelper::getFromUnoTunnel<ScCellSearchObj>( xDesc );
+ ScCellSearchObj* pSearch = dynamic_cast<ScCellSearchObj*>( xDesc.get() );
if (pSearch)
{
SvxSearchItem* pSearchItem = pSearch->GetSearchItem();
@@ -3878,7 +3878,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
sal_uInt64 nReplaced = 0;
if ( pDocShell && xDesc.is() )
{
- ScCellSearchObj* pSearch = comphelper::getFromUnoTunnel<ScCellSearchObj>( xDesc );
+ ScCellSearchObj* pSearch = dynamic_cast<ScCellSearchObj*>( xDesc.get() );
if (pSearch)
{
SvxSearchItem* pSearchItem = pSearch->GetSearchItem();
diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx
index d5d78d75d6d9..036f6c89817b 100644
--- a/sc/source/ui/unoobj/srchuno.cxx
+++ b/sc/source/ui/unoobj/srchuno.cxx
@@ -189,8 +189,4 @@ uno::Sequence<OUString> SAL_CALL ScCellSearchObj::getSupportedServiceNames()
return {SCSEARCHDESCRIPTOR_SERVICE, SCREPLACEDESCRIPTOR_SERVICE};
}
-// XUnoTunnel
-
-UNO3_GETIMPLEMENTATION_IMPL(ScCellSearchObj);
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */