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
82074258
Commit
82074258
authored
May 27, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug# 32519 Исправлен баг с отображением границ ячеек таблиц в интерфейсе.
parent
064dfa40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
116 additions
and
130 deletions
+116
-130
word/Editor/Table.js
word/Editor/Table.js
+116
-130
No files found.
word/Editor/Table.js
View file @
82074258
...
...
@@ -528,137 +528,123 @@ CTable.prototype =
Pr
.
CellsWidth
=
-
CellW
.
W
;
var
Spacing
=
this
.
Content
[
0
].
Get_CellSpacing
();
if
(
null
===
Spacing
)
{
Pr
.
CellBorders
=
{
Left
:
CellBorders
.
Left
.
Copy
(),
Right
:
CellBorders
.
Right
.
Copy
(),
Top
:
CellBorders
.
Top
.
Copy
(),
Bottom
:
CellBorders
.
Bottom
.
Copy
(),
InsideH
:
null
,
InsideV
:
null
};
}
else
{
var
Border_left
=
null
;
var
Border_right
=
null
;
var
Border_top
=
null
;
var
Border_bottom
=
null
;
var
Border_insideH
=
null
;
var
Border_insideV
=
null
;
var
CellShd
=
null
;
for
(
var
CurRow
=
0
;
CurRow
<
this
.
Content
.
length
;
CurRow
++
)
{
var
Row
=
this
.
Content
[
CurRow
];
var
Cells_Count
=
Row
.
Get_CellsCount
();
for
(
var
CurCell
=
0
;
CurCell
<
Cells_Count
;
CurCell
++
)
{
var
Cell
=
Row
.
Get_Cell
(
CurCell
);
var
Cell_borders
=
Cell
.
Get_Borders
();
var
Cell_shd
=
Cell
.
Get_Shd
();
if
(
0
===
CurCell
&&
Cells_Count
)
{
CellShd
=
Cell_shd
;
}
else
{
if
(
null
!=
CellShd
&&
(
CellShd
.
Value
!=
Cell_shd
.
Value
||
CellShd
.
Color
.
r
!=
Cell_shd
.
Color
.
r
||
CellShd
.
Color
.
g
!=
Cell_shd
.
Color
.
g
||
CellShd
.
Color
.
b
!=
Cell_shd
.
Color
.
b
)
)
CellShd
=
null
;
}
// Крайняя левая ли данная ячейка в выделении?
if
(
0
===
CurCell
)
{
if
(
null
===
Border_left
)
Border_left
=
Cell_borders
.
Left
;
else
Border_left
=
this
.
Internal_CompareBorders2
(
Border_left
,
Cell_borders
.
Left
);
}
else
{
if
(
null
===
Border_insideV
)
Border_insideV
=
Cell_borders
.
Left
;
else
Border_insideV
=
this
.
Internal_CompareBorders2
(
Border_insideV
,
Cell_borders
.
Left
);
}
// Крайняя правая ли данная ячейка в выделении?
if
(
Cells_Count
-
1
===
CurCell
)
{
if
(
null
===
Border_right
)
Border_right
=
Cell_borders
.
Right
;
else
Border_right
=
this
.
Internal_CompareBorders2
(
Border_right
,
Cell_borders
.
Right
);
}
else
{
if
(
null
===
Border_insideV
)
Border_insideV
=
Cell_borders
.
Right
;
else
Border_insideV
=
this
.
Internal_CompareBorders2
(
Border_insideV
,
Cell_borders
.
Right
);
}
if
(
0
===
CurCell
)
{
if
(
0
!=
CurRow
)
{
if
(
null
===
Border_insideH
)
{
Border_insideH
=
Border_bottom
;
Border_insideH
=
this
.
Internal_CompareBorders2
(
Border_insideH
,
Cell_borders
.
Top
);
}
else
{
Border_insideH
=
this
.
Internal_CompareBorders2
(
Border_insideH
,
Border_bottom
);
Border_insideH
=
this
.
Internal_CompareBorders2
(
Border_insideH
,
Cell_borders
.
Top
);
}
}
else
{
if
(
null
===
Border_top
)
Border_top
=
Cell_borders
.
Top
;
}
Border_bottom
=
Cell_borders
.
Bottom
;
}
else
{
if
(
0
!=
bFirstRow
)
{
if
(
null
===
Border_insideH
)
Border_insideH
=
Cell_borders
.
Top
;
else
Border_insideH
=
this
.
Internal_CompareBorders2
(
Border_insideH
,
Cell_borders
.
Top
);
}
else
{
if
(
null
===
Border_top
)
Border_top
=
Cell_borders
.
Top
;
else
Border_top
=
this
.
Internal_CompareBorders2
(
Border_top
,
Cell_borders
.
Top
);
}
Border_bottom
=
this
.
Internal_CompareBorders2
(
Border_bottom
,
Cell_borders
.
Bottom
);
}
}
}
Pr
.
CellBorders
=
{
Left
:
Border_left
.
Copy
(),
Right
:
Border_right
.
Copy
(),
Top
:
Border_top
.
Copy
(),
Bottom
:
Border_bottom
.
Copy
(),
InsideH
:
null
===
Border_insideH
?
null
:
Border_insideH
.
Copy
(),
InsideV
:
null
===
Border_insideV
?
null
:
Border_insideV
.
Copy
()
};
}
var
Border_left
=
null
;
var
Border_right
=
null
;
var
Border_top
=
null
;
var
Border_bottom
=
null
;
var
Border_insideH
=
null
;
var
Border_insideV
=
null
;
var
CellShd
=
null
;
for
(
var
CurRow
=
0
;
CurRow
<
this
.
Content
.
length
;
CurRow
++
)
{
var
Row
=
this
.
Content
[
CurRow
];
var
Cells_Count
=
Row
.
Get_CellsCount
();
for
(
var
CurCell
=
0
;
CurCell
<
Cells_Count
;
CurCell
++
)
{
var
Cell
=
Row
.
Get_Cell
(
CurCell
);
var
Cell_borders
=
Cell
.
Get_Borders
();
var
Cell_shd
=
Cell
.
Get_Shd
();
if
(
0
===
CurCell
&&
Cells_Count
)
{
CellShd
=
Cell_shd
;
}
else
{
if
(
null
!=
CellShd
&&
(
CellShd
.
Value
!=
Cell_shd
.
Value
||
CellShd
.
Color
.
r
!=
Cell_shd
.
Color
.
r
||
CellShd
.
Color
.
g
!=
Cell_shd
.
Color
.
g
||
CellShd
.
Color
.
b
!=
Cell_shd
.
Color
.
b
)
)
CellShd
=
null
;
}
// Крайняя левая ли данная ячейка в выделении?
if
(
0
===
CurCell
)
{
if
(
null
===
Border_left
)
Border_left
=
Cell_borders
.
Left
;
else
Border_left
=
this
.
Internal_CompareBorders2
(
Border_left
,
Cell_borders
.
Left
);
}
else
{
if
(
null
===
Border_insideV
)
Border_insideV
=
Cell_borders
.
Left
;
else
Border_insideV
=
this
.
Internal_CompareBorders2
(
Border_insideV
,
Cell_borders
.
Left
);
}
// Крайняя правая ли данная ячейка в выделении?
if
(
Cells_Count
-
1
===
CurCell
)
{
if
(
null
===
Border_right
)
Border_right
=
Cell_borders
.
Right
;
else
Border_right
=
this
.
Internal_CompareBorders2
(
Border_right
,
Cell_borders
.
Right
);
}
else
{
if
(
null
===
Border_insideV
)
Border_insideV
=
Cell_borders
.
Right
;
else
Border_insideV
=
this
.
Internal_CompareBorders2
(
Border_insideV
,
Cell_borders
.
Right
);
}
if
(
0
===
CurCell
)
{
if
(
0
!=
CurRow
)
{
if
(
null
===
Border_insideH
)
{
Border_insideH
=
Border_bottom
;
Border_insideH
=
this
.
Internal_CompareBorders2
(
Border_insideH
,
Cell_borders
.
Top
);
}
else
{
Border_insideH
=
this
.
Internal_CompareBorders2
(
Border_insideH
,
Border_bottom
);
Border_insideH
=
this
.
Internal_CompareBorders2
(
Border_insideH
,
Cell_borders
.
Top
);
}
}
else
{
if
(
null
===
Border_top
)
Border_top
=
Cell_borders
.
Top
;
}
Border_bottom
=
Cell_borders
.
Bottom
;
}
else
{
if
(
0
!=
CurRow
)
{
if
(
null
===
Border_insideH
)
Border_insideH
=
Cell_borders
.
Top
;
else
Border_insideH
=
this
.
Internal_CompareBorders2
(
Border_insideH
,
Cell_borders
.
Top
);
}
else
{
if
(
null
===
Border_top
)
Border_top
=
Cell_borders
.
Top
;
else
Border_top
=
this
.
Internal_CompareBorders2
(
Border_top
,
Cell_borders
.
Top
);
}
Border_bottom
=
this
.
Internal_CompareBorders2
(
Border_bottom
,
Cell_borders
.
Bottom
);
}
}
}
Pr
.
CellBorders
=
{
Left
:
Border_left
.
Copy
(),
Right
:
Border_right
.
Copy
(),
Top
:
Border_top
.
Copy
(),
Bottom
:
Border_bottom
.
Copy
(),
InsideH
:
null
===
Border_insideH
?
null
:
Border_insideH
.
Copy
(),
InsideV
:
null
===
Border_insideV
?
null
:
Border_insideV
.
Copy
()
};
}
switch
(
Pr
.
CellsVAlign
)
...
...
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