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