Commit d52c1646 authored by Sergey Konovalov's avatar Sergey Konovalov

open/save vml signatureline

parent 2f9f754d
......@@ -4349,6 +4349,98 @@ function BinaryPPTYLoader()
return ret;
}
this.ReadSignatureLine = function()
{
var ret = new AscFormat.CSignatureLine();
var s = this.stream;
var _rec_start = s.cur;
var _end_rec = _rec_start + s.GetULong() + 4;
s.Skip2(1); // start attributes
while (true)
{
var _at = s.GetUChar();
if (_at == g_nodeAttributeEnd)
break;
switch (_at)
{
case 0:
{
s.GetString2();
break;
}
case 1:
{
s.GetBool();
break;
}
case 2:
{
s.GetUChar();
break;
}
case 3:
{
ret.id = s.GetString2();
break;
}
case 4:
{
s.GetBool();
break;
}
case 5:
{
s.GetString2();
break;
}
case 6:
{
s.GetBool();
break;
}
case 7:
{
s.GetString2();
break;
}
case 8:
{
s.GetBool();
break;
}
case 9:
{
s.GetString2();
break;
}
case 10:
{
ret.signer = s.GetString2();
break;
}
case 11:
{
ret.signer2 = s.GetString2();
break;
}
case 12:
{
ret.email = s.GetString2();
break;
}
default:
break;
}
}
s.Seek2(_end_rec);
return ret;
}
this.ReadShapeStyle = function()
{
var def = new AscFormat.CShapeStyle();
......@@ -8997,8 +9089,14 @@ function CPres()
oXFRM = this.Reader.ReadXfrm();
break;
}
case 7:
{
shape.setSignature(this.Reader.ReadSignatureLine());
break;
}
default:
{
s.SkipRecord();
break;
}
}
......
......@@ -3553,6 +3553,19 @@ function CBinaryFileWriter()
oThis.WriteUChar(g_nodeAttributeEnd);
}
this.WriteSignatureLine = function(oSignatureLine)
{
oThis.WriteUChar(g_nodeAttributeStart);
oThis._WriteUChar2(2, 1);
oThis._WriteString2(3, oSignatureLine.id);
oThis._WriteBool2(4, true);
oThis._WriteString2(5, "{00000000-0000-0000-0000-000000000000}");
oThis._WriteString2(10, oSignatureLine.signer);
oThis._WriteString2(11, oSignatureLine.signer2);
oThis._WriteString2(12, oSignatureLine.email);
oThis.WriteUChar(g_nodeAttributeEnd);
}
this.WriteXfrmRot = function(xfrm)
{
oThis.WriteUChar(g_nodeAttributeStart);
......@@ -4728,6 +4741,7 @@ function CBinaryFileWriter()
_writer.WriteBodyPr(shape.bodyPr);
_writer.EndRecord();
}
_writer.WriteRecord2(7, shape.signatureLine, _writer.WriteSignatureLine);
if (isUseTmpFill)
{
......
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