Kaydet (Commit) b86ca947 authored tarafından Miklos Vajna's avatar Miklos Vajna

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/71857Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
üst 8c71d280
......@@ -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: */
......@@ -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;
};
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment