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
206a63eb
Commit
206a63eb
authored
Apr 01, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add wp14:sizeRelH/wp14:sizeRelV
parent
e962db5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
1 deletion
+61
-1
word/Editor/Serialize2.js
word/Editor/Serialize2.js
+61
-1
No files found.
word/Editor/Serialize2.js
View file @
206a63eb
...
...
@@ -391,7 +391,9 @@ var c_oSerImageType2 = {
Chart
:
23
,
ChartImg
:
24
,
Chart2
:
25
,
CachedImage
:
26
CachedImage
:
26
,
SizeRelH
:
27
,
SizeRelV
:
28
};
var
c_oSerEffectExtent
=
{
Left
:
0
,
...
...
@@ -409,6 +411,10 @@ var c_oSerPosHV = {
PosOffset
:
2
,
PctOffset
:
3
};
var
c_oSerSizeRelHV
=
{
RelativeFrom
:
0
,
Pct
:
1
};
var
c_oSerSimplePos
=
{
X
:
0
,
Y
:
1
...
...
@@ -4288,6 +4294,18 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap, copyPa
this
.
memory
.
WriteByte
(
c_oSerPropLenType
.
Variable
);
this
.
bs
.
WriteItemWithLength
(
function
(){
oThis
.
WriteSimplePos
(
img
.
SimplePos
);});
}
// if(null != img.SizeRelH)
// {
// this.memory.WriteByte(c_oSerImageType2.SizeRelH);
// this.memory.WriteByte(c_oSerPropLenType.Variable);
// this.bs.WriteItemWithLength(function(){oThis.WriteSizeRelHV(img.SizeRelH);});
// }
// if(null != img.SizeRelV)
// {
// this.memory.WriteByte(c_oSerImageType2.SizeRelV);
// this.memory.WriteByte(c_oSerPropLenType.Variable);
// this.bs.WriteItemWithLength(function(){oThis.WriteSizeRelHV(img.SizeRelV);});
// }
switch
(
img
.
wrappingType
)
{
case
WRAPPING_TYPE_NONE
:
...
...
@@ -4402,6 +4420,19 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap, copyPa
this
.
memory
.
WriteDouble
(
PositionH
.
Value
);
}
}
this
.
WriteSizeRelHV
=
function
(
SizeRelHV
)
{
if
(
null
!=
SizeRelHV
.
RelativeFrom
)
{
this
.
memory
.
WriteByte
(
c_oSerSizeRelHV
.
RelativeFrom
);
this
.
memory
.
WriteByte
(
c_oSerPropLenType
.
Byte
);
this
.
memory
.
WriteByte
(
SizeRelHV
.
RelativeFrom
);
}
if
(
null
!=
SizeRelHV
.
Pct
)
{
this
.
memory
.
WriteByte
(
c_oSerSizeRelHV
.
Pct
);
this
.
memory
.
WriteByte
(
c_oSerPropLenType
.
Double
);
this
.
memory
.
WriteDouble
(
SizeRelHV
.
Pct
);
}
}
this
.
WriteSimplePos
=
function
(
oSimplePos
)
{
if
(
null
!=
oSimplePos
.
X
)
...
...
@@ -8711,6 +8742,22 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
{
oParaDrawing
.
Set_WrappingType
(
WRAPPING_TYPE_NONE
);
}
else
if
(
c_oSerImageType2
.
SizeRelH
===
type
)
{
var
oNewSizeRel
=
{
RelativeFrom
:
null
,
Pct
:
null
};
res
=
this
.
bcr
.
Read2
(
length
,
function
(
t
,
l
){
return
oThis
.
ReadSizeRelHV
(
t
,
l
,
oNewSizeRel
);
});
//oParaDrawing.SizeRelH = oNewSizeRel;
}
else
if
(
c_oSerImageType2
.
SizeRelV
===
type
)
{
var
oNewSizeRel
=
{
RelativeFrom
:
null
,
Pct
:
null
};
res
=
this
.
bcr
.
Read2
(
length
,
function
(
t
,
l
){
return
oThis
.
ReadSizeRelHV
(
t
,
l
,
oNewSizeRel
);
});
//oParaDrawing.SizeRelV = oNewSizeRel;
}
else
if
(
c_oSerImageType2
.
WrapSquare
===
type
)
{
oParaDrawing
.
Set_WrappingType
(
WRAPPING_TYPE_SQUARE
);
...
...
@@ -8803,6 +8850,19 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
res
=
c_oSerConstants
.
ReadUnknown
;
return
res
;
}
this
.
ReadSizeRelHV
=
function
(
type
,
length
,
SizeRel
)
{
var
res
=
c_oSerConstants
.
ReadOk
;
var
oThis
=
this
;
if
(
c_oSerSizeRelHV
.
RelativeFrom
===
type
)
{
SizeRel
.
RelativeFrom
=
this
.
stream
.
GetUChar
();
}
else
if
(
c_oSerSizeRelHV
.
Pct
===
type
)
{
SizeRel
.
Pct
=
this
.
bcr
.
ReadDouble
();
}
else
res
=
c_oSerConstants
.
ReadUnknown
;
return
res
;
}
this
.
ReadSimplePos
=
function
(
type
,
length
,
oSimplePos
)
{
var
res
=
c_oSerConstants
.
ReadOk
;
...
...
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