Commit d9676011 authored by Sergey.Tsarkov's avatar Sergey.Tsarkov Committed by Alexander Trofimov

переделка под iOS

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@61690 954022d7-b5bf-4e40-9824-e11837661b57
parent c5827e55
...@@ -704,7 +704,7 @@ void CEquationReader::HandleRuler() ...@@ -704,7 +704,7 @@ void CEquationReader::HandleRuler()
void CEquationReader::HandleFont() void CEquationReader::HandleFont()
{ {
uint8_t nTFace, nStyle; uint8_t nTFace, nStyle;
String sName; MathString sName;
*pS >> nTFace; *pS >> nTFace;
*pS >> nStyle; *pS >> nStyle;
......
#ifndef _MATH_EQUATION_STRING_H #ifndef _MATH_EQUATION_MATHSTRING_H
#define _MATH_EQUATION_STRING_H #define _MATH_EQUATION_MATHSTRING_H
#include <string> #include <string>
...@@ -7,33 +7,33 @@ namespace MathEquation ...@@ -7,33 +7,33 @@ namespace MathEquation
{ {
#define STRING_NOTFOUND std::string::npos #define STRING_NOTFOUND std::string::npos
class String class MathString
{ {
public: public:
String() {} MathString() {}
String(const char* val) : Value(val){} MathString(const char* val) : Value(val){}
String(std::string val) : Value(val){} MathString(std::string val) : Value(val){}
String &operator=(String &other) MathString &operator=(MathString &other)
{ {
Value = other.Value; Value = other.Value;
return (*this); return (*this);
} }
String &operator+=(const String &other) MathString &operator+=(const MathString &other)
{ {
Value += other.Value; Value += other.Value;
return (*this); return (*this);
} }
String &operator+=(const char* sChars) MathString &operator+=(const char* sChars)
{ {
Value += std::string(sChars); Value += std::string(sChars);
return (*this); return (*this);
} }
String &operator+=(const char unChar) MathString &operator+=(const char unChar)
{ {
char oChars[2]; char oChars[2];
oChars[0] = unChar; oChars[1] = 0x00; oChars[0] = unChar; oChars[1] = 0x00;
...@@ -46,7 +46,7 @@ namespace MathEquation ...@@ -46,7 +46,7 @@ namespace MathEquation
Value.append(str); Value.append(str);
} }
void Append(String str) void Append(MathString str)
{ {
Value.append(str.Value); Value.append(str.Value);
} }
...@@ -83,7 +83,7 @@ namespace MathEquation ...@@ -83,7 +83,7 @@ namespace MathEquation
Value.insert(nPos, str); Value.insert(nPos, str);
} }
void Insert(String str, int nPos) void Insert(MathString str, int nPos)
{ {
Value.insert(nPos, str.Value); Value.insert(nPos, str.Value);
} }
...@@ -93,12 +93,12 @@ namespace MathEquation ...@@ -93,12 +93,12 @@ namespace MathEquation
return (int)Value.rfind(nChar); return (int)Value.rfind(nChar);
} }
static String CreateFromInt32(int nValue) static MathString CreateFromInt32(int nValue)
{ {
#ifdef _WIN32 #ifdef _WIN32
char intStr[32]; char intStr[32];
_itoa_s(nValue, (char *)&intStr, 32, 10); _itoa_s(nValue, (char *)&intStr, 32, 10);
return String(intStr); return MathString(intStr);
#else #else
return std::to_string(nValue);; return std::to_string(nValue);;
#endif #endif
......
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