mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
убрал min & max. У кого проблемы - тот и меняет у себя
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63678 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
b8f1d41eef
commit
53e35b5afa
@ -1,4 +1,4 @@
|
||||
#ifndef _BUILD_STRING_CROSSPLATFORM_H_
|
||||
#ifndef _BUILD_STRING_CROSSPLATFORM_H_
|
||||
#define _BUILD_STRING_CROSSPLATFORM_H_
|
||||
|
||||
#include "CPEncodings/CodePage.h"
|
||||
@ -84,7 +84,7 @@ namespace NSStringExt
|
||||
SINGLE_BYTE_ENCODING_CP874 = 0xDE, // THAI_CHARSET 222 (xDE)
|
||||
SINGLE_BYTE_ENCODING_CP1361 = 0x82, // JOHAB_CHARSET 130 (x82)
|
||||
SINGLE_BYTE_ENCODING_CP1258 = 0xA3, // VIETNAMESE_CHARSET 163 (xA3)
|
||||
SINGLE_BYTE_ENCODING_CP866 = 0xFF // OEM_CHARSET 255 (xFF) // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> OEM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CP866
|
||||
SINGLE_BYTE_ENCODING_CP866 = 0xFF // OEM_CHARSET 255 (xFF) // Проверить, что OEM соответствует CP866
|
||||
} ESingleByteEncoding;
|
||||
|
||||
static std::wstring GetUnicodeFromSingleByteString(const unsigned char* pData, long lCount, ESingleByteEncoding eType = SINGLE_BYTE_ENCODING_DEFAULT)
|
||||
@ -105,7 +105,7 @@ namespace NSStringExt
|
||||
}
|
||||
case SINGLE_BYTE_ENCODING_SYMBOL:
|
||||
{
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0xF000 <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// Добавляем 0xF000 к кодам всех символов
|
||||
for (long i = 0; i < lCount; ++i)
|
||||
{
|
||||
pUnicode[i] = (wchar_t)(0xF000 | (unsigned char)pData[i]);
|
||||
@ -255,7 +255,7 @@ namespace NSStringExt
|
||||
}
|
||||
else if (wLeading >= 0xDC00)
|
||||
{
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// Такого не должно быть
|
||||
continue;
|
||||
}
|
||||
else
|
||||
@ -264,7 +264,7 @@ namespace NSStringExt
|
||||
wTrailing = *wsInput++;
|
||||
if (wTrailing < 0xDC00 || wTrailing > 0xDFFF)
|
||||
{
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// Такого не должно быть
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
||||
@ -99,13 +99,6 @@ typedef long HRESULT;
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#include "winerror.h"
|
||||
#ifndef max
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef min
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
#else
|
||||
#ifndef S_OK
|
||||
#define S_OK ((HRESULT)0x00000000L)
|
||||
|
||||
@ -59,6 +59,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined (_WIN64)
|
||||
#ifndef NOMINMAX
|
||||
#ifndef min
|
||||
#define min(a,b) (((a)<(b))?(a):(b))
|
||||
#endif
|
||||
@ -66,6 +67,7 @@
|
||||
#define max(a,b) (((a)>(b))?(a):(b))
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef PI
|
||||
#define PI 3.141592653589793f
|
||||
|
||||
Reference in New Issue
Block a user