diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-12 16:25:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-13 18:13:51 +0000 |
commit | d60722e29a0dde6282915188e5ff7e24890a14d3 (patch) | |
tree | f69b4c7e4b4abb44cbbfd3235a3136dff833a386 /sc/source/ui/view | |
parent | d4d046bb9c5d17cdd432b362c38914cc7b0a75f1 (diff) |
XUnoTunnel->dynamic_cast in TransferableHelper
which leads us to find that we can skip all the dynamic_cast'ing
altogether in SwView_Impl
Change-Id: I8914f78df6bfdd743df370c0017d5b8521863594
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145483
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index a19484aa9007..b2f05416a6bd 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -621,15 +621,13 @@ void ScViewFunc::PasteFromSystem() void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTransferable>& rxTransferable ) { - uno::Reference<lang::XUnoTunnel> xTunnel( rxTransferable, uno::UNO_QUERY ); - - if (auto pOwnClip = comphelper::getFromUnoTunnel<ScTransferObj>(xTunnel)) + if (auto pOwnClip = dynamic_cast<ScTransferObj*>(rxTransferable.get())) { PasteFromClip( InsertDeleteFlags::ALL, pOwnClip->GetDocument(), ScPasteFunc::NONE, false, false, false, INS_NONE, InsertDeleteFlags::NONE, true ); // allow warning dialog } - else if (auto pDrawClip = comphelper::getFromUnoTunnel<ScDrawTransferObj>(xTunnel)) + else if (auto pDrawClip = dynamic_cast<ScDrawTransferObj*>(rxTransferable.get())) { ScViewData& rViewData = GetViewData(); SCCOL nPosX = rViewData.GetCurX(); |