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
4d6a3ce4
Commit
4d6a3ce4
authored
Feb 22, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #34145.
parent
44411180
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
48 deletions
+54
-48
word/Editor/DocumentChanges.js
word/Editor/DocumentChanges.js
+7
-3
word/Editor/Table.js
word/Editor/Table.js
+47
-45
No files found.
word/Editor/DocumentChanges.js
View file @
4d6a3ce4
...
@@ -318,11 +318,15 @@ CChangesDocumentRemoveItem.prototype.Load = function(Color)
...
@@ -318,11 +318,15 @@ CChangesDocumentRemoveItem.prototype.Load = function(Color)
oDocument
.
Content
[
Pos
].
Prev
=
null
;
oDocument
.
Content
[
Pos
].
Prev
=
null
;
}
}
if
(
oDocument
.
SectionsInfo
)
if
(
0
<=
Pos
&&
Pos
<=
oDocument
.
Content
.
length
-
1
)
{
{
oDocument
.
SectionsInfo
.
Update_OnRemove
(
Pos
,
1
);
if
(
oDocument
.
SectionsInfo
)
{
oDocument
.
SectionsInfo
.
Update_OnRemove
(
Pos
,
1
);
}
oDocument
.
private_ReindexContent
(
Pos
);
}
}
oDocument
.
private_ReindexContent
(
Pos
);
}
}
};
};
CChangesDocumentRemoveItem
.
prototype
.
IsRelated
=
function
(
oChanges
)
CChangesDocumentRemoveItem
.
prototype
.
IsRelated
=
function
(
oChanges
)
...
...
word/Editor/Table.js
View file @
4d6a3ce4
...
@@ -2595,7 +2595,7 @@ CTable.prototype =
...
@@ -2595,7 +2595,7 @@ CTable.prototype =
if
(
true
!=
this
.
Is_Inline
()
)
if
(
true
!=
this
.
Is_Inline
()
)
{
{
if
(
false
===
oLogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_Table_Properties
)
)
if
(
false
===
oLogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_Table_Properties
,
null
,
true
)
)
{
{
oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_MoveInlineTable
);
oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_MoveInlineTable
);
...
@@ -2667,29 +2667,30 @@ CTable.prototype =
...
@@ -2667,29 +2667,30 @@ CTable.prototype =
}
}
if
(
NewDocContent
!=
OldDocContent
)
var
oTargetTable
=
AscCommon
.
CollaborativeEditing
.
Is_SingleUser
()
?
this
:
this
.
Copy
(
NewDocContent
);
{
if
(
NewDocContent
!=
OldDocContent
)
// Сначала добавляем таблицу в новый класс
{
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
this
);
// Сначала добавляем таблицу в новый класс
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
oTargetTable
);
// Удаляем таблицу из родительского класса
// Удаляем таблицу из родительского класса
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
this
.
Parent
=
NewDocContent
;
oTargetTable
.
Parent
=
NewDocContent
;
}
}
else
else
{
{
if
(
NearestPos
.
Paragraph
.
Index
>
this
.
Index
)
if
(
NearestPos
.
Paragraph
.
Index
>
this
.
Index
)
{
{
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
this
);
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
oTargetTable
);
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
}
}
else
else
{
{
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
this
);
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
oTargetTable
);
}
}
}
}
}
}
editor
.
WordControl
.
m_oLogicDocument
.
Recalculate
();
editor
.
WordControl
.
m_oLogicDocument
.
Recalculate
();
...
@@ -2700,7 +2701,7 @@ CTable.prototype =
...
@@ -2700,7 +2701,7 @@ CTable.prototype =
else
else
{
{
// Проверяем, можно ли двигать данную таблицу
// Проверяем, можно ли двигать данную таблицу
if
(
false
===
oLogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_Table_Properties
,
{
Type
:
AscCommon
.
changestype_2_InlineObjectMove
,
PageNum
:
PageNum
,
X
:
X
,
Y
:
Y
})
)
if
(
false
===
oLogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_Table_Properties
,
{
Type
:
AscCommon
.
changestype_2_InlineObjectMove
,
PageNum
:
PageNum
,
X
:
X
,
Y
:
Y
}
,
true
)
)
{
{
oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_MoveFlowTable
);
oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_MoveFlowTable
);
...
@@ -2734,30 +2735,30 @@ CTable.prototype =
...
@@ -2734,30 +2735,30 @@ CTable.prototype =
NewIndex
++
;
NewIndex
++
;
}
}
var
oTargetTable
=
AscCommon
.
CollaborativeEditing
.
Is_SingleUser
()
?
this
:
this
.
Copy
(
NewDocContent
);
if
(
NewDocContent
!=
OldDocContent
)
{
// Сначала добавляем таблицу в новый класс
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
oTargetTable
);
if
(
NewDocContent
!=
OldDocContent
)
// Удаляем таблицу из родительского класса
{
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
// Сначала добавляем таблицу в новый класс
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
this
);
// Удаляем таблицу из родительского класса
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
this
.
Parent
=
NewDocContent
;
oTargetTable
.
Parent
=
NewDocContent
;
}
}
else
else
{
{
if
(
NearestPos
.
Paragraph
.
Index
>
this
.
Index
)
if
(
NearestPos
.
Paragraph
.
Index
>
this
.
Index
)
{
{
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
this
);
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
oTargetTable
);
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
}
}
else
else
{
{
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
OldDocContent
.
Internal_Content_Remove
(
OldIndex
,
1
);
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
this
);
NewDocContent
.
Internal_Content_Add
(
NewIndex
,
oTargetTable
);
}
}
}
}
editor
.
WordControl
.
m_oLogicDocument
.
Recalculate
();
editor
.
WordControl
.
m_oLogicDocument
.
Recalculate
();
}
}
...
@@ -12689,3 +12690,4 @@ CTableAnchorPosition.prototype =
...
@@ -12689,3 +12690,4 @@ CTableAnchorPosition.prototype =
//--------------------------------------------------------export----------------------------------------------------
//--------------------------------------------------------export----------------------------------------------------
window
[
'
AscCommonWord
'
]
=
window
[
'
AscCommonWord
'
]
||
{};
window
[
'
AscCommonWord
'
]
=
window
[
'
AscCommonWord
'
]
||
{};
window
[
'
AscCommonWord
'
].
CTable
=
CTable
;
window
[
'
AscCommonWord
'
].
CTable
=
CTable
;
window
[
'
AscCommonWord
'
].
type_Table
=
type_Table
;
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