diff options
author | Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> | 2019-10-02 13:31:46 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-10-07 16:02:31 +0200 |
commit | 29e12fe99d38ce2a35b946f6a851940e347713dd (patch) | |
tree | 293ce87d4701889562c62e16b347593dac607d0b /vcl/inc/qt5 | |
parent | 1506c5e1f7228b23b8cee461701ab9dc8eccde27 (diff) |
tdf#112368 Qt5 don't lose ownership in flushClipboard
I didn't know that flushClipboard is called for simple text edit
fields for C'n'P operations, and not just on LO shutdown. This way
the simple text is actually secured in the clipboard instandly, as
there aren't complex mime-types to generate and secure.
As a result we also need to protect flushClipboard from loosing
ownership, which wasn't needed for the shutdown-only case, as this
would give up ownership anyway.
Change-Id: Ib3cd4979228fc645a27c658abb3df38ccf8c8956
Reviewed-on: https://gerrit.libreoffice.org/80042
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/qt5')
-rw-r--r-- | vcl/inc/qt5/Qt5Clipboard.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/inc/qt5/Qt5Clipboard.hxx b/vcl/inc/qt5/Qt5Clipboard.hxx index 56d109b2e528..122184b44942 100644 --- a/vcl/inc/qt5/Qt5Clipboard.hxx +++ b/vcl/inc/qt5/Qt5Clipboard.hxx @@ -38,7 +38,9 @@ class Qt5Clipboard final osl::Mutex m_aMutex; const OUString m_aClipboardName; const QClipboard::Mode m_aClipboardMode; - bool m_bInSetContents; + // has to be set, if LO changes the QClipboard itself, so it won't instantly lose + // ownership by it's self-triggered QClipboard::changed handler + bool m_bOwnClipboardChange; // if not empty, this holds the setContents provided XTransferable or a Qt5ClipboardTransferable css::uno::Reference<css::datatransfer::XTransferable> m_aContents; |