[Libreoffice-commits] core.git: desktop/source solenv/clang-format

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon May 6 13:18:07 UTC 2019


 desktop/source/lib/lokclipboard.cxx |   31 +++++++++++++++----------------
 desktop/source/lib/lokclipboard.hxx |    6 ++++--
 solenv/clang-format/blacklist       |    2 --
 3 files changed, 19 insertions(+), 20 deletions(-)

New commits:
commit b86ca947115f2ef61dd71c7a43e7a3ec1f1cf3b0
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon May 6 14:27:04 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon May 6 15:16:58 2019 +0200

    desktop: turn on clang-format for lokclipboard
    
    This had manual consistent formatting. Recently it was broken, so bring
    back consisency by using clang-format.
    
    Change-Id: If4303e379ddc77e5190f8e8e42737b4f7d680a71
    Reviewed-on: https://gerrit.libreoffice.org/71857
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/desktop/source/lib/lokclipboard.cxx b/desktop/source/lib/lokclipboard.cxx
index b02dc3ca172b..e8c8644eff84 100644
--- a/desktop/source/lib/lokclipboard.cxx
+++ b/desktop/source/lib/lokclipboard.cxx
@@ -17,26 +17,25 @@ uno::Reference<datatransfer::XTransferable> SAL_CALL LOKClipboard::getContents()
     return m_xTransferable;
 }
 
-void SAL_CALL LOKClipboard::setContents(const uno::Reference<datatransfer::XTransferable>& xTransferable,
-                                        const uno::Reference<datatransfer::clipboard::XClipboardOwner>& /*xClipboardOwner*/)
+void SAL_CALL LOKClipboard::setContents(
+    const uno::Reference<datatransfer::XTransferable>& xTransferable,
+    const uno::Reference<datatransfer::clipboard::XClipboardOwner>& /*xClipboardOwner*/)
 {
     m_xTransferable = xTransferable;
 }
 
-OUString SAL_CALL LOKClipboard::getName()
-{
-    return OUString();
-}
+OUString SAL_CALL LOKClipboard::getName() { return OUString(); }
 
 LOKTransferable::LOKTransferable(const char* pMimeType, const char* pData, std::size_t nSize)
-    : m_aMimeType(OUString::fromUtf8(pMimeType)),
-      m_aSequence(reinterpret_cast<const sal_Int8*>(pData), nSize)
+    : m_aMimeType(OUString::fromUtf8(pMimeType))
+    , m_aSequence(reinterpret_cast<const sal_Int8*>(pData), nSize)
 {
 }
 
-LOKTransferable::LOKTransferable(const OUString& sMimeType, const css::uno::Sequence<sal_Int8>& aSequence)
-        : m_aMimeType(sMimeType),
-          m_aSequence(aSequence)
+LOKTransferable::LOKTransferable(const OUString& sMimeType,
+                                 const css::uno::Sequence<sal_Int8>& aSequence)
+    : m_aMimeType(sMimeType)
+    , m_aSequence(aSequence)
 {
 }
 
@@ -58,7 +57,7 @@ std::vector<datatransfer::DataFlavor> LOKTransferable::getTransferDataFlavorsAsV
     std::vector<datatransfer::DataFlavor> aRet;
     datatransfer::DataFlavor aFlavor;
     aFlavor.MimeType = m_aMimeType;
-    aFlavor.DataType = cppu::UnoType< uno::Sequence<sal_Int8> >::get();
+    aFlavor.DataType = cppu::UnoType<uno::Sequence<sal_Int8>>::get();
 
     sal_Int32 nIndex(0);
     if (m_aMimeType.getToken(0, ';', nIndex) == "text/plain")
@@ -80,10 +79,10 @@ uno::Sequence<datatransfer::DataFlavor> SAL_CALL LOKTransferable::getTransferDat
 sal_Bool SAL_CALL LOKTransferable::isDataFlavorSupported(const datatransfer::DataFlavor& rFlavor)
 {
     const std::vector<datatransfer::DataFlavor> aFlavors = getTransferDataFlavorsAsVector();
-    return std::any_of(aFlavors.begin(), aFlavors.end(), [&rFlavor](const datatransfer::DataFlavor& i)
-    {
-        return i.MimeType == rFlavor.MimeType && i.DataType == rFlavor.DataType;
-    });
+    return std::any_of(aFlavors.begin(), aFlavors.end(),
+                       [&rFlavor](const datatransfer::DataFlavor& i) {
+                           return i.MimeType == rFlavor.MimeType && i.DataType == rFlavor.DataType;
+                       });
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/lib/lokclipboard.hxx b/desktop/source/lib/lokclipboard.hxx
index ae83eb6dd2e6..c8896d01e739 100644
--- a/desktop/source/lib/lokclipboard.hxx
+++ b/desktop/source/lib/lokclipboard.hxx
@@ -23,8 +23,10 @@ class LOKClipboard : public cppu::WeakImplHelper<css::datatransfer::clipboard::X
 public:
     css::uno::Reference<css::datatransfer::XTransferable> SAL_CALL getContents() override;
 
-    void SAL_CALL setContents(const css::uno::Reference<css::datatransfer::XTransferable>& xTransferable,
-                              const css::uno::Reference<css::datatransfer::clipboard::XClipboardOwner>& xClipboardOwner) override;
+    void SAL_CALL setContents(
+        const css::uno::Reference<css::datatransfer::XTransferable>& xTransferable,
+        const css::uno::Reference<css::datatransfer::clipboard::XClipboardOwner>& xClipboardOwner)
+        override;
 
     OUString SAL_CALL getName() override;
 };
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index e270e474ea51..0d6806032587 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -3710,8 +3710,6 @@ desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
 desktop/source/inc/helpids.h
 desktop/source/lib/init.cxx
 desktop/source/lib/lokandroid.cxx
-desktop/source/lib/lokclipboard.cxx
-desktop/source/lib/lokclipboard.hxx
 desktop/source/lib/lokinteractionhandler.cxx
 desktop/source/lib/lokinteractionhandler.hxx
 desktop/source/migration/migration.cxx


More information about the Libreoffice-commits mailing list