From b86ca947115f2ef61dd71c7a43e7a3ec1f1cf3b0 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 6 May 2019 14:27:04 +0200 Subject: 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 Tested-by: Jenkins --- desktop/source/lib/lokclipboard.cxx | 31 +++++++++++++++---------------- desktop/source/lib/lokclipboard.hxx | 6 ++++-- 2 files changed, 19 insertions(+), 18 deletions(-) (limited to 'desktop') 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 SAL_CALL LOKClipboard::getContents() return m_xTransferable; } -void SAL_CALL LOKClipboard::setContents(const uno::Reference& xTransferable, - const uno::Reference& /*xClipboardOwner*/) +void SAL_CALL LOKClipboard::setContents( + const uno::Reference& xTransferable, + const uno::Reference& /*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(pData), nSize) + : m_aMimeType(OUString::fromUtf8(pMimeType)) + , m_aSequence(reinterpret_cast(pData), nSize) { } -LOKTransferable::LOKTransferable(const OUString& sMimeType, const css::uno::Sequence& aSequence) - : m_aMimeType(sMimeType), - m_aSequence(aSequence) +LOKTransferable::LOKTransferable(const OUString& sMimeType, + const css::uno::Sequence& aSequence) + : m_aMimeType(sMimeType) + , m_aSequence(aSequence) { } @@ -58,7 +57,7 @@ std::vector LOKTransferable::getTransferDataFlavorsAsV std::vector aRet; datatransfer::DataFlavor aFlavor; aFlavor.MimeType = m_aMimeType; - aFlavor.DataType = cppu::UnoType< uno::Sequence >::get(); + aFlavor.DataType = cppu::UnoType>::get(); sal_Int32 nIndex(0); if (m_aMimeType.getToken(0, ';', nIndex) == "text/plain") @@ -80,10 +79,10 @@ uno::Sequence SAL_CALL LOKTransferable::getTransferDat sal_Bool SAL_CALL LOKTransferable::isDataFlavorSupported(const datatransfer::DataFlavor& rFlavor) { const std::vector 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 SAL_CALL getContents() override; - void SAL_CALL setContents(const css::uno::Reference& xTransferable, - const css::uno::Reference& xClipboardOwner) override; + void SAL_CALL setContents( + const css::uno::Reference& xTransferable, + const css::uno::Reference& xClipboardOwner) + override; OUString SAL_CALL getName() override; }; -- cgit