Commit 7ce9a373 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

strikeout + caps read/write

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50293 954022d7-b5bf-4e40-9824-e11837661b57
parent 587458e7
......@@ -5499,7 +5499,22 @@ function BinaryPPTYLoader()
}
case 4:
{
s.Skip2(1); // cap
var _cap = s.GetUChar();
if (_cap == 0)
{
rPr.Caps = true;
rPr.SmallCaps = false;
}
else if (_cap == 1)
{
rPr.Caps = false;
rPr.SmallCaps = true;
}
else if (_cap == 2)
{
rPr.SmallCaps = false;
rPr.Caps = false;
}
break;
}
case 5:
......@@ -5559,7 +5574,22 @@ function BinaryPPTYLoader()
}
case 16:
{
rPr.Strikeout = (s.GetUChar() != 1);
var _strike = s.GetUChar();
if (0 == _strike)
{
rPr.Strikeout = false;
rPr.DStrikeout = true;
}
else if (2 == _strike)
{
rPr.Strikeout = true;
rPr.DStrikeout = false;
}
else
{
rPr.Strikeout = false;
rPr.DStrikeout = false;
}
break;
}
case 17:
......
......@@ -1678,9 +1678,30 @@ function CBinaryFileWriter()
oThis._WriteBool2(1, rPr.Bold);
oThis._WriteBool2(7, rPr.Italic);
if (undefined !== rPr.Strikeout && null != rPr.Strikeout)
var _cap = null;
if (rPr.Caps === true)
_cap = 0;
else if (rPr.SmallCaps === true)
_cap = 1;
else if (rPr.Caps === false && rPr.SmallCaps === false)
_cap = 2;
if (null != _cap)
{
oThis._WriteUChar1(4, _cap);
}
var _strike = null;
if (rPr.DStrikeout === true)
_strike = 0;
else if (rPr.Strikeout === true)
_strike = 2;
else if (rPr.DStrikeout === false && rPr.Strikeout === false)
_strike = 1;
if (null != _strike)
{
oThis._WriteUChar1(16, (rPr.Strikeout === true) ? 2 : 1);
oThis._WriteUChar1(16, _strike);
}
if (undefined !== rPr.Underline && null != rPr.Underline)
......
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