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
7c1da491
Commit
7c1da491
authored
Sep 19, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug with footnotes height on a second page of a table.
parent
b3dffcbc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
99 deletions
+107
-99
word/Editor/Table.js
word/Editor/Table.js
+5
-1
word/Editor/Table/TableRecalculate.js
word/Editor/Table/TableRecalculate.js
+102
-98
No files found.
word/Editor/Table.js
View file @
7c1da491
...
...
@@ -2218,8 +2218,12 @@ CTable.prototype =
// Учтем верхнее поле ячейки
Y
+=
CellMar
.
Top
.
W
;
var
YLimit
=
Pos
.
YLimit
;
YLimit
-=
this
.
Pages
[
CurPage
].
FootnotesH
;
// TODO: Здесь надо учитывать нижнюю границу ячейки и вычесть ее ширину из YLimit
return
{
X
:
Pos
.
X
+
CellInfo
.
X_content_start
,
XLimit
:
Pos
.
X
+
CellInfo
.
X_content_end
,
Y
:
Y
,
YLimit
:
Pos
.
YLimit
,
MaxTopBorder
:
MaxTopBorder
};
return
{
X
:
Pos
.
X
+
CellInfo
.
X_content_start
,
XLimit
:
Pos
.
X
+
CellInfo
.
X_content_end
,
Y
:
Y
,
YLimit
:
YLimit
,
MaxTopBorder
:
MaxTopBorder
};
},
Get_MaxTopBorder
:
function
(
RowIndex
)
...
...
word/Editor/Table/TableRecalculate.js
View file @
7c1da491
...
...
@@ -86,7 +86,7 @@ CTable.prototype.Recalculate_Grid = function()
CTable
.
prototype
.
Save_RecalculateObject
=
function
()
{
var
RecalcObj
=
new
CTableRecalculateObject
();
RecalcObj
.
Save
(
this
);
RecalcObj
.
Save
(
this
);
return
RecalcObj
;
};
CTable
.
prototype
.
Load_RecalculateObject
=
function
(
RecalcObj
)
...
...
@@ -101,8 +101,7 @@ CTable.prototype.Prepare_RecalculateObject = function()
this
.
TableRowsBottom
=
[];
this
.
RowsInfo
=
[];
this
.
HeaderInfo
=
{
this
.
HeaderInfo
=
{
Count
:
0
,
H
:
0
,
PageIndex
:
0
,
...
...
@@ -115,10 +114,10 @@ CTable.prototype.Prepare_RecalculateObject = function()
this
.
MaxBotBorder
=
[];
this
.
MaxBotMargin
=
[];
this
.
RecalcInfo
.
Reset
(
true
);
this
.
RecalcInfo
.
Reset
(
true
);
var
Count
=
this
.
Content
.
length
;
for
(
var
Index
=
0
;
Index
<
Count
;
Index
++
)
for
(
var
Index
=
0
;
Index
<
Count
;
Index
++
)
{
this
.
Content
[
Index
].
Prepare_RecalculateObject
();
}
...
...
@@ -126,7 +125,7 @@ CTable.prototype.Prepare_RecalculateObject = function()
CTable
.
prototype
.
Start_FromNewPage
=
function
()
{
this
.
Pages
.
length
=
1
;
this
.
Pages
[
0
]
=
new
CTablePage
(
0
,
0
,
0
,
0
,
0
,
0
);
this
.
Pages
[
0
]
=
new
CTablePage
(
0
,
0
,
0
,
0
,
0
,
0
);
this
.
HeaderInfo
.
Pages
[
0
]
=
{};
this
.
HeaderInfo
.
Pages
[
0
].
Draw
=
false
;
...
...
@@ -150,7 +149,7 @@ CTable.prototype.Start_FromNewPage = function()
this
.
RowsInfo
[
0
].
MaxTopBorder
[
0
]
=
0.0
;
// Обнуляем таблицу суммарных высот ячеек
for
(
var
Index
=
-
1
;
Index
<
this
.
Content
.
length
;
Index
++
)
for
(
var
Index
=
-
1
;
Index
<
this
.
Content
.
length
;
Index
++
)
{
this
.
TableRowsBottom
[
Index
]
=
[];
this
.
TableRowsBottom
[
Index
][
0
]
=
0
;
...
...
@@ -159,12 +158,12 @@ CTable.prototype.Start_FromNewPage = function()
this
.
Pages
[
0
].
MaxBotBorder
=
0
;
this
.
Pages
[
0
].
BotBorders
=
[];
if
(
this
.
Content
.
length
>
0
)
if
(
this
.
Content
.
length
>
0
)
{
var
CellsCount
=
this
.
Content
[
0
].
Get_CellsCount
();
for
(
var
CurCell
=
0
;
CurCell
<
CellsCount
;
CurCell
++
)
for
(
var
CurCell
=
0
;
CurCell
<
CellsCount
;
CurCell
++
)
{
var
Cell
=
this
.
Content
[
0
].
Get_Cell
(
CurCell
);
var
Cell
=
this
.
Content
[
0
].
Get_Cell
(
CurCell
);
Cell
.
Content
.
Start_FromNewPage
();
Cell
.
PagesCount
=
2
;
}
...
...
@@ -2116,6 +2115,8 @@ CTable.prototype.private_RecalculatePage = function(CurPage)
nFootnotesHeight
=
oFootnotes
.
GetHeight
(
nPageAbs
,
nColumnAbs
);
nSavedY
=
Y
;
nSavedTableHeight
=
TableHeight
;
this
.
Pages
[
CurPage
].
FootnotesH
=
nFootnotesHeight
;
}
if
((
0
===
CurRow
&&
true
===
this
.
Check_EmptyPages
(
CurPage
-
1
))
||
CurRow
!=
FirstRow
||
(
CurRow
===
FirstRow
&&
true
===
ResetStartElement
))
...
...
@@ -2376,6 +2377,8 @@ CTable.prototype.private_RecalculatePage = function(CurPage)
var
nCurFootnotesHeight
=
oFootnotes
?
oFootnotes
.
GetHeight
(
nPageAbs
,
nColumnAbs
)
:
0
;
if
(
oFootnotes
&&
nCurFootnotesHeight
>
nFootnotesHeight
+
0.001
)
{
this
.
Pages
[
CurPage
].
FootnotesH
=
nCurFootnotesHeight
;
nFootnotesHeight
=
nCurFootnotesHeight
;
bResetFootnotes
=
false
;
Y
=
nSavedY
;
...
...
@@ -3036,6 +3039,7 @@ function CTablePage(X, Y, XLimit, YLimit, FirstRow, MaxTopBorder)
this
.
LastRow
=
FirstRow
;
this
.
Height
=
0
;
this
.
LastRowSplit
=
false
;
this
.
FootnotesH
=
0
;
}
CTablePage
.
prototype
.
Shift
=
function
(
Dx
,
Dy
)
{
...
...
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