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
63788267
Commit
63788267
authored
Mar 24, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #34380
parent
2226d75a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
52 deletions
+93
-52
word/Editor/DocumentContent.js
word/Editor/DocumentContent.js
+54
-50
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+39
-2
No files found.
word/Editor/DocumentContent.js
View file @
63788267
...
...
@@ -1370,16 +1370,19 @@ CDocumentContent.prototype.RecalculateCurPos = function()
return
null
;
};
CDocumentContent
.
prototype
.
Get_PageBounds
=
function
(
PageNum
,
Height
,
bForceCheckDrawings
)
CDocumentContent
.
prototype
.
Get_PageBounds
=
function
(
CurPage
,
Height
,
bForceCheckDrawings
)
{
if
(
this
.
Pages
.
length
<=
0
)
return
{
Top
:
0
,
Left
:
0
,
Right
:
0
,
Bottom
:
0
};
if
(
PageNum
<
0
||
PageNum
>
this
.
Pages
.
length
)
return
this
.
Pages
[
0
].
Bounds
;
if
(
CurPage
<
0
)
CurPage
=
0
;
var
Bounds
=
this
.
Pages
[
PageNum
].
Bounds
;
var
PageNumAbs
=
PageNum
+
this
.
Get_StartPage_Absolute
();
if
(
CurPage
>=
this
.
Pages
.
length
)
CurPage
=
this
.
Pages
.
length
-
1
;
var
Bounds
=
this
.
Pages
[
CurPage
].
Bounds
;
var
PageAbs
=
this
.
Get_AbsolutePage
(
CurPage
);
// В колонтитуле не учитывается.
if
(
true
!=
this
.
Is_HdrFtr
(
false
)
||
true
===
bForceCheckDrawings
)
...
...
@@ -1392,7 +1395,7 @@ CDocumentContent.prototype.Get_PageBounds = function(PageNum, He
for
(
var
Index
=
0
;
Index
<
Count
;
Index
++
)
{
var
Obj
=
AllDrawingObjects
[
Index
];
if
(
PageNum
Abs
===
Obj
.
Get_PageNum
())
if
(
Page
Abs
===
Obj
.
Get_PageNum
())
{
var
ObjBounds
=
Obj
.
Get_Bounds
();
if
(
true
===
Obj
.
Use_TextWrap
())
...
...
@@ -1415,9 +1418,10 @@ CDocumentContent.prototype.Get_PageBounds = function(PageNum, He
for
(
var
Index
=
0
;
Index
<
Count
;
Index
++
)
{
var
Element
=
this
.
Content
[
Index
];
if
(
type_Table
===
Element
.
GetType
()
&&
true
!=
Element
.
Is_Inline
()
&&
Element
.
Pages
.
length
>
PageNum
-
Element
.
PageNum
&&
PageNum
-
Element
.
PageNum
>=
0
)
var
ElementPageIndex
=
this
.
private_GetElementPageIndex
(
Index
,
CurPage
,
0
,
1
);
if
(
type_Table
===
Element
.
GetType
()
&&
true
!=
Element
.
Is_Inline
()
&&
0
<=
ElementPageIndex
&&
ElementPageIndex
<
Element
.
Get_PagesCount
())
{
var
TableBounds
=
Element
.
Get_PageBounds
(
PageNum
-
Element
.
PageNum
);
var
TableBounds
=
Element
.
Get_PageBounds
(
ElementPageIndex
);
if
(
TableBounds
.
Bottom
>
Bounds
.
Bottom
)
Bounds
.
Bottom
=
TableBounds
.
Bottom
;
}
...
...
word/Editor/Footnotes.js
View file @
63788267
...
...
@@ -931,7 +931,11 @@ CFootnotesController.prototype.EndSelection = function(X, Y, PageAbs, MouseEvent
// Новый селект
if
(
this
.
Selection
.
Start
.
Footnote
!==
this
.
Selection
.
End
.
Footnote
)
{
if
(
this
.
Selection
.
Start
.
Page
>
this
.
Selection
.
End
.
Page
||
this
.
Selection
.
Start
.
Index
>
this
.
Selection
.
End
.
Index
)
if
(
this
.
Selection
.
Start
.
Page
>
this
.
Selection
.
End
.
Page
||
(
this
.
Selection
.
Start
.
Page
===
this
.
Selection
.
End
.
Page
&&
(
this
.
Selection
.
Start
.
Column
>
this
.
Selection
.
End
.
Column
||
(
this
.
Selection
.
Start
.
Column
===
this
.
Selection
.
End
.
Column
&&
this
.
Selection
.
Start
.
Index
>
this
.
Selection
.
End
.
Index
))))
{
this
.
Selection
.
Start
.
Footnote
.
Selection_SetEnd
(
-
MEASUREMENT_MAX_MM_VALUE
,
-
MEASUREMENT_MAX_MM_VALUE
,
0
,
MouseEvent
);
this
.
Selection
.
End
.
Footnote
.
Selection_SetStart
(
MEASUREMENT_MAX_MM_VALUE
,
MEASUREMENT_MAX_MM_VALUE
,
this
.
Selection
.
End
.
Footnote
.
Pages
.
length
-
1
,
MouseEvent
);
...
...
@@ -1104,6 +1108,39 @@ CFootnotesController.prototype.private_GetFootnoteOnPageByXY = function(X, Y, nP
}
}
if
(
!
oColumn
)
return
null
;
if
(
oColumn
.
Elements
.
length
<=
0
)
{
var
nCurColumnIndex
=
nColumnIndex
-
1
;
while
(
nCurColumnIndex
>=
0
)
{
if
(
oPage
.
Columns
[
nCurColumnIndex
].
Elements
.
length
>
0
)
{
oColumn
=
oPage
.
Columns
[
nCurColumnIndex
];
nColumnIndex
=
nCurColumnIndex
;
break
;
}
nCurColumnIndex
--
;
}
if
(
nCurColumnIndex
<
0
)
{
nCurColumnIndex
=
nColumnIndex
+
1
;
while
(
nCurColumnIndex
<=
oPage
.
Columns
.
length
-
1
)
{
if
(
oPage
.
Columns
[
nCurColumnIndex
].
Elements
.
length
>
0
)
{
oColumn
=
oPage
.
Columns
[
nCurColumnIndex
];
nColumnIndex
=
nCurColumnIndex
;
break
;
}
nCurColumnIndex
++
;
}
}
}
if
(
!
oColumn
)
return
null
;
...
...
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