Commit 280ec89d authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

x2t linux 64 build version 2.0.2.345

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@67797 954022d7-b5bf-4e40-9824-e11837661b57
parent 54789158
...@@ -99,7 +99,7 @@ void BiffString::load(CFRecord& record, const size_t cch1, const bool is_wide1) ...@@ -99,7 +99,7 @@ void BiffString::load(CFRecord& record, const size_t cch1, const bool is_wide1)
if (record.getGlobalWorkbookInfo()->CodePage == 1200) if (record.getGlobalWorkbookInfo()->CodePage == 1200)
{ {
int inp_str_size = inp_str.length(); int inp_str_size = inp_str.length();
wchar_t *out_str = new wchar_t[inp_str_size + 1]; UTF16 *out_str = new UTF16[inp_str_size + 1];
char* out_str_char = (char*) out_str; char* out_str_char = (char*) out_str;
for (int i = 0; i < inp_str_size; i++) for (int i = 0; i < inp_str_size; i++)
{ {
...@@ -108,7 +108,11 @@ void BiffString::load(CFRecord& record, const size_t cch1, const bool is_wide1) ...@@ -108,7 +108,11 @@ void BiffString::load(CFRecord& record, const size_t cch1, const bool is_wide1)
} }
out_str[inp_str_size] = 0; out_str[inp_str_size] = 0;
str_ = std::wstring(out_str, inp_str_size); #if defined(_WIN32) || defined(_WIN64)
str_ = std::wstring((wchar_t*)out_str, inp_str_size);
#else
str_ = convertUtf16ToWString(out_str, inp_str_size);
#endif
delete []out_str; delete []out_str;
} }
else else
......
...@@ -314,7 +314,7 @@ void XLUnicodeRichExtendedString::loadSymbols(CFRecord& record, const size_t cch ...@@ -314,7 +314,7 @@ void XLUnicodeRichExtendedString::loadSymbols(CFRecord& record, const size_t cch
if (record.getGlobalWorkbookInfo()->CodePage == 1200) if (record.getGlobalWorkbookInfo()->CodePage == 1200)
{ {
int inp_str_size = inp_str.length(); int inp_str_size = inp_str.length();
wchar_t *out_str = new wchar_t[inp_str_size + 1]; UTF16 *out_str = new UTF16[inp_str_size + 1];
char* out_str_char = (char*) out_str; char* out_str_char = (char*) out_str;
for (int i = 0; i < inp_str_size; i++) for (int i = 0; i < inp_str_size; i++)
{ {
...@@ -323,8 +323,12 @@ void XLUnicodeRichExtendedString::loadSymbols(CFRecord& record, const size_t cch ...@@ -323,8 +323,12 @@ void XLUnicodeRichExtendedString::loadSymbols(CFRecord& record, const size_t cch
} }
out_str[inp_str_size] = 0; out_str[inp_str_size] = 0;
str_ = std::wstring(out_str, inp_str_size); #if defined(_WIN32) || defined(_WIN64)
delete []out_str; str_ = std::wstring((wchar_t*)out_str, inp_str_size);
#else
str_ = convertUtf16ToWString(out_str, inp_str_size);
#endif
delete []out_str;
} }
else else
{ {
......
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