[Libreoffice-commits] core.git: vcl/inc vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Dec 7 09:19:37 UTC 2018
vcl/inc/qt5/Qt5Instance.hxx | 1 +
vcl/qt5/Qt5Instance.cxx | 10 +++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 1e3d6c801ffa051f42188c917b17f171aedaeddf
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Thu Dec 6 15:46:57 2018 +0100
Commit: Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Fri Dec 7 10:19:11 2018 +0100
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: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx
index 254c81445997..d848ff219792 100644
--- a/vcl/inc/qt5/Qt5Instance.hxx
+++ b/vcl/inc/qt5/Qt5Instance.hxx
@@ -40,6 +40,7 @@ class VCLPLUG_QT5_PUBLIC Qt5Instance : public QObject,
osl::Condition m_aWaitingYieldCond;
int m_postUserEventId;
const bool m_bUseCairo;
+ css::uno::Reference<css::uno::XInterface> m_xClipboard;
public:
std::unique_ptr<QApplication> m_pQApplication;
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index 8215b67b71ea..1acf49d4505a 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -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> xClipboard(
- static_cast<cppu::OWeakObject*>(new VclQt5Clipboard()));
+ if (!m_xClipboard.is())
+ {
+ css::uno::Reference<css::uno::XInterface> xClipboard(
+ static_cast<cppu::OWeakObject*>(new VclQt5Clipboard()));
+ m_xClipboard = xClipboard;
+ }
- return xClipboard;
+ return m_xClipboard;
}
Reference<XInterface> Qt5Instance::CreateDragSource()
More information about the Libreoffice-commits
mailing list