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

......

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62235 954022d7-b5bf-4e40-9824-e11837661b57
parent 98cf29a1
......@@ -1858,7 +1858,7 @@ private: void TryToPepairResult( RtfDocument& oDocument, RtfReader& oReader )
return;
int nCharCode = Strings::ToInteger( sCharCode );
CStringA sCharA; sCharA.AppendChar( nCharCode );
std::string sCharA; sCharA += char(nCharCode );
RtfFont oSymbolFont;
if( true == oDocument.m_oFontTable.GetFont( sCharFont, oSymbolFont ) )
......@@ -2005,11 +2005,11 @@ public:
if( true == RtfUtility::IsMacCodepage(oFont.m_nCodePage) )
bIsMac = true;
}
CStringA sBullet;
std::string sBullet;
if( true == bIsMac )
sBullet.AppendChar( nMacChar );
sBullet += (char) nMacChar;
else
sBullet.AppendChar( nWinChar );
sBullet += (char) nWinChar;
int nSkip = 0;
CString sText = RtfAbstractReader::ExecuteTextInternal( oDocument, oReader, sBullet, false, 0, nSkip );
ExecuteText( oDocument, oReader, sText );
......
......@@ -242,7 +242,10 @@ private:
else
{
token.Type = RtfToken::Control;
token.Key = (char)c/* std::to_string(c)*/;
CStringA s; s.Format("%i", c);
token.Key = s.GetBuffer();
if (c == '\'')
{
......@@ -279,7 +282,7 @@ private:
token.Key = palabraClave;
//Se comprueba si la palabra clave tiene parбmetro
if (RtfUtility::IsDigit((char)c) || c == '-')
if (RtfUtility::IsDigit(c) || c == '-')
{
token.HasParameter = true;
......@@ -323,8 +326,6 @@ private:
//while ((isalnum(c) || c == '"'|| c == ':'|| c == '/' || c == '.') &&c != '\\' && c != '}' && c != '{' && c != Eof) // иправиЃEЃEрвьD усЃEвиЃE
//while (c != '\\' && c != '}' && c != '{' && c != Eof)
//while (c != ';' &&c ! = '\\' && c != '}' && c != '{' && c != EOF)
token.Key.empty();
while (c != '\\' && c != '}' && c != '{' && c != EOF)
{
if( nTempBufPos >= m_nReadBufSize )
......@@ -345,8 +346,7 @@ private:
{
m_caReadBuffer[nTempBufPos++] = '\0';
token.Key += m_caReadBuffer ;
nTempBufPos = 0;
}
}
}
bool GetNextChar( int& nChar )
{
......
......@@ -95,8 +95,8 @@ CString RtfAbstractReader::ExecuteTextInternalCodePage( std::string& sCharString
#if defined (_WIN32) || defined (_WIN64)
int nLengthW ;
nLengthW = MultiByteToWideChar(nCodepage, 0, sCharString, -1, NULL, NULL);
MultiByteToWideChar(nCodepage, 0, sCharString, -1, sResult.GetBuffer( nLengthW ), nLengthW);
nLengthW = MultiByteToWideChar(nCodepage, 0, sCharString.c_str(), -1, NULL, NULL);
MultiByteToWideChar(nCodepage, 0, sCharString.c_str(), -1, sResult.GetBuffer( nLengthW ), nLengthW);
sResult.ReleaseBuffer();
#else
if (nCodepage > 0)
......
......@@ -113,12 +113,12 @@ public:
{
if( true == m_bSkip )
{
if( false == ExecuteCommand( oDocument, oReader, (CStringW)m_oTok.Key, m_oTok.HasParameter, m_oTok.Parameter ) )
if( false == ExecuteCommand( oDocument, oReader, CString(m_oTok.Key.c_str()), m_oTok.HasParameter, m_oTok.Parameter ) )
Skip( oDocument, oReader );
m_bSkip = false;
}
else
ExecuteCommand( oDocument, oReader, (CStringW)m_oTok.Key, m_oTok.HasParameter, m_oTok.Parameter );
ExecuteCommand( oDocument, oReader, CString(m_oTok.Key.c_str()), m_oTok.HasParameter, m_oTok.Parameter );
}
if( true == m_bCanStartNewReader )
m_bCanStartNewReader = false;
......@@ -217,7 +217,7 @@ public:
if( "39" == sKey )
{
if( true == bHasPar )
sCharString += nPar ;
sCharString += (char)nPar ;
}
else
sCharString = sKey;
......
......@@ -178,7 +178,7 @@ CString RtfDocumentProperty::RenderToOOX(RenderParameter oRenderParameter)
CString sEndnoteProp;
//todooo проверить id
for( int i = 0; i < (int)m_aSpecialEndnotes.size(); i++ )
sEndnoteProp.AppendFormat( _T("<w:endnote w:id=\"%l\" />"), m_aSpecialEndnotes[i] );
sEndnoteProp.AppendFormat( _T("<w:endnote w:id=\"%i\" />"), m_aSpecialEndnotes[i] );
if( PROP_DEF != m_nFootnoteNumberingFormat )
sFootnoteProp.AppendFormat( _T("<w:numRestart w:val=\"%ls\" />"), RtfListLevelProperty::GetFormat( m_nFootnoteNumberingFormat ).GetBuffer() );
RENDER_OOX_INT( m_nEndnoteStart, sEndnoteProp, _T("w:numStart") );
......
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