Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
d52c1646
Commit
d52c1646
authored
May 19, 2017
by
Sergey Konovalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
open/save vml signatureline
parent
2f9f754d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
0 deletions
+112
-0
common/Shapes/Serialize.js
common/Shapes/Serialize.js
+98
-0
common/Shapes/SerializeWriter.js
common/Shapes/SerializeWriter.js
+14
-0
No files found.
common/Shapes/Serialize.js
View file @
d52c1646
...
...
@@ -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
;
}
}
...
...
common/Shapes/SerializeWriter.js
View file @
d52c1646
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment