Commit ca0b2de7 authored by Sergey.Tsarkov's avatar Sergey.Tsarkov Committed by Alexander Trofimov

поправлены баги в формулах

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@55674 954022d7-b5bf-4e40-9824-e11837661b57
parent abfa5e32
......@@ -3500,15 +3500,15 @@ public:
int res = c_oSerConstants::ReadOk;
if ( c_oSer_OMathBottomNodesValType::Val == type )
{
BYTE CGpRule;
CString sCGpRule (_T("centered"));
CGpRule = m_oBufferedStream.ReadByte();
switch(CGpRule)
LONG lVal;
lVal = m_oBufferedStream.ReadLong();
CString sVal(_T("<m:cGpRule"));
if (lVal)
{
case 0: sCGpRule = _T("centered");break;
case 1: sCGpRule = _T("match");break;
CString sXml; sXml.Format(_T(" m:val=\"%d\""), lVal);
sVal.Append(sXml);
}
CString sVal; sVal.Format(_T("<m:cGpRule m:val=\"%s\" />"), sCGpRule);
sVal.Append(_T(" />"));
GetRunStringWriter().WriteString(sVal);
}
else
......@@ -4648,15 +4648,15 @@ public:
int res = c_oSerConstants::ReadOk;
if ( c_oSer_OMathBottomNodesValType::Val == type )
{
BYTE RSpRule;
CString sRSpRule (_T("centered"));
RSpRule = m_oBufferedStream.ReadByte();
switch(RSpRule)
LONG lVal;
lVal = m_oBufferedStream.ReadLong();
CString sVal(_T("<m:rSpRule"));
if (lVal)
{
case 0: sRSpRule = _T("centered");break;
case 1: sRSpRule = _T("match");break;
CString sXml; sXml.Format(_T(" m:val=\"%d\""), lVal);
sVal.Append(sXml);
}
CString sVal; sVal.Format(_T("<m:rSpRule m:val=\"%s\" />"), sRSpRule);
sVal.Append(_T(" />"));
GetRunStringWriter().WriteString(sVal);
}
else
......
......@@ -3334,8 +3334,8 @@ namespace BinDocxRW
if (pCGpRule.m_val.IsInit())
{
m_oBcw.m_oStream.WriteByte(c_oSer_OMathBottomNodesValType::Val);
m_oBcw.m_oStream.WriteByte(c_oSerPropLenType::Byte);
m_oBcw.m_oStream.WriteByte(pCGpRule.m_val->GetValue());
m_oBcw.m_oStream.WriteByte(c_oSerPropLenType::Long);
m_oBcw.m_oStream.WriteLong(pCGpRule.m_val->GetValue());
}
m_oBcw.WriteItemEnd(nCurPos);
}
......@@ -4057,8 +4057,8 @@ namespace BinDocxRW
if (pRSpRule.m_val.IsInit())
{
m_oBcw.m_oStream.WriteByte(c_oSer_OMathBottomNodesValType::Val);
m_oBcw.m_oStream.WriteByte(c_oSerPropLenType::Byte);
m_oBcw.m_oStream.WriteByte(pRSpRule.m_val->GetValue());
m_oBcw.m_oStream.WriteByte(c_oSerPropLenType::Long);
m_oBcw.m_oStream.WriteLong(pRSpRule.m_val->GetValue());
}
m_oBcw.WriteItemEnd(nCurPos);
}
......
......@@ -432,6 +432,11 @@ namespace SimpleTypes
{
m_eValue = _wtoi( sValue );
if (m_eValue < 0)
m_eValue = 0;
if (m_eValue > 4)
m_eValue = 4;
return m_eValue;
}
......
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