mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Rtf, txt - поправлены разные мелкие неточности
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@67595 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
926ccd9685
commit
1e0b2ea3cd
@ -41,7 +41,14 @@ CString RtfChar::renderRtfText( CString& sText, void* poDocument, RtfCharPropert
|
||||
nCodePage = CP_ACP;
|
||||
|
||||
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);
|
||||
//обратное преобразование чтобы понять какие символы свонвертировались неправильно
|
||||
|
||||
@ -702,7 +702,7 @@ CString RtfCharProperty::RenderToOOX(RenderParameter oRenderParameter)
|
||||
RENDER_OOX_BOOL( m_bImprint, sResult, _T("w:imprint") )
|
||||
RENDER_OOX_INT( m_nKerning, sResult, _T("w:kern") )
|
||||
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_bOutline, sResult, _T("w:outline") )
|
||||
RENDER_OOX_BOOL( m_bScaps, sResult, _T("w:smallCaps") )
|
||||
|
||||
@ -53,7 +53,11 @@ namespace StlUtils
|
||||
|
||||
static int ToInteger(const std::string& strValue)
|
||||
{
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
return atoi(strValue.c_str());
|
||||
#else
|
||||
return std::stoi(strValue);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int ToInteger(const std::wstring& strValue)
|
||||
@ -67,7 +71,11 @@ namespace StlUtils
|
||||
|
||||
static double ToDouble(const std::string& strValue)
|
||||
{
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
return atof(strValue.c_str());
|
||||
#else
|
||||
return std::stod(strValue.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
static double ToDouble(const std::wstring& strValue)
|
||||
|
||||
@ -822,8 +822,8 @@ namespace NSFile
|
||||
}
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(_WIN64)
|
||||
src.open(strSrc, std::ios::binary);
|
||||
dst.open(strDst, std::ios::binary);
|
||||
src.open(strSrc.c_str(), std::ios::binary);
|
||||
dst.open(strDst.c_str(), std::ios::binary);
|
||||
#else
|
||||
BYTE* pUtf8Src = NULL;
|
||||
LONG lLenSrc = 0;
|
||||
|
||||
Reference in New Issue
Block a user