[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - vcl/inc vcl/qt5

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 15 16:33:58 UTC 2019


 vcl/inc/qt5/Qt5Instance.hxx |    1 +
 vcl/qt5/Qt5Instance.cxx     |   10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit b1bf67a95262d3fdeca019b9d37b72eb970a4e40
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Thu Dec 6 15:46:57 2018 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Tue Jan 15 17:33:36 2019 +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>
    (cherry picked from commit 1e3d6c801ffa051f42188c917b17f171aedaeddf)
    Reviewed-on: https://gerrit.libreoffice.org/65153
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 4963b550f6b3994853a318bdc497a2838334495f)
    Reviewed-on: https://gerrit.libreoffice.org/66301
    Tested-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx
index 529ec3d2779c..d2b3bcd30934 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 cc8ecf4fad7b..0fdd51b0e23f 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -246,10 +246,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