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
27708a1b
Commit
27708a1b
authored
Dec 08, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #33633 Fixed an issue with save/load the changes of table cell related with borders.
parent
6fe412aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
153 deletions
+33
-153
word/Editor/Table/TableCell.js
word/Editor/Table/TableCell.js
+9
-9
word/Editor/Table/TableCellChanges.js
word/Editor/Table/TableCellChanges.js
+24
-144
No files found.
word/Editor/Table/TableCell.js
View file @
27708a1b
...
...
@@ -1572,19 +1572,19 @@ CTableCell.prototype =
}
case
1
:
{
History
.
Add
(
new
CChangesTableCellBorder
Top
(
this
,
this
.
Pr
.
TableCellBorders
.
Right
,
Border
));
History
.
Add
(
new
CChangesTableCellBorder
Right
(
this
,
this
.
Pr
.
TableCellBorders
.
Right
,
Border
));
this
.
Pr
.
TableCellBorders
.
Right
=
undefined
;
break
;
}
case
2
:
{
History
.
Add
(
new
CChangesTableCellBorder
Top
(
this
,
this
.
Pr
.
TableCellBorders
.
Bottom
,
Border
));
History
.
Add
(
new
CChangesTableCellBorder
Bottom
(
this
,
this
.
Pr
.
TableCellBorders
.
Bottom
,
Border
));
this
.
Pr
.
TableCellBorders
.
Bottom
=
undefined
;
break
;
}
case
3
:
{
History
.
Add
(
new
CChangesTableCellBorder
Top
(
this
,
this
.
Pr
.
TableCellBorders
.
Left
,
Border
));
History
.
Add
(
new
CChangesTableCellBorder
Left
(
this
,
this
.
Pr
.
TableCellBorders
.
Left
,
Border
));
this
.
Pr
.
TableCellBorders
.
Left
=
undefined
;
break
;
}
...
...
@@ -1613,19 +1613,19 @@ CTableCell.prototype =
}
case
1
:
{
History
.
Add
(
new
CChangesTableCellBorder
Top
(
this
,
this
.
Pr
.
TableCellBorders
.
Right
,
NewBorder
));
History
.
Add
(
new
CChangesTableCellBorder
Right
(
this
,
this
.
Pr
.
TableCellBorders
.
Right
,
NewBorder
));
this
.
Pr
.
TableCellBorders
.
Right
=
NewBorder
;
break
;
}
case
2
:
{
History
.
Add
(
new
CChangesTableCellBorder
Top
(
this
,
this
.
Pr
.
TableCellBorders
.
Bottom
,
NewBorder
));
History
.
Add
(
new
CChangesTableCellBorder
Bottom
(
this
,
this
.
Pr
.
TableCellBorders
.
Bottom
,
NewBorder
));
this
.
Pr
.
TableCellBorders
.
Bottom
=
NewBorder
;
break
;
}
case
3
:
{
History
.
Add
(
new
CChangesTableCellBorder
Top
(
this
,
this
.
Pr
.
TableCellBorders
.
Left
,
NewBorder
));
History
.
Add
(
new
CChangesTableCellBorder
Left
(
this
,
this
.
Pr
.
TableCellBorders
.
Left
,
NewBorder
));
this
.
Pr
.
TableCellBorders
.
Left
=
NewBorder
;
break
;
}
...
...
@@ -1658,19 +1658,19 @@ CTableCell.prototype =
}
case
1
:
{
History
.
Add
(
new
CChangesTableCellBorder
Top
(
this
,
this
.
Pr
.
TableCellBorders
.
Right
,
NewBorder
));
History
.
Add
(
new
CChangesTableCellBorder
Right
(
this
,
this
.
Pr
.
TableCellBorders
.
Right
,
NewBorder
));
this
.
Pr
.
TableCellBorders
.
Right
=
NewBorder
;
break
;
}
case
2
:
{
History
.
Add
(
new
CChangesTableCellBorder
Top
(
this
,
this
.
Pr
.
TableCellBorders
.
Bottom
,
NewBorder
));
History
.
Add
(
new
CChangesTableCellBorder
Bottom
(
this
,
this
.
Pr
.
TableCellBorders
.
Bottom
,
NewBorder
));
this
.
Pr
.
TableCellBorders
.
Bottom
=
NewBorder
;
break
;
}
case
3
:
{
History
.
Add
(
new
CChangesTableCellBorder
Top
(
this
,
this
.
Pr
.
TableCellBorders
.
Left
,
NewBorder
));
History
.
Add
(
new
CChangesTableCellBorder
Left
(
this
,
this
.
Pr
.
TableCellBorders
.
Left
,
NewBorder
));
this
.
Pr
.
TableCellBorders
.
Left
=
NewBorder
;
break
;
}
...
...
word/Editor/Table/TableCellChanges.js
View file @
27708a1b
...
...
@@ -352,16 +352,10 @@ CChangesTableCellBorderLeft.prototype.WriteToBinary = function(Writer)
Writer
.
WriteLong
(
nFlags
);
if
(
undefined
!==
this
.
New
&&
null
!==
this
.
New
)
{
this
.
New
=
new
CDocumentBorder
();
this
.
New
.
Write_ToBinary
(
Writer
);
}
if
(
undefined
!==
this
.
Old
&&
null
!==
this
.
Old
)
{
this
.
Old
=
new
CDocumentBorder
();
this
.
Old
.
Write_ToBinary
(
Writer
);
}
};
CChangesTableCellBorderLeft
.
prototype
.
ReadFromBinary
=
function
(
Reader
)
{
...
...
@@ -371,14 +365,8 @@ CChangesTableCellBorderLeft.prototype.ReadFromBinary = function(Reader)
// 3-bit : Is Old undefined?
// 4-bit : Is Old null?
// CTableMeasure : New.Left
// CTableMeasure : New.Top
// CTableMeasure : New.Right
// CTableMeasure : New.Bottom
// CTableMeasure : Old.Left
// CTableMeasure : Old.Top
// CTableMeasure : Old.Right
// CTableMeasure : Old.Bottom
// CDocumentBorder : New
// CDocumentBorder : Old
var
nFlags
=
Reader
.
GetLong
();
...
...
@@ -392,17 +380,8 @@ CChangesTableCellBorderLeft.prototype.ReadFromBinary = function(Reader)
}
else
{
this
.
New
=
{
Left
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Top
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Right
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Bottom
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
)
};
this
.
New
.
Left
.
Read_FromBinary
(
Reader
);
this
.
New
.
Top
.
Read_FromBinary
(
Reader
);
this
.
New
.
Right
.
Read_FromBinary
(
Reader
);
this
.
New
.
Bottom
.
Read_FromBinary
(
Reader
);
this
.
New
=
new
CDocumentBorder
();
this
.
New
.
Read_FromBinary
(
Reader
);
}
if
(
nFlags
&
4
)
...
...
@@ -415,17 +394,8 @@ CChangesTableCellBorderLeft.prototype.ReadFromBinary = function(Reader)
}
else
{
this
.
Old
=
{
Left
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Top
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Right
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Bottom
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
)
};
this
.
Old
.
Left
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Top
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Right
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Bottom
.
Read_FromBinary
(
Reader
);
this
.
Old
=
new
CDocumentBorder
();
this
.
Old
.
Read_FromBinary
(
Reader
);
}
};
CChangesTableCellBorderLeft
.
prototype
.
private_SetValue
=
function
(
Value
)
...
...
@@ -470,16 +440,10 @@ CChangesTableCellBorderTop.prototype.WriteToBinary = function(Writer)
Writer
.
WriteLong
(
nFlags
);
if
(
undefined
!==
this
.
New
&&
null
!==
this
.
New
)
{
this
.
New
=
new
CDocumentBorder
();
this
.
New
.
Write_ToBinary
(
Writer
);
}
if
(
undefined
!==
this
.
Old
&&
null
!==
this
.
Old
)
{
this
.
Old
=
new
CDocumentBorder
();
this
.
Old
.
Write_ToBinary
(
Writer
);
}
};
CChangesTableCellBorderTop
.
prototype
.
ReadFromBinary
=
function
(
Reader
)
{
...
...
@@ -489,14 +453,8 @@ CChangesTableCellBorderTop.prototype.ReadFromBinary = function(Reader)
// 3-bit : Is Old undefined?
// 4-bit : Is Old null?
// CTableMeasure : New.Left
// CTableMeasure : New.Top
// CTableMeasure : New.Right
// CTableMeasure : New.Bottom
// CTableMeasure : Old.Left
// CTableMeasure : Old.Top
// CTableMeasure : Old.Right
// CTableMeasure : Old.Bottom
// CDocumentBorder : New
// CDocumentBorder : Old
var
nFlags
=
Reader
.
GetLong
();
...
...
@@ -510,17 +468,8 @@ CChangesTableCellBorderTop.prototype.ReadFromBinary = function(Reader)
}
else
{
this
.
New
=
{
Left
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Top
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Right
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Bottom
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
)
};
this
.
New
.
Left
.
Read_FromBinary
(
Reader
);
this
.
New
.
Top
.
Read_FromBinary
(
Reader
);
this
.
New
.
Right
.
Read_FromBinary
(
Reader
);
this
.
New
.
Bottom
.
Read_FromBinary
(
Reader
);
this
.
New
=
new
CDocumentBorder
();
this
.
New
.
Read_FromBinary
(
Reader
);
}
if
(
nFlags
&
4
)
...
...
@@ -533,17 +482,8 @@ CChangesTableCellBorderTop.prototype.ReadFromBinary = function(Reader)
}
else
{
this
.
Old
=
{
Left
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Top
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Right
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Bottom
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
)
};
this
.
Old
.
Left
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Top
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Right
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Bottom
.
Read_FromBinary
(
Reader
);
this
.
Old
=
new
CDocumentBorder
();
this
.
Old
.
Read_FromBinary
(
Reader
);
}
};
CChangesTableCellBorderTop
.
prototype
.
private_SetValue
=
function
(
Value
)
...
...
@@ -588,16 +528,10 @@ CChangesTableCellBorderRight.prototype.WriteToBinary = function(Writer)
Writer
.
WriteLong
(
nFlags
);
if
(
undefined
!==
this
.
New
&&
null
!==
this
.
New
)
{
this
.
New
=
new
CDocumentBorder
();
this
.
New
.
Write_ToBinary
(
Writer
);
}
if
(
undefined
!==
this
.
Old
&&
null
!==
this
.
Old
)
{
this
.
Old
=
new
CDocumentBorder
();
this
.
Old
.
Write_ToBinary
(
Writer
);
}
};
CChangesTableCellBorderRight
.
prototype
.
ReadFromBinary
=
function
(
Reader
)
{
...
...
@@ -607,14 +541,8 @@ CChangesTableCellBorderRight.prototype.ReadFromBinary = function(Reader)
// 3-bit : Is Old undefined?
// 4-bit : Is Old null?
// CTableMeasure : New.Left
// CTableMeasure : New.Top
// CTableMeasure : New.Right
// CTableMeasure : New.Bottom
// CTableMeasure : Old.Left
// CTableMeasure : Old.Top
// CTableMeasure : Old.Right
// CTableMeasure : Old.Bottom
// CDocumentBorder : New
// CDocumentBorder : Old
var
nFlags
=
Reader
.
GetLong
();
...
...
@@ -628,17 +556,8 @@ CChangesTableCellBorderRight.prototype.ReadFromBinary = function(Reader)
}
else
{
this
.
New
=
{
Left
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Top
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Right
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Bottom
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
)
};
this
.
New
.
Left
.
Read_FromBinary
(
Reader
);
this
.
New
.
Top
.
Read_FromBinary
(
Reader
);
this
.
New
.
Right
.
Read_FromBinary
(
Reader
);
this
.
New
.
Bottom
.
Read_FromBinary
(
Reader
);
this
.
New
=
new
CDocumentBorder
();
this
.
New
.
Read_FromBinary
(
Reader
);
}
if
(
nFlags
&
4
)
...
...
@@ -651,17 +570,8 @@ CChangesTableCellBorderRight.prototype.ReadFromBinary = function(Reader)
}
else
{
this
.
Old
=
{
Left
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Top
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Right
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Bottom
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
)
};
this
.
Old
.
Left
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Top
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Right
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Bottom
.
Read_FromBinary
(
Reader
);
this
.
Old
=
new
CDocumentBorder
();
this
.
Old
.
Read_FromBinary
(
Reader
);
}
};
CChangesTableCellBorderRight
.
prototype
.
private_SetValue
=
function
(
Value
)
...
...
@@ -706,16 +616,10 @@ CChangesTableCellBorderBottom.prototype.WriteToBinary = function(Writer)
Writer
.
WriteLong
(
nFlags
);
if
(
undefined
!==
this
.
New
&&
null
!==
this
.
New
)
{
this
.
New
=
new
CDocumentBorder
();
this
.
New
.
Write_ToBinary
(
Writer
);
}
if
(
undefined
!==
this
.
Old
&&
null
!==
this
.
Old
)
{
this
.
Old
=
new
CDocumentBorder
();
this
.
Old
.
Write_ToBinary
(
Writer
);
}
};
CChangesTableCellBorderBottom
.
prototype
.
ReadFromBinary
=
function
(
Reader
)
{
...
...
@@ -725,14 +629,8 @@ CChangesTableCellBorderBottom.prototype.ReadFromBinary = function(Reader)
// 3-bit : Is Old undefined?
// 4-bit : Is Old null?
// CTableMeasure : New.Left
// CTableMeasure : New.Top
// CTableMeasure : New.Right
// CTableMeasure : New.Bottom
// CTableMeasure : Old.Left
// CTableMeasure : Old.Top
// CTableMeasure : Old.Right
// CTableMeasure : Old.Bottom
// CDocumentBorder : New
// CDocumentBorder : Old
var
nFlags
=
Reader
.
GetLong
();
...
...
@@ -746,17 +644,8 @@ CChangesTableCellBorderBottom.prototype.ReadFromBinary = function(Reader)
}
else
{
this
.
New
=
{
Left
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Top
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Right
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Bottom
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
)
};
this
.
New
.
Left
.
Read_FromBinary
(
Reader
);
this
.
New
.
Top
.
Read_FromBinary
(
Reader
);
this
.
New
.
Right
.
Read_FromBinary
(
Reader
);
this
.
New
.
Bottom
.
Read_FromBinary
(
Reader
);
this
.
New
=
new
CDocumentBorder
();
this
.
New
.
Read_FromBinary
(
Reader
);
}
if
(
nFlags
&
4
)
...
...
@@ -769,17 +658,8 @@ CChangesTableCellBorderBottom.prototype.ReadFromBinary = function(Reader)
}
else
{
this
.
Old
=
{
Left
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Top
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Right
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
),
Bottom
:
new
CTableMeasurement
(
tblwidth_Auto
,
0
)
};
this
.
Old
.
Left
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Top
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Right
.
Read_FromBinary
(
Reader
);
this
.
Old
.
Bottom
.
Read_FromBinary
(
Reader
);
this
.
Old
=
new
CDocumentBorder
();
this
.
Old
.
Read_FromBinary
(
Reader
);
}
};
CChangesTableCellBorderBottom
.
prototype
.
private_SetValue
=
function
(
Value
)
...
...
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