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
a2b46da7
Commit
a2b46da7
authored
Aug 25, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented increasing of index number of footnote reference.
parent
e8c2ebc5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+13
-7
word/Editor/ParagraphContent.js
word/Editor/ParagraphContent.js
+2
-2
word/Editor/Run.js
word/Editor/Run.js
+2
-2
No files found.
word/Editor/Footnotes.js
View file @
a2b46da7
...
...
@@ -313,21 +313,27 @@ CFootnotesController.prototype.RemoveFootnoteFromPage = function(nPageAbs, nColu
}
}
};
CFootnotesController
.
prototype
.
GetFootnoteNumberOnPage
=
function
(
nPageAbs
,
oFootnote
)
CFootnotesController
.
prototype
.
GetFootnoteNumberOnPage
=
function
(
nPageAbs
,
nColumnAbs
,
oFootnote
)
{
if
(
!
this
.
Pages
[
nPageAbs
])
var
oPage
=
this
.
Pages
[
nPageAbs
];
if
(
!
oPage
)
return
1
;
if
(
oFootnote
)
var
nFootnoteIndex
=
1
;
for
(
var
nColumnIndex
=
0
,
nColumnsCount
=
oPage
.
Columns
.
length
;
nColumnIndex
<=
Math
.
min
(
nColumnAbs
,
nColumnsCount
-
1
);
++
nColumnIndex
)
{
for
(
var
nIndex
=
0
,
nCount
=
this
.
Pages
[
nPageAbs
].
Elements
.
length
;
nIndex
<
nCount
;
++
nIndex
)
var
oColumn
=
oPage
.
Columns
[
nColumnIndex
];
for
(
var
nIndex
=
0
,
nCount
=
oColumn
.
Elements
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
if
(
oFootnote
===
this
.
Pages
[
nPageAbs
].
Elements
[
nIndex
])
return
nIndex
+
1
;
if
(
oFootnote
&&
oFootnote
===
oColumn
.
Elements
[
nIndex
])
return
nFootnoteIndex
;
nFootnoteIndex
++
;
}
}
return
this
.
Pages
[
nPageAbs
].
Elements
.
length
;
return
nFootnoteIndex
;
};
/**
* Проверяем, используется заданная сноска в документе.
...
...
word/Editor/ParagraphContent.js
View file @
a2b46da7
...
...
@@ -7641,13 +7641,13 @@ ParaFootnoteReference.prototype.Get_Footnote = function()
{
return
this
.
Footnote
;
};
ParaFootnoteReference
.
prototype
.
UpdateNumber
=
function
(
Page
Abs
)
ParaFootnoteReference
.
prototype
.
UpdateNumber
=
function
(
nPageAbs
,
nColumn
Abs
)
{
if
(
this
.
Footnote
)
{
var
oLogicDocument
=
this
.
Footnote
.
Get_LogicDocument
();
var
oFootnotesController
=
oLogicDocument
.
GetFootnotesController
();
this
.
Number
=
oFootnotesController
.
GetFootnoteNumberOnPage
(
Page
Abs
,
this
.
Footnote
);
this
.
Number
=
oFootnotesController
.
GetFootnoteNumberOnPage
(
nPageAbs
,
nColumn
Abs
,
this
.
Footnote
);
this
.
private_Measure
();
}
};
...
...
word/Editor/Run.js
View file @
a2b46da7
...
...
@@ -2343,12 +2343,12 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
if
(
para_FootnoteReference
===
ItemType
)
{
Item
.
UpdateNumber
(
Para
.
Get_AbsolutePage
(
PRS
.
Page
));
Item
.
UpdateNumber
(
Para
.
Get_AbsolutePage
(
PRS
.
Page
)
,
Para
.
Get_AbsoluteColumn
(
PRS
.
Page
)
);
PRS
.
Add_FootnoteReference
(
Item
,
Pos
);
}
else
if
(
para_FootnoteRef
===
ItemType
)
{
Item
.
UpdateNumber
(
Para
.
Get_AbsolutePage
(
PRS
.
Page
));
Item
.
UpdateNumber
(
Para
.
Get_AbsolutePage
(
PRS
.
Page
)
,
Para
.
Get_AbsoluteColumn
(
PRS
.
Page
)
);
}
// При проверке, убирается ли слово, мы должны учитывать ширину предшествующих пробелов.
...
...
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