Commit 18f3cf18 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

x2t:убраны заглушки на открытие/сохранение процентов

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@68890 954022d7-b5bf-4e40-9824-e11837661b57
parent 31d969e7
......@@ -1855,7 +1855,7 @@ namespace BinDocxRW
void WriteW(int nType, const ComplexTypes::Word::CTblWidth& tableW, bool bWrite2 = false)
{
int nCurPos = 0;
if(tableW.m_oW.IsInit() && tableW.m_oType.IsInit() && SimpleTypes::tblwidthPct != tableW.m_oType->GetValue())
if(tableW.m_oW.IsInit() && tableW.m_oType.IsInit())
{
if(nType >= 0)
{
......@@ -1895,7 +1895,7 @@ namespace BinDocxRW
{
m_oBcw.m_oStream.WriteBYTE(c_oSerWidthType::WDocx);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
m_oBcw.m_oStream.WriteLONG(tableW.m_oW->GetValue());
m_oBcw.m_oStream.WriteLONG(tableW.m_oW->GetValueIntegerPercent());
}
if(nType >= 0)
m_oBcw.WriteItemEnd(nCurPos);
......
......@@ -1938,6 +1938,7 @@ namespace SimpleTypes
virtual double FromString(CString &sValue)
{
//todo странно что если пришло значение от 0 до 1, то m_dValue от 0 до 1. В других случаях от 0 до 100
int nPos = sValue.Find( '%' );
int nLen = sValue.GetLength();
if ( -1 == nPos || nPos != sValue.GetLength() - 1 || nLen <= 0 )
......
......@@ -1184,6 +1184,18 @@ namespace SimpleTypes
return m_dValue;
}
int GetValueIntegerPercent() const
{
if(m_bTrailingPercentSign)
{
return (int)((m_dValue / 2) * 100);
}
else
{
return (int)m_dValue;
}
}
void SetValue(double &dValue)
{
m_dValue = dValue;
......
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