Commit 53e35b5a authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

убрал min & max. У кого проблемы - тот и меняет у себя

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63678 954022d7-b5bf-4e40-9824-e11837661b57
parent b8f1d41e
#ifndef _BUILD_STRING_CROSSPLATFORM_H_ #ifndef _BUILD_STRING_CROSSPLATFORM_H_
#define _BUILD_STRING_CROSSPLATFORM_H_ #define _BUILD_STRING_CROSSPLATFORM_H_
#include "CPEncodings/CodePage.h" #include "CPEncodings/CodePage.h"
...@@ -84,7 +84,7 @@ namespace NSStringExt ...@@ -84,7 +84,7 @@ namespace NSStringExt
SINGLE_BYTE_ENCODING_CP874 = 0xDE, // THAI_CHARSET 222 (xDE) SINGLE_BYTE_ENCODING_CP874 = 0xDE, // THAI_CHARSET 222 (xDE)
SINGLE_BYTE_ENCODING_CP1361 = 0x82, // JOHAB_CHARSET 130 (x82) SINGLE_BYTE_ENCODING_CP1361 = 0x82, // JOHAB_CHARSET 130 (x82)
SINGLE_BYTE_ENCODING_CP1258 = 0xA3, // VIETNAMESE_CHARSET 163 (xA3) SINGLE_BYTE_ENCODING_CP1258 = 0xA3, // VIETNAMESE_CHARSET 163 (xA3)
SINGLE_BYTE_ENCODING_CP866 = 0xFF // OEM_CHARSET 255 (xFF) // , OEM CP866 SINGLE_BYTE_ENCODING_CP866 = 0xFF // OEM_CHARSET 255 (xFF) // Проверить, что OEM соответствует CP866
} ESingleByteEncoding; } ESingleByteEncoding;
static std::wstring GetUnicodeFromSingleByteString(const unsigned char* pData, long lCount, ESingleByteEncoding eType = SINGLE_BYTE_ENCODING_DEFAULT) static std::wstring GetUnicodeFromSingleByteString(const unsigned char* pData, long lCount, ESingleByteEncoding eType = SINGLE_BYTE_ENCODING_DEFAULT)
...@@ -105,7 +105,7 @@ namespace NSStringExt ...@@ -105,7 +105,7 @@ namespace NSStringExt
} }
case SINGLE_BYTE_ENCODING_SYMBOL: case SINGLE_BYTE_ENCODING_SYMBOL:
{ {
// 0xF000 // Добавляем 0xF000 к кодам всех символов
for (long i = 0; i < lCount; ++i) for (long i = 0; i < lCount; ++i)
{ {
pUnicode[i] = (wchar_t)(0xF000 | (unsigned char)pData[i]); pUnicode[i] = (wchar_t)(0xF000 | (unsigned char)pData[i]);
...@@ -255,7 +255,7 @@ namespace NSStringExt ...@@ -255,7 +255,7 @@ namespace NSStringExt
} }
else if (wLeading >= 0xDC00) else if (wLeading >= 0xDC00)
{ {
// // Такого не должно быть
continue; continue;
} }
else else
...@@ -264,7 +264,7 @@ namespace NSStringExt ...@@ -264,7 +264,7 @@ namespace NSStringExt
wTrailing = *wsInput++; wTrailing = *wsInput++;
if (wTrailing < 0xDC00 || wTrailing > 0xDFFF) if (wTrailing < 0xDC00 || wTrailing > 0xDFFF)
{ {
// // Такого не должно быть
continue; continue;
} }
else else
......
...@@ -99,13 +99,6 @@ typedef long HRESULT; ...@@ -99,13 +99,6 @@ typedef long HRESULT;
#if defined(_WIN32) || defined (_WIN64) #if defined(_WIN32) || defined (_WIN64)
#include "winerror.h" #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 #else
#ifndef S_OK #ifndef S_OK
#define S_OK ((HRESULT)0x00000000L) #define S_OK ((HRESULT)0x00000000L)
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#endif #endif
#if defined(_WIN32) || defined (_WIN64) #if defined(_WIN32) || defined (_WIN64)
#ifndef NOMINMAX
#ifndef min #ifndef min
#define min(a,b) (((a)<(b))?(a):(b)) #define min(a,b) (((a)<(b))?(a):(b))
#endif #endif
...@@ -66,6 +67,7 @@ ...@@ -66,6 +67,7 @@
#define max(a,b) (((a)>(b))?(a):(b)) #define max(a,b) (((a)>(b))?(a):(b))
#endif #endif
#endif #endif
#endif
#ifndef PI #ifndef PI
#define PI 3.141592653589793f #define PI 3.141592653589793f
......
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