summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-07-20 10:55:35 +0100
committerMichael Meeks <michael.meeks@collabora.com>2019-08-02 11:41:48 -0400
commit164188c3e2f0be1d20765accd8d59f5e4df77c3d (patch)
treed43de9da16df8a4fc5eeec073685790408d58e41 /desktop
parent153700dbb5b8fd3bcadb46e668224507a6b7fb45 (diff)
clipboard: get view setting correct before setClipboard.
Change-Id: If8e9b057b819074f035c598569e3bf6d3d2fff00
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx6
-rw-r--r--desktop/source/lib/lokclipboard.cxx6
2 files changed, 9 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 07158ce052b9..bb938443861f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3589,12 +3589,12 @@ static int doc_getClipboard(LibreOfficeKitDocument* pThis,
}
rtl::Reference<LOKClipboard> xClip(LOKClipboardFactory::getClipboardForCurView());
- SAL_INFO("lok", "Got clipboard for view " << xClip.get());
css::uno::Reference<css::datatransfer::XTransferable> xTransferable = xClip->getContents();
+ SAL_INFO("lok", "Got from clip: " << xClip.get() << " transferrable: " << xTransferable);
if (!xTransferable)
{
- SetLastExceptionMsg("No selection available");
+ SetLastExceptionMsg("No clipboard content available");
return 0;
}
@@ -3667,6 +3667,8 @@ static int doc_setClipboard(LibreOfficeKitDocument* pThis,
auto xClip = forceSetClipboardForCurrentView(pThis);
xClip->setContents(xTransferable, uno::Reference<datatransfer::clipboard::XClipboardOwner>());
+ SAL_INFO("lok", "Set clip: " << xClip.get() << " to: " << xTransferable);
+
if (!pDoc->isMimeTypeSupported())
{
SetLastExceptionMsg("Document doesn't support this mime type");
diff --git a/desktop/source/lib/lokclipboard.cxx b/desktop/source/lib/lokclipboard.cxx
index a959258269a1..ef52a4596c43 100644
--- a/desktop/source/lib/lokclipboard.cxx
+++ b/desktop/source/lib/lokclipboard.cxx
@@ -25,10 +25,13 @@ rtl::Reference<LOKClipboard> LOKClipboardFactory::getClipboardForCurView()
auto it = gClipboards.find(nViewId);
if (it != gClipboards.end())
+ {
+ SAL_INFO("lok", "Got clip: " << it->second.get() << " from " << nViewId);
return it->second;
+ }
rtl::Reference<LOKClipboard> xClip(new LOKClipboard());
gClipboards[nViewId] = xClip;
- SAL_INFO("lok", "Created clipboard for view " << nViewId << " as " << xClip.get());
+ SAL_INFO("lok", "Created clip: " << xClip.get() << " for viewId " << nViewId);
return xClip;
}
@@ -81,6 +84,7 @@ void LOKClipboard::setContents(
std::vector<Reference<datatransfer::clipboard::XClipboardListener>> aListeners(m_aListeners);
datatransfer::clipboard::ClipboardEvent aEv;
aEv.Contents = m_xTransferable;
+ SAL_INFO("lok", "Clip: " << this << " set contents to " << m_xTransferable);
aGuard.clear();