Commit 1e0b2ea3 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

Rtf, txt - поправлены разные мелкие неточности

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@67595 954022d7-b5bf-4e40-9824-e11837661b57
parent 926ccd96
...@@ -41,7 +41,14 @@ CString RtfChar::renderRtfText( CString& sText, void* poDocument, RtfCharPropert ...@@ -41,7 +41,14 @@ CString RtfChar::renderRtfText( CString& sText, void* poDocument, RtfCharPropert
nCodePage = CP_ACP; nCodePage = CP_ACP;
std::wstring unicodeStr (sText.GetBuffer(), sText.GetLength()); std::wstring unicodeStr (sText.GetBuffer(), sText.GetLength());
std::string ansiStr = RtfUtility::convert_string(unicodeStr.begin(), unicodeStr.end(), nCodePage); std::string ansiStr ;
if (unicodeStr.empty())
{
return sResult;
}
ansiStr = RtfUtility::convert_string(unicodeStr.begin(), unicodeStr.end(), nCodePage);
CString sTextBack = RtfUtility::convert_string(ansiStr.begin(), ansiStr.end(), nCodePage); CString sTextBack = RtfUtility::convert_string(ansiStr.begin(), ansiStr.end(), nCodePage);
//обратное преобразование чтобы понять какие символы свонвертировались неправильно //обратное преобразование чтобы понять какие символы свонвертировались неправильно
......
...@@ -702,7 +702,7 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter) ...@@ -702,7 +702,7 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
RENDER_OOX_BOOL( m_bImprint, sResult, _T("w:imprint") ) RENDER_OOX_BOOL( m_bImprint, sResult, _T("w:imprint") )
RENDER_OOX_INT( m_nKerning, sResult, _T("w:kern") ) RENDER_OOX_INT( m_nKerning, sResult, _T("w:kern") )
if(m_bRightToLeft !=0 && m_bRightToLeft != PROP_DEF) if(m_bRightToLeft !=0 && m_bRightToLeft != PROP_DEF)
sResult.Append(_T("<w:rtl />")); sResult.Append(_T("<w:rtl/>"));
RENDER_OOX_BOOL( m_nComplexScript, sResult, _T("w:cs") ) RENDER_OOX_BOOL( m_nComplexScript, sResult, _T("w:cs") )
RENDER_OOX_BOOL( m_bOutline, sResult, _T("w:outline") ) RENDER_OOX_BOOL( m_bOutline, sResult, _T("w:outline") )
RENDER_OOX_BOOL( m_bScaps, sResult, _T("w:smallCaps") ) RENDER_OOX_BOOL( m_bScaps, sResult, _T("w:smallCaps") )
......
...@@ -53,7 +53,11 @@ namespace StlUtils ...@@ -53,7 +53,11 @@ namespace StlUtils
static int ToInteger(const std::string& strValue) static int ToInteger(const std::string& strValue)
{ {
#if defined(_WIN32) || defined(_WIN64)
return atoi(strValue.c_str());
#else
return std::stoi(strValue); return std::stoi(strValue);
#endif
} }
static int ToInteger(const std::wstring& strValue) static int ToInteger(const std::wstring& strValue)
...@@ -67,7 +71,11 @@ namespace StlUtils ...@@ -67,7 +71,11 @@ namespace StlUtils
static double ToDouble(const std::string& strValue) static double ToDouble(const std::string& strValue)
{ {
#if defined(_WIN32) || defined(_WIN64)
return atof(strValue.c_str());
#else
return std::stod(strValue.c_str()); return std::stod(strValue.c_str());
#endif
} }
static double ToDouble(const std::wstring& strValue) static double ToDouble(const std::wstring& strValue)
......
...@@ -822,8 +822,8 @@ namespace NSFile ...@@ -822,8 +822,8 @@ namespace NSFile
} }
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
src.open(strSrc, std::ios::binary); src.open(strSrc.c_str(), std::ios::binary);
dst.open(strDst, std::ios::binary); dst.open(strDst.c_str(), std::ios::binary);
#else #else
BYTE* pUtf8Src = NULL; BYTE* pUtf8Src = NULL;
LONG lLenSrc = 0; LONG lLenSrc = 0;
......
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