diff options
author | Philipp Hofer <philipp.hofer@protonmail.com> | 2020-11-12 13:11:00 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-21 13:16:53 +0100 |
commit | 70e36068a43cb6747232441ee67e609c86362aa0 (patch) | |
tree | ca05d17c538d3230ff904296fbb7625b2d7d5660 /sal/textenc | |
parent | e8e093f14b698fc710930b2dead57c7d4fb63b8e (diff) |
tdf#123936 Formatting files in module sal with clang-format
Change-Id: I04a773e8fd565f57dc0eb887fb4714b6edbb35e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105699
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
Diffstat (limited to 'sal/textenc')
-rw-r--r-- | sal/textenc/context.cxx | 13 | ||||
-rw-r--r-- | sal/textenc/context.hxx | 6 | ||||
-rw-r--r-- | sal/textenc/gettextencodingdata.hxx | 3 | ||||
-rw-r--r-- | sal/textenc/unichars.cxx | 6 | ||||
-rw-r--r-- | sal/textenc/unichars.hxx | 10 |
5 files changed, 16 insertions, 22 deletions
diff --git a/sal/textenc/context.cxx b/sal/textenc/context.cxx index 1b7a2eff8a40..7d7e75d3b878 100644 --- a/sal/textenc/context.cxx +++ b/sal/textenc/context.cxx @@ -21,23 +21,22 @@ #include "context.hxx" -void * ImplCreateUnicodeToTextContext() +void* ImplCreateUnicodeToTextContext() { - ImplUnicodeToTextContext * pContext = new ImplUnicodeToTextContext; + ImplUnicodeToTextContext* pContext = new ImplUnicodeToTextContext; pContext->m_nHighSurrogate = 0; return pContext; } -void ImplResetUnicodeToTextContext(void * pContext) +void ImplResetUnicodeToTextContext(void* pContext) { if (pContext) - static_cast< ImplUnicodeToTextContext * >(pContext)->m_nHighSurrogate = - 0; + static_cast<ImplUnicodeToTextContext*>(pContext)->m_nHighSurrogate = 0; } -void ImplDestroyUnicodeToTextContext(void * pContext) +void ImplDestroyUnicodeToTextContext(void* pContext) { - delete static_cast< ImplUnicodeToTextContext * >(pContext); + delete static_cast<ImplUnicodeToTextContext*>(pContext); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/textenc/context.hxx b/sal/textenc/context.hxx index e887bab53ccc..11684cf49f61 100644 --- a/sal/textenc/context.hxx +++ b/sal/textenc/context.hxx @@ -26,10 +26,10 @@ struct ImplUnicodeToTextContext sal_Unicode m_nHighSurrogate; }; -void * ImplCreateUnicodeToTextContext(); +void* ImplCreateUnicodeToTextContext(); -void ImplResetUnicodeToTextContext(void * pContext); +void ImplResetUnicodeToTextContext(void* pContext); -void ImplDestroyUnicodeToTextContext(void * pContext); +void ImplDestroyUnicodeToTextContext(void* pContext); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/textenc/gettextencodingdata.hxx b/sal/textenc/gettextencodingdata.hxx index 88f22be36424..8dbab7c08980 100644 --- a/sal/textenc/gettextencodingdata.hxx +++ b/sal/textenc/gettextencodingdata.hxx @@ -25,7 +25,6 @@ #include "tenchelp.hxx" -ImplTextEncodingData const * -Impl_getTextEncodingData(rtl_TextEncoding nEncoding); +ImplTextEncodingData const* Impl_getTextEncodingData(rtl_TextEncoding nEncoding); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/textenc/unichars.cxx b/sal/textenc/unichars.cxx index 165ebbeb78de..abd6945cfb31 100644 --- a/sal/textenc/unichars.cxx +++ b/sal/textenc/unichars.cxx @@ -27,8 +27,7 @@ bool ImplIsControlOrFormat(sal_uInt32 nUtf32) // <http://www.unicode.org/Public/UNIDATA/UnicodeData.txt>, Version 3.1.1, // that have a General Category of Cc (Other, Control) or Cf (Other, // Format): - return nUtf32 <= 0x001F - || (nUtf32 >= 0x007F && nUtf32 <= 0x009F) + return nUtf32 <= 0x001F || (nUtf32 >= 0x007F && nUtf32 <= 0x009F) || nUtf32 == 0x070F // SYRIAC ABBREVIATION MARK || nUtf32 == 0x180B // MONGOLIAN FREE VARIATION SELECTOR ONE || nUtf32 == 0x180C // MONGOLIAN FREE VARIATION SELECTOR TWO @@ -70,8 +69,7 @@ bool ImplIsPrivateUse(sal_uInt32 nUtf32) // All code points of // <http://www.unicode.org/Public/UNIDATA/UnicodeData.txt>, Version 3.1.1, // that have a General Category of Co (Other, Private Use): - return (nUtf32 >= 0xE000 && nUtf32 <= 0xF8FF) - || (nUtf32 >= 0xF0000 && nUtf32 <= 0xFFFFD) + return (nUtf32 >= 0xE000 && nUtf32 <= 0xF8FF) || (nUtf32 >= 0xF0000 && nUtf32 <= 0xFFFFD) || (nUtf32 >= 0x100000 && nUtf32 <= 0x10FFFD); } diff --git a/sal/textenc/unichars.hxx b/sal/textenc/unichars.hxx index e11e47493183..8ca1021da005 100644 --- a/sal/textenc/unichars.hxx +++ b/sal/textenc/unichars.hxx @@ -31,13 +31,11 @@ bool ImplIsControlOrFormat(sal_uInt32 nUtf32); -inline bool ImplIsHighSurrogate(sal_uInt32 nUtf32) -{ return nUtf32 >= 0xD800 && nUtf32 <= 0xDBFF; } - // All code points that are high-surrogates, as of Unicode 3.1.1. +// All code points that are high-surrogates, as of Unicode 3.1.1. +inline bool ImplIsHighSurrogate(sal_uInt32 nUtf32) { return nUtf32 >= 0xD800 && nUtf32 <= 0xDBFF; } -inline bool ImplIsLowSurrogate(sal_uInt32 nUtf32) -{ return nUtf32 >= 0xDC00 && nUtf32 <= 0xDFFF; } - // All code points that are low-surrogates, as of Unicode 3.1.1. +// All code points that are low-surrogates, as of Unicode 3.1.1. +inline bool ImplIsLowSurrogate(sal_uInt32 nUtf32) { return nUtf32 >= 0xDC00 && nUtf32 <= 0xDFFF; } bool ImplIsPrivateUse(sal_uInt32 nUtf32); |