vcl/inc/qt5/Qt5Instance.hxx | 2 +- vcl/qt5/Qt5Instance.cxx | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-)
New commits: commit 840bc6facf0270a32c14a26de1f47cefd2fedb3d Author: Katarina Behrens <katarina.behr...@cib.de> AuthorDate: Thu Dec 13 19:15:38 2018 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Jan 15 17:34:25 2019 +0100 tdf#122042: It's two clipboards, actually Change-Id: I0e975bb73211b1d4ddb2e721659f64b361d11322 (cherry picked from commit f89cf70331c5e493f26e292fd0d7796214efea55) Reviewed-on: https://gerrit.libreoffice.org/65167 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> (cherry picked from commit d126c07e02963c1262eaa0f9f0aee0f8ed401550) Reviewed-on: https://gerrit.libreoffice.org/66303 Tested-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx index d2b3bcd30934..d43a8ef4def6 100644 --- a/vcl/inc/qt5/Qt5Instance.hxx +++ b/vcl/inc/qt5/Qt5Instance.hxx @@ -40,7 +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; + std::unordered_map<OUString, css::uno::Reference<css::uno::XInterface>> m_aClipboards; public: std::unique_ptr<QApplication> m_pQApplication; diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index 0fdd51b0e23f..bc34f1bec545 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -246,14 +246,17 @@ Qt5Instance::CreateClipboard(const css::uno::Sequence<css::uno::Any>& arguments) css::uno::Reference<css::uno::XInterface>(), -1); } - if (!m_xClipboard.is()) + auto it = m_aClipboards.find(sel); + if (it != m_aClipboards.end()) { - css::uno::Reference<css::uno::XInterface> xClipboard( - static_cast<cppu::OWeakObject*>(new VclQt5Clipboard())); - m_xClipboard = xClipboard; + return it->second; } - return m_xClipboard; + css::uno::Reference<css::uno::XInterface> xClipboard( + static_cast<cppu::OWeakObject*>(new VclQt5Clipboard())); + m_aClipboards[sel] = xClipboard; + + return xClipboard; } Reference<XInterface> Qt5Instance::CreateDragSource() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits