Kaydet (Commit) 4963b550 authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Michael Weghorn

tdf#120625: All vcl windows now share 1 instance of clipboard

so we can copy'n'pasta between apps (or 2 instances of the same app)
Copy'n'pasta into system clipboard is still buggy for non-Writer apps

Change-Id: I07f025172654dd3e6c0ef9cd5ad78d24224f039f
Reviewed-on: https://gerrit.libreoffice.org/64721
Tested-by: Jenkins
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
(cherry picked from commit 1e3d6c80)
Reviewed-on: https://gerrit.libreoffice.org/65153Reviewed-by: 's avatarMichael Weghorn <m.weghorn@posteo.de>
üst 6c2047e3
...@@ -40,6 +40,7 @@ class VCLPLUG_QT5_PUBLIC Qt5Instance : public QObject, ...@@ -40,6 +40,7 @@ class VCLPLUG_QT5_PUBLIC Qt5Instance : public QObject,
osl::Condition m_aWaitingYieldCond; osl::Condition m_aWaitingYieldCond;
int m_postUserEventId; int m_postUserEventId;
const bool m_bUseCairo; const bool m_bUseCairo;
css::uno::Reference<css::uno::XInterface> m_xClipboard;
public: public:
std::unique_ptr<QApplication> m_pQApplication; std::unique_ptr<QApplication> m_pQApplication;
......
...@@ -244,10 +244,14 @@ Qt5Instance::CreateClipboard(const css::uno::Sequence<css::uno::Any>& arguments) ...@@ -244,10 +244,14 @@ Qt5Instance::CreateClipboard(const css::uno::Sequence<css::uno::Any>& arguments)
css::uno::Reference<css::uno::XInterface>(), -1); css::uno::Reference<css::uno::XInterface>(), -1);
} }
if (!m_xClipboard.is())
{
css::uno::Reference<css::uno::XInterface> xClipboard( css::uno::Reference<css::uno::XInterface> xClipboard(
static_cast<cppu::OWeakObject*>(new VclQt5Clipboard())); static_cast<cppu::OWeakObject*>(new VclQt5Clipboard()));
m_xClipboard = xClipboard;
}
return xClipboard; return m_xClipboard;
} }
Reference<XInterface> Qt5Instance::CreateDragSource() Reference<XInterface> Qt5Instance::CreateDragSource()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment