From fd8c06aded20cfd6b4f9c729cec120c0d2d574aa Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Apr 2015 09:52:41 +0100 Subject: duplicate surrogate code Change-Id: I9fad024e4b5c8a4ca272f2387df07351198cf5dc --- include/tools/inetmime.hxx | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'include/tools') diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx index 020e16a2e13c..45bf02a5878e 100644 --- a/include/tools/inetmime.hxx +++ b/include/tools/inetmime.hxx @@ -262,13 +262,6 @@ public: */ static sal_uInt32 getHexDigit(int nWeight); - static inline bool isHighSurrogate(sal_uInt32 nUTF16); - - static inline bool isLowSurrogate(sal_uInt32 nUTF16); - - static inline sal_uInt32 toUTF32(sal_Unicode cHighSurrogate, - sal_Unicode cLowSurrogate); - /** Check two US-ASCII strings for equality, ignoring case. @param pBegin1 Points to the start of the first string, must not be @@ -530,29 +523,6 @@ inline int INetMIME::getBase64Weight(sal_uInt32 nChar) nChar == '=' ? -1 : -2; } -// static -inline bool INetMIME::isHighSurrogate(sal_uInt32 nUTF16) -{ - return nUTF16 >= 0xD800 && nUTF16 <= 0xDBFF; -} - -// static -inline bool INetMIME::isLowSurrogate(sal_uInt32 nUTF16) -{ - return nUTF16 >= 0xDC00 && nUTF16 <= 0xDFFF; -} - -// static -inline sal_uInt32 INetMIME::toUTF32(sal_Unicode cHighSurrogate, - sal_Unicode cLowSurrogate) -{ - DBG_ASSERT(isHighSurrogate(cHighSurrogate) - && isLowSurrogate(cLowSurrogate), - "INetMIME::toUTF32(): Bad chars"); - return ((sal_uInt32(cHighSurrogate) & 0x3FF) << 10) - | (sal_uInt32(cLowSurrogate) & 0x3FF); -} - // static inline bool INetMIME::startsWithLineBreak(const sal_Char * pBegin, const sal_Char * pEnd) -- cgit