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
e97da9d6
Commit
e97da9d6
authored
Jun 06, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function for check whether is it a viewer mode or not were moved to the CDocument class.
parent
e228821b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
40 deletions
+64
-40
word/Editor/Document.js
word/Editor/Document.js
+47
-29
word/Editor/Paragraph.js
word/Editor/Paragraph.js
+14
-8
word/Editor/Table.js
word/Editor/Table.js
+3
-3
No files found.
word/Editor/Document.js
View file @
e97da9d6
This diff is collapsed.
Click to expand it.
word/Editor/Paragraph.js
View file @
e97da9d6
...
...
@@ -1431,7 +1431,8 @@ Paragraph.prototype.Internal_Draw_2 = function(CurPage, pGraphics, Pr)
};
Paragraph
.
prototype
.
Internal_Draw_3
=
function
(
CurPage
,
pGraphics
,
Pr
)
{
if
(
!
this
.
bFromDocument
)
var
LogicDocument
=
this
.
LogicDocument
;
if
(
!
this
.
bFromDocument
||
!
LogicDocument
)
return
;
var
bDrawBorders
=
this
.
Is_NeedDrawBorders
();
...
...
@@ -1442,14 +1443,14 @@ Paragraph.prototype.Internal_Draw_3 = function(CurPage, pGraphics, Pr)
var
_Page
=
this
.
Pages
[
CurPage
];
var
DocumentComments
=
editor
.
WordControl
.
m_o
LogicDocument
.
Comments
;
var
DocumentComments
=
LogicDocument
.
Comments
;
var
Page_abs
=
this
.
Get_AbsolutePage
(
CurPage
);
var
DrawComm
=
(
DocumentComments
.
Is_Use
()
&&
true
!=
editor
.
isViewMode
);
var
DrawFind
=
editor
.
WordControl
.
m_o
LogicDocument
.
SearchEngine
.
Selection
;
var
DrawComm
=
(
DocumentComments
.
Is_Use
()
&&
(
true
!==
LogicDocument
.
IsViewMode
()
||
true
===
LogicDocument
.
CanEditCommentsInViewMode
())
);
var
DrawFind
=
LogicDocument
.
SearchEngine
.
Selection
;
var
DrawColl
=
(
undefined
===
pGraphics
.
RENDERER_PDF_FLAG
?
false
:
true
);
var
DrawMMFields
=
(
this
.
LogicDocument
&&
true
===
this
.
LogicDocument
.
Is_HightlightMailMergeFields
()
?
true
:
false
);
var
DrawSolvedComments
=
(
DocumentComments
.
IsUseSolved
()
&&
true
!=
editor
.
isViewMode
);
var
DrawSolvedComments
=
(
DocumentComments
.
IsUseSolved
()
&&
(
true
!==
LogicDocument
.
IsViewMode
()
||
true
===
LogicDocument
.
CanEditCommentsInViewMode
())
);
PDSH
.
Reset
(
this
,
pGraphics
,
DrawColl
,
DrawFind
,
DrawComm
,
DrawMMFields
,
this
.
Get_EndInfoByPage
(
CurPage
-
1
),
DrawSolvedComments
);
...
...
@@ -6030,7 +6031,7 @@ Paragraph.prototype.Selection_SetEnd = function(X, Y, CurPage, MouseEvent, bTabl
{
var
PagesCount
=
this
.
Pages
.
length
;
if
(
this
.
bFromDocument
&&
false
===
editor
.
isViewMode
&&
null
===
this
.
Parent
.
Is_HdrFtr
(
true
)
&&
null
==
this
.
Get_DocumentNext
()
&&
CurPage
>=
PagesCount
-
1
&&
Y
>
this
.
Pages
[
PagesCount
-
1
].
Bounds
.
Bottom
&&
MouseEvent
.
ClickCount
>=
2
)
if
(
this
.
bFromDocument
&&
this
.
LogicDocument
&&
false
===
this
.
LogicDocument
.
IsViewMode
()
&&
null
===
this
.
Parent
.
Is_HdrFtr
(
true
)
&&
null
==
this
.
Get_DocumentNext
()
&&
CurPage
>=
PagesCount
-
1
&&
Y
>
this
.
Pages
[
PagesCount
-
1
].
Bounds
.
Bottom
&&
MouseEvent
.
ClickCount
>=
2
)
return
this
.
Parent
.
Extend_ToPos
(
X
,
Y
);
// Обновляем позицию курсора
...
...
@@ -6051,7 +6052,10 @@ Paragraph.prototype.Selection_SetEnd = function(X, Y, CurPage, MouseEvent, bTabl
var
LastRange
=
this
.
Lines
[
this
.
Lines
.
length
-
1
].
Ranges
[
this
.
Lines
[
this
.
Lines
.
length
-
1
].
Ranges
.
length
-
1
];
if
(
CurPage
>=
PagesCount
-
1
&&
X
>
LastRange
.
W
&&
MouseEvent
.
ClickCount
>=
2
&&
Y
<=
this
.
Pages
[
PagesCount
-
1
].
Bounds
.
Bottom
)
{
if
(
this
.
bFromDocument
&&
false
===
editor
.
isViewMode
&&
false
===
editor
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_None
,
{
if
(
this
.
bFromDocument
&&
this
.
LogicDocument
&&
false
===
this
.
LogicDocument
.
IsViewMode
()
&&
false
===
this
.
LogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_None
,
{
Type
:
AscCommon
.
changestype_2_Element_and_Type
,
Element
:
this
,
CheckType
:
AscCommon
.
changestype_Paragraph_Content
...
...
@@ -6064,11 +6068,13 @@ Paragraph.prototype.Selection_SetEnd = function(X, Y, CurPage, MouseEvent, bTabl
{
this
.
MoveCursorToEndPos
();
this
.
Document_SetThisElementCurrent
(
true
);
editor
.
WordControl
.
m_o
LogicDocument
.
Recalculate
();
this
.
LogicDocument
.
Recalculate
();
return
;
}
else
{
History
.
Remove_LastPoint
();
}
}
}
}
...
...
word/Editor/Table.js
View file @
e97da9d6
...
...
@@ -4438,7 +4438,8 @@ CTable.prototype.Selection_SetEnd = function(X, Y, CurPage, MouseEvent)
var
Page
=
this
.
Pages
[
CurPage
];
if
(
this
.
Selection
.
Type2
===
table_Selection_Border
)
{
if
(
true
===
editor
.
isViewMode
||
this
.
Selection
.
Data2
.
PageNum
!=
CurPage
)
var
LogicDocument
=
this
.
LogicDocument
;
if
(
!
LogicDocument
||
true
===
LogicDocument
.
IsViewMode
()
||
this
.
Selection
.
Data2
.
PageNum
!=
CurPage
)
return
;
var
_X
=
X
;
...
...
@@ -4476,8 +4477,7 @@ CTable.prototype.Selection_SetEnd = function(X, Y, CurPage, MouseEvent)
return
;
}
var
LogicDocument
=
(
editor
&&
true
!==
editor
.
isViewMode
?
editor
.
WordControl
.
m_oLogicDocument
:
null
);
if
(
LogicDocument
&&
false
===
LogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_None
,
{
if
(
false
===
LogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_None
,
{
Type
:
AscCommon
.
changestype_2_Element_and_Type
,
Element
:
this
,
CheckType
:
AscCommon
.
changestype_Table_Properties
...
...
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