diff options
author | Henry Castro <hcastro@collabora.com> | 2018-02-06 17:16:03 -0400 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-25 17:38:37 +0200 |
commit | 42b2a03e2c1648210003dd9b412bbc52d64244aa (patch) | |
tree | c67a0b06271dcfeb9ae555a4d88a4a631f58b9dc /sc | |
parent | dbb224d7e3fb10ffaa1bd2d3e55066b687947db4 (diff) |
tdf#115020: Cutting a large dataset is very slow since 6.1.0.0.alpha0+
Reviewed-on: https://gerrit.libreoffice.org/49320
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
(cherry picked from commit 1fcf76b8f33ddca3f00256e3c41104314988a9f4)
Change-Id: Icc26224055c00bd826019bd728c3f74d2ebba535
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/transobj.cxx | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index b3b17e420cca..333a255e19a5 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/embed/XTransactedObject.hpp> +#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp> #include <unotools/tempfile.hxx> #include <unotools/ucbstreamhelper.hxx> @@ -200,13 +201,22 @@ ScTransferObj::~ScTransferObj() ScTransferObj* ScTransferObj::GetOwnClipboard( vcl::Window* pUIWin ) { ScTransferObj* pObj = nullptr; - TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pUIWin ) ); - uno::Reference<XUnoTunnel> xTunnel( aDataHelper.GetTransferable(), uno::UNO_QUERY ); - if ( xTunnel.is() ) + uno::Reference<XTransferable> xTransferable; + uno::Reference<datatransfer::clipboard::XClipboard> xClipboard; + + if( pUIWin ) + xClipboard = pUIWin->GetClipboard(); + + if( xClipboard.is() ) { - sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() ); - if ( nHandle ) - pObj = dynamic_cast<ScTransferObj*>(reinterpret_cast<TransferableHelper*>( (sal_IntPtr) nHandle )); + xTransferable = xClipboard->getContents(); + uno::Reference<XUnoTunnel> xTunnel( xTransferable, uno::UNO_QUERY ); + if ( xTunnel.is() ) + { + sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() ); + if ( nHandle ) + pObj = dynamic_cast<ScTransferObj*>(reinterpret_cast<TransferableHelper*>( static_cast<sal_IntPtr>(nHandle) )); + } } return pObj; |