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
a5d57609
Commit
a5d57609
authored
Apr 19, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug with moving table borders inside the CBlockLevelSdt class.
parent
090ea2a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
148 additions
and
160 deletions
+148
-160
word/Editor/Document.js
word/Editor/Document.js
+49
-56
word/Editor/DocumentContent.js
word/Editor/DocumentContent.js
+99
-104
No files found.
word/Editor/Document.js
View file @
a5d57609
...
@@ -5137,13 +5137,8 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
...
@@ -5137,13 +5137,8 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
var
SelectionUse_old
=
this
.
Selection
.
Use
;
var
SelectionUse_old
=
this
.
Selection
.
Use
;
var
Item
=
this
.
Content
[
ContentPos
];
var
Item
=
this
.
Content
[
ContentPos
];
var
bTableBorder
=
false
;
if
(
type_Table
==
Item
.
GetType
())
{
var
ElementPageIndex
=
this
.
private_GetElementPageIndexByXY
(
ContentPos
,
X
,
Y
,
this
.
CurPage
);
var
ElementPageIndex
=
this
.
private_GetElementPageIndexByXY
(
ContentPos
,
X
,
Y
,
this
.
CurPage
);
bTableBorder
=
null
===
Item
.
IsTableBorder
(
X
,
Y
,
ElementPageIndex
)
?
false
:
true
;
var
bTableBorder
=
null
===
Item
.
IsTableBorder
(
X
,
Y
,
ElementPageIndex
)
?
false
:
true
;
}
// Убираем селект, кроме случаев либо текущего параграфа, либо при движении границ внутри таблицы
// Убираем селект, кроме случаев либо текущего параграфа, либо при движении границ внутри таблицы
if
(
!
(
true
===
SelectionUse_old
&&
true
===
MouseEvent
.
ShiftKey
&&
true
===
bOldSelectionIsCommon
))
if
(
!
(
true
===
SelectionUse_old
&&
true
===
MouseEvent
.
ShiftKey
&&
true
===
bOldSelectionIsCommon
))
...
@@ -5173,7 +5168,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
...
@@ -5173,7 +5168,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
ClickCount
:
1
ClickCount
:
1
},
bTableBorder
);
},
bTableBorder
);
if
(
!
(
type_Table
==
Item
.
GetType
()
&&
true
==
bTableBorder
)
)
if
(
true
!==
bTableBorder
)
{
{
this
.
Selection
.
Use
=
true
;
this
.
Selection
.
Use
=
true
;
this
.
Selection
.
StartPos
=
ContentPos
;
this
.
Selection
.
StartPos
=
ContentPos
;
...
@@ -5187,8 +5182,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
...
@@ -5187,8 +5182,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
var
Hyperlink
=
Item
.
Check_Hyperlink
(
X
,
Y
,
ElementPageIndex
);
var
Hyperlink
=
Item
.
Check_Hyperlink
(
X
,
Y
,
ElementPageIndex
);
if
(
null
!=
Hyperlink
)
if
(
null
!=
Hyperlink
)
{
{
this
.
Selection
.
Data
=
this
.
Selection
.
Data
=
{
{
Hyperlink
:
true
,
Hyperlink
:
true
,
Value
:
Hyperlink
Value
:
Hyperlink
};
};
...
@@ -5197,8 +5191,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
...
@@ -5197,8 +5191,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
}
}
else
else
{
{
this
.
Selection
.
Data
=
this
.
Selection
.
Data
=
{
{
TableBorder
:
true
,
TableBorder
:
true
,
Pos
:
ContentPos
,
Pos
:
ContentPos
,
Selection
:
SelectionUse_old
Selection
:
SelectionUse_old
...
...
word/Editor/DocumentContent.js
View file @
a5d57609
...
@@ -6354,10 +6354,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
...
@@ -6354,10 +6354,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
var
SelectionUse_old
=
this
.
Selection
.
Use
;
var
SelectionUse_old
=
this
.
Selection
.
Use
;
var
Item
=
this
.
Content
[
ContentPos
];
var
Item
=
this
.
Content
[
ContentPos
];
var
bTableBorder
=
(
null
!=
Item
.
IsTableBorder
(
X
,
Y
,
AbsPage
)
?
true
:
false
);
var
bTableBorder
=
false
;
if
(
type_Table
==
Item
.
GetType
())
bTableBorder
=
(
null
!=
Item
.
IsTableBorder
(
X
,
Y
,
AbsPage
)
?
true
:
false
);
// Убираем селект, кроме случаев либо текущего параграфа, либо при движении границ внутри таблицы
// Убираем селект, кроме случаев либо текущего параграфа, либо при движении границ внутри таблицы
if
(
!
(
true
===
SelectionUse_old
&&
true
===
MouseEvent
.
ShiftKey
&&
true
===
bOldSelectionIsCommon
))
if
(
!
(
true
===
SelectionUse_old
&&
true
===
MouseEvent
.
ShiftKey
&&
true
===
bOldSelectionIsCommon
))
...
@@ -6384,7 +6381,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
...
@@ -6384,7 +6381,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
Item
.
Selection_SetStart
(
X
,
Y
,
ElementPageIndex
,
MouseEvent
);
Item
.
Selection_SetStart
(
X
,
Y
,
ElementPageIndex
,
MouseEvent
);
Item
.
Selection_SetEnd
(
X
,
Y
,
ElementPageIndex
,
{
Type
:
AscCommon
.
g_mouse_event_type_move
,
ClickCount
:
1
});
Item
.
Selection_SetEnd
(
X
,
Y
,
ElementPageIndex
,
{
Type
:
AscCommon
.
g_mouse_event_type_move
,
ClickCount
:
1
});
if
(
!
(
type_Table
==
Item
.
GetType
()
&&
true
==
bTableBorder
)
)
if
(
true
!==
bTableBorder
)
{
{
this
.
Selection
.
Use
=
true
;
this
.
Selection
.
Use
=
true
;
this
.
Selection
.
StartPos
=
ContentPos
;
this
.
Selection
.
StartPos
=
ContentPos
;
...
@@ -6398,8 +6395,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
...
@@ -6398,8 +6395,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
var
Hyperlink
=
Item
.
Check_Hyperlink
(
X
,
Y
,
ElementPageIndex
);
var
Hyperlink
=
Item
.
Check_Hyperlink
(
X
,
Y
,
ElementPageIndex
);
if
(
null
!=
Hyperlink
)
if
(
null
!=
Hyperlink
)
{
{
this
.
Selection
.
Data
=
this
.
Selection
.
Data
=
{
{
Hyperlink
:
true
,
Hyperlink
:
true
,
Value
:
Hyperlink
Value
:
Hyperlink
};
};
...
@@ -6408,8 +6404,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
...
@@ -6408,8 +6404,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
}
}
else
else
{
{
this
.
Selection
.
Data
=
this
.
Selection
.
Data
=
{
{
TableBorder
:
true
,
TableBorder
:
true
,
Pos
:
ContentPos
,
Pos
:
ContentPos
,
Selection
:
SelectionUse_old
Selection
:
SelectionUse_old
...
...
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