[Libreoffice-commits] core.git: vcl/qt5

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 13 21:22:09 UTC 2019


 vcl/qt5/Qt5Clipboard.cxx |   68 +++++++++++++++++++++++------------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

New commits:
commit cc82a2e92ae99a6cf5ae304e2b9b8dcffa3f514d
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sun Jun 9 14:43:59 2019 +0000
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jun 13 23:21:00 2019 +0200

    Qt5 move boilerplate clipboard code to the end...
    
    ... in the implementation file.
    
    Change-Id: I1f6fae0eb7c5d6973ce44320ff6d977e40d54a72
    Reviewed-on: https://gerrit.libreoffice.org/73734
    Tested-by: Jenkins
    Reviewed-by: Aleksei Nikiforov <darktemplar at basealt.ru>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/qt5/Qt5Clipboard.cxx b/vcl/qt5/Qt5Clipboard.cxx
index 50126e6d3d4e..8db5dd2ce97c 100644
--- a/vcl/qt5/Qt5Clipboard.cxx
+++ b/vcl/qt5/Qt5Clipboard.cxx
@@ -69,21 +69,6 @@ void Qt5Clipboard::flushClipboard()
     });
 }
 
-OUString Qt5Clipboard::getImplementationName()
-{
-    return OUString("com.sun.star.datatransfer.Qt5Clipboard");
-}
-
-css::uno::Sequence<OUString> Qt5Clipboard::getSupportedServiceNames()
-{
-    return { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
-}
-
-sal_Bool Qt5Clipboard::supportsService(const OUString& ServiceName)
-{
-    return cppu::supportsService(this, ServiceName);
-}
-
 css::uno::Reference<css::datatransfer::XTransferable> Qt5Clipboard::getContents()
 {
     osl::MutexGuard aGuard(m_aMutex);
@@ -135,25 +120,6 @@ void Qt5Clipboard::setContents(
         xOldOwner->lostOwnership(this, xOldContents);
 }
 
-OUString Qt5Clipboard::getName() { return m_aClipboardName; }
-
-sal_Int8 Qt5Clipboard::getRenderingCapabilities() { return 0; }
-
-void Qt5Clipboard::addClipboardListener(
-    const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
-{
-    osl::MutexGuard aGuard(m_aMutex);
-    m_aListeners.push_back(listener);
-}
-
-void Qt5Clipboard::removeClipboardListener(
-    const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
-{
-    osl::MutexGuard aGuard(m_aMutex);
-    m_aListeners.erase(std::remove(m_aListeners.begin(), m_aListeners.end(), listener),
-                       m_aListeners.end());
-}
-
 void Qt5Clipboard::handleChanged(QClipboard::Mode aMode)
 {
     if (aMode != m_aClipboardMode)
@@ -184,6 +150,40 @@ void Qt5Clipboard::handleChanged(QClipboard::Mode aMode)
         listener->changedContents(aEv);
 }
 
+OUString Qt5Clipboard::getImplementationName()
+{
+    return OUString("com.sun.star.datatransfer.Qt5Clipboard");
+}
+
+css::uno::Sequence<OUString> Qt5Clipboard::getSupportedServiceNames()
+{
+    return { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
+}
+
+sal_Bool Qt5Clipboard::supportsService(const OUString& ServiceName)
+{
+    return cppu::supportsService(this, ServiceName);
+}
+
+OUString Qt5Clipboard::getName() { return m_aClipboardName; }
+
+sal_Int8 Qt5Clipboard::getRenderingCapabilities() { return 0; }
+
+void Qt5Clipboard::addClipboardListener(
+    const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
+{
+    osl::MutexGuard aGuard(m_aMutex);
+    m_aListeners.push_back(listener);
+}
+
+void Qt5Clipboard::removeClipboardListener(
+    const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
+{
+    osl::MutexGuard aGuard(m_aMutex);
+    m_aListeners.erase(std::remove(m_aListeners.begin(), m_aListeners.end(), listener),
+                       m_aListeners.end());
+}
+
 bool Qt5Clipboard::isSupported(const QClipboard::Mode aMode)
 {
     const QClipboard* pClipboard = QApplication::clipboard();


More information about the Libreoffice-commits mailing list