diff options
author | Henry Castro <hcastro@collabora.com> | 2018-02-06 17:16:03 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2018-02-07 22:23:59 +0100 |
commit | 1fcf76b8f33ddca3f00256e3c41104314988a9f4 (patch) | |
tree | e45e6beb4dedb50f5e6c9dc59d52f8b0ed1c468e | |
parent | 5dfe9e93fa4ea8e41dfedf1e8f168c54d28ae2d9 (diff) |
tdf#115020: Cutting a large dataset is very slow since 6.1.0.0.alpha0+
Change-Id: Icc26224055c00bd826019bd728c3f74d2ebba535
Reviewed-on: https://gerrit.libreoffice.org/49320
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
-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 c1d4f00b6a4d..9089f7875812 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> @@ -201,13 +202,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*>( static_cast<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; |