summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/transobj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/app/transobj.cxx')
-rw-r--r--sc/source/ui/app/transobj.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 37d37b9fd2e1..febb0793c980 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
+#include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -33,8 +34,10 @@
#include <sot/storage.hxx>
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
+#include <vcl/wrkwin.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
+#include <sfx2/viewfrm.hxx>
#include <transobj.hxx>
#include <patattr.hxx>
@@ -198,18 +201,11 @@ ScTransferObj::~ScTransferObj()
}
-ScTransferObj* ScTransferObj::GetOwnClipboard( vcl::Window* pUIWin )
+ScTransferObj* ScTransferObj::GetOwnClipboard(const uno::Reference<datatransfer::XTransferable2>& xTransferable)
{
ScTransferObj* pObj = nullptr;
- uno::Reference<XTransferable> xTransferable;
- uno::Reference<datatransfer::clipboard::XClipboard> xClipboard;
-
- if( pUIWin )
- xClipboard = pUIWin->GetClipboard();
-
- if( xClipboard.is() )
+ if (xTransferable.is())
{
- xTransferable = xClipboard->getContents();
uno::Reference<XUnoTunnel> xTunnel( xTransferable, uno::UNO_QUERY );
if ( xTunnel.is() )
{