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
b17d0192
Commit
b17d0192
authored
Sep 22, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented positioning a footnote beneath text.
parent
1ce6ac75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
+23
-8
word/Editor/Document.js
word/Editor/Document.js
+17
-7
word/Editor/Sections.js
word/Editor/Sections.js
+6
-1
No files found.
word/Editor/Document.js
View file @
b17d0192
...
@@ -1549,8 +1549,6 @@ CDocument.prototype.On_EndLoad = function()
...
@@ -1549,8 +1549,6 @@ CDocument.prototype.On_EndLoad = function()
{
{
this
.
Set_FastCollaborativeEditing
(
true
);
this
.
Set_FastCollaborativeEditing
(
true
);
}
}
//this.Footnotes.ResetSpecialFootnotes();
};
};
CDocument
.
prototype
.
Add_TestDocument
=
function
()
CDocument
.
prototype
.
Add_TestDocument
=
function
()
{
{
...
@@ -2754,7 +2752,7 @@ CDocument.prototype.Recalculate_PageColumn = function()
...
@@ -2754,7 +2752,7 @@ CDocument.prototype.Recalculate_PageColumn = function()
if
(
Index
>=
Count
||
_PageIndex
>
PageIndex
||
_ColumnIndex
>
ColumnIndex
)
if
(
Index
>=
Count
||
_PageIndex
>
PageIndex
||
_ColumnIndex
>
ColumnIndex
)
{
{
this
.
private_RecalculateShiftFootnotes
(
PageIndex
,
ColumnIndex
);
this
.
private_RecalculateShiftFootnotes
(
PageIndex
,
ColumnIndex
,
Y
,
SectPr
);
}
}
if
(
true
===
bReDraw
)
if
(
true
===
bReDraw
)
...
@@ -2869,11 +2867,23 @@ CDocument.prototype.private_RecalculateIsNewSection = function(nPageAbs, nConten
...
@@ -2869,11 +2867,23 @@ CDocument.prototype.private_RecalculateIsNewSection = function(nPageAbs, nConten
return
bNewSection
;
return
bNewSection
;
};
};
CDocument
.
prototype
.
private_RecalculateShiftFootnotes
=
function
(
nPageAbs
,
nColumnAbs
)
CDocument
.
prototype
.
private_RecalculateShiftFootnotes
=
function
(
nPageAbs
,
nColumnAbs
,
dY
,
oSectPr
)
{
{
var
dFootnotesHeight
=
this
.
Footnotes
.
GetHeight
(
nPageAbs
,
nColumnAbs
);
var
nPosType
=
oSectPr
.
GetFootnotePos
();
var
oPageMetrics
=
this
.
Get_PageContentStartPos
(
nPageAbs
);
this
.
Footnotes
.
Shift
(
nPageAbs
,
nColumnAbs
,
0
,
oPageMetrics
.
YLimit
-
dFootnotesHeight
);
// section_footnote_PosDocEnd, section_footnote_PosSectEnd ненужные константы по логике, но Word воспринимает их
// именно как section_footnote_PosBeneathText, в то время как все остальное (даже константа не по формату)
// воспринимает как section_footnote_PosPageBottom.
if
(
section_footnote_PosBeneathText
===
nPosType
||
section_footnote_PosDocEnd
===
nPosType
||
section_footnote_PosSectEnd
===
nPosType
)
{
this
.
Footnotes
.
Shift
(
nPageAbs
,
nColumnAbs
,
0
,
dY
);
}
else
{
var
dFootnotesHeight
=
this
.
Footnotes
.
GetHeight
(
nPageAbs
,
nColumnAbs
);
var
oPageMetrics
=
this
.
Get_PageContentStartPos
(
nPageAbs
);
this
.
Footnotes
.
Shift
(
nPageAbs
,
nColumnAbs
,
0
,
oPageMetrics
.
YLimit
-
dFootnotesHeight
);
}
};
};
CDocument
.
prototype
.
private_RecalculateFlowTable
=
function
(
RecalcInfo
)
CDocument
.
prototype
.
private_RecalculateFlowTable
=
function
(
RecalcInfo
)
{
{
...
...
word/Editor/Sections.js
View file @
b17d0192
...
@@ -177,6 +177,11 @@ CSectionPr.prototype =
...
@@ -177,6 +177,11 @@ CSectionPr.prototype =
var
Column
=
Other
.
Columns
.
Cols
[
ColumnIndex
];
var
Column
=
Other
.
Columns
.
Cols
[
ColumnIndex
];
this
.
Set_Columns_Col
(
ColumnIndex
,
Column
.
W
,
Column
.
Space
);
this
.
Set_Columns_Col
(
ColumnIndex
,
Column
.
W
,
Column
.
Space
);
}
}
this
.
SetFootnotePos
(
Other
.
FootnotePr
.
Pos
);
this
.
SetFootnoteNumStart
(
Other
.
FootnotePr
.
NumStart
);
this
.
SetFootnoteNumRestart
(
Other
.
FootnotePr
.
NumRestart
);
this
.
SetFootnoteNumFormat
(
Other
.
FootnotePr
.
NumFormat
);
},
},
Clear_AllHdrFtr
:
function
()
Clear_AllHdrFtr
:
function
()
...
@@ -1867,7 +1872,7 @@ CSectionPr.prototype.SetFootnotePos = function(nPos)
...
@@ -1867,7 +1872,7 @@ CSectionPr.prototype.SetFootnotePos = function(nPos)
CSectionPr
.
prototype
.
GetFootnotePos
=
function
()
CSectionPr
.
prototype
.
GetFootnotePos
=
function
()
{
{
if
(
undefined
===
this
.
FootnotePr
.
Pos
)
if
(
undefined
===
this
.
FootnotePr
.
Pos
)
return
this
.
private_GetDocumentWideFootnotePr
().
Pos
;
return
section_footnote_PosPageBottom
;
return
this
.
FootnotePr
.
Pos
;
return
this
.
FootnotePr
.
Pos
;
};
};
...
...
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