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
ca221c82
Commit
ca221c82
authored
Jan 31, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #33827. Added a correction of paragraph content after performing of collaboration undo.
parent
7c7aaab1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
word/Editor/CollaborativeEditing.js
word/Editor/CollaborativeEditing.js
+2
-1
word/Editor/ParagraphContentBase.js
word/Editor/ParagraphContentBase.js
+13
-0
word/api.js
word/api.js
+1
-1
No files found.
word/Editor/CollaborativeEditing.js
View file @
ca221c82
...
...
@@ -748,7 +748,7 @@ CWordCollaborativeEditing.prototype.Undo = function()
mapDocumentContents
[
oClass
.
Get_Id
()]
=
oClass
;
else
if
(
oClass
instanceof
AscCommonWord
.
Paragraph
)
mapParagraphs
[
oClass
.
Get_Id
()]
=
oClass
;
else
if
(
oClass
instanceof
AscCommonWord
.
ParaRun
&&
true
===
oChange
.
IsContentChange
()
&&
oClass
.
Get_Paragraph
())
else
if
(
oClass
.
IsParagraphContentElement
&&
true
===
oClass
.
IsParagraphContentElement
()
&&
true
===
oChange
.
IsContentChange
()
&&
oClass
.
Get_Paragraph
())
mapParagraphs
[
oClass
.
Get_Paragraph
().
Get_Id
()]
=
oClass
.
Get_Paragraph
();
}
...
...
@@ -768,6 +768,7 @@ CWordCollaborativeEditing.prototype.Undo = function()
for
(
var
sId
in
mapParagraphs
)
{
var
oParagraph
=
mapParagraphs
[
sId
];
oParagraph
.
Correct_Content
();
oParagraph
.
CheckParaEnd
();
}
var
oHistoryPoint
=
oHistory
.
Points
[
oHistory
.
Points
.
length
-
1
];
...
...
word/Editor/ParagraphContentBase.js
View file @
ca221c82
...
...
@@ -38,6 +38,10 @@ CParagraphContentBase.prototype.CanSplit = function()
{
return
false
;
};
CParagraphContentBase
.
prototype
.
IsParagraphContentElement
=
function
()
{
return
true
;
};
/**
* Это базовый класс для элементов содержимого(контент) параграфа, у которых есть свое содержимое.
...
...
@@ -1898,6 +1902,9 @@ CParagraphContentWithParagraphLikeContent.prototype.Get_EndPos = function(Behind
//----------------------------------------------------------------------------------------------------------------------
CParagraphContentWithParagraphLikeContent
.
prototype
.
Set_SelectionContentPos
=
function
(
StartContentPos
,
EndContentPos
,
Depth
,
StartFlag
,
EndFlag
)
{
if
(
this
.
Content
.
length
<=
0
)
return
;
var
Selection
=
this
.
Selection
;
var
OldStartPos
=
Selection
.
StartPos
;
...
...
@@ -1980,6 +1987,9 @@ CParagraphContentWithParagraphLikeContent.prototype.Set_SelectionContentPos = fu
};
CParagraphContentWithParagraphLikeContent
.
prototype
.
Set_ContentSelection
=
function
(
StartDocPos
,
EndDocPos
,
Depth
,
StartFlag
,
EndFlag
)
{
if
(
this
.
Content
.
length
<=
0
)
return
;
if
((
0
===
StartFlag
&&
(
!
StartDocPos
[
Depth
]
||
this
!==
StartDocPos
[
Depth
].
Class
))
||
(
0
===
EndFlag
&&
(
!
EndDocPos
[
Depth
]
||
this
!==
EndDocPos
[
Depth
].
Class
)))
return
;
...
...
@@ -2076,6 +2086,9 @@ CParagraphContentWithParagraphLikeContent.prototype.Set_ContentSelection = funct
};
CParagraphContentWithParagraphLikeContent
.
prototype
.
Set_ContentPosition
=
function
(
DocPos
,
Depth
,
Flag
)
{
if
(
this
.
Content
.
length
<=
0
)
return
;
if
(
0
===
Flag
&&
(
!
DocPos
[
Depth
]
||
this
!==
DocPos
[
Depth
].
Class
))
return
;
...
...
word/api.js
View file @
ca221c82
...
...
@@ -1877,7 +1877,7 @@ background-repeat: no-repeat;\
{
this
.
IsUserSave
=
!
isAutoSave
;
if
(
true
===
this
.
canSave
&&
!
this
.
isLongAction
()
&&
(
this
.
asc_isDocumentCanSave
()
||
History
.
Have_Changes
()
||
AscCommon
.
CollaborativeEditing
.
Have_OtherChanges
()))
AscCommon
.
CollaborativeEditing
.
Have_OtherChanges
()
||
true
===
isUndoRequest
))
{
this
.
canSave
=
false
;
...
...
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