sc/source/ui/app/transobj.cxx | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
New commits: commit 1fcf76b8f33ddca3f00256e3c41104314988a9f4 Author: Henry Castro <hcas...@collabora.com> Date: Tue Feb 6 17:16:03 2018 -0400 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 <c...@libreoffice.org> Reviewed-by: Henry Castro <hcas...@collabora.com> 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits