summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-20 13:47:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-22 19:10:55 +0000
commitf647691a55554f1a3a02aa4e997246ff7c16bcaa (patch)
treec6e28fb59cd619cb8aa8211ac12559760f3bcc1a
parentfc83e664fc119bf3d8a5a0bcc4d15a8e788d57fb (diff)
XUnoTunnel->dynamic_cast in ScTabViewObj
Change-Id: I8400b56dd656fe2a1144696db8578869b2d26cc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/inc/viewuno.hxx5
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx3
-rw-r--r--sc/source/ui/view/drawview.cxx6
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx2
-rw-r--r--sc/source/ui/view/tabview3.cxx2
-rw-r--r--sc/source/ui/view/tabview5.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx2
8 files changed, 8 insertions, 16 deletions
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index b4ce26f7fc8d..027b4753a944 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -38,7 +38,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/datatransfer/XTransferableSupplier.hpp>
#include <comphelper/servicehelper.hxx>
@@ -137,7 +136,6 @@ class ScTabViewObj final : public ScViewPaneBase,
public css::sheet::XViewSplitable,
public css::sheet::XViewFreezable,
public css::sheet::XRangeSelection,
- public css::lang::XUnoTunnel,
public css::datatransfer::XTransferableSupplier,
public css::sheet::XSelectedSheetsSupplier
{
@@ -269,9 +267,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- // XUnoTunnel
- UNO3_GETIMPLEMENTATION_DECL(ScTabViewObj)
-
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index f8940594746c..c600a01114b8 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -478,7 +478,6 @@ uno::Any SAL_CALL ScTabViewObj::queryInterface( const uno::Type& rType )
SC_QUERYINTERFACE( sheet::XViewSplitable )
SC_QUERYINTERFACE( sheet::XViewFreezable )
SC_QUERYINTERFACE( sheet::XRangeSelection )
- SC_QUERYINTERFACE( lang::XUnoTunnel )
SC_QUERYINTERFACE( datatransfer::XTransferableSupplier )
SC_QUERYINTERFACE( sheet::XSelectedSheetsSupplier )
@@ -2072,8 +2071,6 @@ uno::Sequence<OUString> SAL_CALL ScTabViewObj::getSupportedServiceNames()
// XUnoTunnel
-UNO3_GETIMPLEMENTATION_IMPL(ScTabViewObj);
-
css::uno::Reference< css::datatransfer::XTransferable > SAL_CALL ScTabViewObj::getTransferable()
{
SolarMutexGuard aGuard;
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 24aec4aa5da2..7c31949bb2dc 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -528,7 +528,7 @@ void ScDrawView::MarkListHasChanged()
uno::Reference<frame::XController> xController = rFrame.GetController();
if (xController.is())
{
- ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController );
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
if (pImp)
pImp->SelectionChanged();
}
@@ -578,7 +578,7 @@ bool ScDrawView::SdrBeginTextEdit(
uno::Reference< frame::XController > xController = rFrame.GetController();
if (xController.is())
{
- ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController );
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
if (pImp)
pImp->SelectionChanged();
}
@@ -602,7 +602,7 @@ SdrEndTextEditKind ScDrawView::SdrEndTextEdit( bool bDontDeleteReally )
uno::Reference< frame::XController > xController = rFrame.GetController();
if (xController.is())
{
- ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController );
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
if (pImp)
pImp->SelectionChanged();
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 547338589298..3b6cdae18b55 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2803,7 +2803,7 @@ bool ScGridWindow::PreNotify( NotifyEvent& rNEvt )
css::uno::Reference<css::frame::XController> xController = pViewFrame->GetFrame().GetController();
if (xController.is())
{
- ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController );
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
if (pImp && pImp->IsMouseListening())
{
css::awt::MouseEvent aEvent;
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 607e5ddc60d2..048178301f1d 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2247,7 +2247,7 @@ void ScTabView::SetNewVisArea()
css::uno::Reference<css::frame::XController> xController = rFrame.GetController();
if (xController.is())
{
- ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController );
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
if (pImp)
pImp->VisAreaChanged();
}
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index fdf3a3d517dc..0da3ae55b283 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -537,7 +537,7 @@ void ScTabView::SelectionChanged(bool bFromPaste)
uno::Reference<frame::XController> xController = pViewFrame->GetFrame().GetController();
if (xController.is())
{
- ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController );
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
if (pImp)
pImp->SelectionChanged();
}
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index f3569ac9497f..5e4956eb482b 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -312,7 +312,7 @@ void ScTabView::TabChanged( bool bSameTabButMoved )
uno::Reference<frame::XController> xController = pViewFrame->GetFrame().GetController();
if (xController.is())
{
- ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController );
+ ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
if (pImp)
pImp->SheetChanged( bSameTabButMoved );
}
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index c0a8ae702257..63cbf1f2229a 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1136,7 +1136,7 @@ static ScTabViewObj* lcl_GetViewObj( const ScTabViewShell& rShell )
SfxFrame& rFrame = pViewFrame->GetFrame();
uno::Reference<frame::XController> xController = rFrame.GetController();
if (xController.is())
- pRet = comphelper::getFromUnoTunnel<ScTabViewObj>( xController );
+ pRet = dynamic_cast<ScTabViewObj*>( xController.get() );
}
return pRet;
}