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
9504dab6
Commit
9504dab6
authored
Dec 01, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check SectionsInfo
parent
42dda9af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
word/Editor/DocumentChanges.js
word/Editor/DocumentChanges.js
+23
-5
No files found.
word/Editor/DocumentChanges.js
View file @
9504dab6
...
...
@@ -78,7 +78,11 @@ CChangesDocumentAddItem.prototype.Undo = function()
var
oDocument
=
this
.
Class
;
var
Elements
=
oDocument
.
Content
.
splice
(
Pos
,
1
);
oDocument
.
private_RecalculateNumbering
(
Elements
);
oDocument
.
SectionsInfo
.
Update_OnRemove
(
Pos
,
1
);
if
(
oDocument
.
SectionsInfo
)
{
oDocument
.
SectionsInfo
.
Update_OnRemove
(
Pos
,
1
);
}
if
(
Pos
>
0
)
{
...
...
@@ -108,7 +112,10 @@ CChangesDocumentAddItem.prototype.Redo = function()
var
oDocument
=
this
.
Class
;
oDocument
.
Content
.
splice
(
Pos
,
0
,
Element
);
oDocument
.
private_RecalculateNumbering
([
Element
]);
oDocument
.
SectionsInfo
.
Update_OnAdd
(
Pos
,
[
Element
]);
if
(
oDocument
.
SectionsInfo
)
{
oDocument
.
SectionsInfo
.
Update_OnAdd
(
Pos
,
[
Element
]);
}
if
(
Pos
>
0
)
{
...
...
@@ -178,7 +185,10 @@ CChangesDocumentAddItem.prototype.Load = function(Color)
oDocument
.
Content
.
splice
(
Pos
,
0
,
Element
);
oDocument
.
private_RecalculateNumbering
([
Element
]);
oDocument
.
SectionsInfo
.
Update_OnAdd
(
Pos
,
[
Element
]);
if
(
oDocument
.
SectionsInfo
)
{
oDocument
.
SectionsInfo
.
Update_OnAdd
(
Pos
,
[
Element
]);
}
oDocument
.
private_ReindexContent
(
Pos
);
AscCommon
.
CollaborativeEditing
.
Update_DocumentPositionsOnAdd
(
oDocument
,
Pos
);
...
...
@@ -215,7 +225,11 @@ CChangesDocumentRemoveItem.prototype.Undo = function()
oDocument
.
private_RecalculateNumbering
(
this
.
Items
);
oDocument
.
Content
=
Array_start
.
concat
(
this
.
Items
,
Array_end
);
oDocument
.
SectionsInfo
.
Update_OnAdd
(
this
.
Pos
,
this
.
Items
);
if
(
oDocument
.
SectionsInfo
)
{
oDocument
.
SectionsInfo
.
Update_OnAdd
(
this
.
Pos
,
this
.
Items
);
}
var
nStartIndex
=
Math
.
max
(
this
.
Pos
-
1
,
0
);
var
nEndIndex
=
Math
.
min
(
oDocument
.
Content
.
length
-
1
,
this
.
Pos
+
this
.
Items
.
length
+
1
);
...
...
@@ -240,7 +254,11 @@ CChangesDocumentRemoveItem.prototype.Redo = function()
var
oDocument
=
this
.
Class
;
var
Elements
=
oDocument
.
Content
.
splice
(
this
.
Pos
,
this
.
Items
.
length
);
oDocument
.
private_RecalculateNumbering
(
Elements
);
oDocument
.
SectionsInfo
.
Update_OnRemove
(
this
.
Pos
,
this
.
Items
.
length
);
if
(
oDocument
.
SectionsInfo
)
{
oDocument
.
SectionsInfo
.
Update_OnRemove
(
this
.
Pos
,
this
.
Items
.
length
);
}
var
Pos
=
this
.
Pos
;
if
(
Pos
>
0
)
...
...
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