diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-17 16:44:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-19 06:37:52 +0000 |
commit | 7c55f9e327ddcede8ebb8235c97a83436a87b5be (patch) | |
tree | df3d7c7d09028df792d2e55a2cabf5273878abbc /sw/source/core/unocore/unocrsrhelper.cxx | |
parent | cf734427550f1a42f8ac669378719a1cad617bbb (diff) |
XUnoTunnel->dynamic_cast in OTextCursorHelper
Change-Id: I9b0101b4f0b96c59ddbde01c7cf7f286aac2a8e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145703
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/unocore/unocrsrhelper.cxx')
-rw-r--r-- | sw/source/core/unocore/unocrsrhelper.cxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 3596e21cf00a..db63dfb52848 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -144,10 +144,6 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc, } uno::Reference<lang::XUnoTunnel> const xTunnel(xIfc, UNO_QUERY); - if (!xTunnel.is()) // everything below needs tunnel - { - return; - } SwXShape *const pShape(comphelper::getFromUnoTunnel<SwXShape>(xTunnel)); if (pShape) @@ -171,7 +167,7 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc, } OTextCursorHelper *const pCursor( - comphelper::getFromUnoTunnel<OTextCursorHelper>(xTunnel)); + dynamic_cast<OTextCursorHelper*>(xIfc.get())); if (pCursor) { if (pCursor->GetDoc() == &rTargetDoc) |