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
ce59e617
Commit
ce59e617
authored
Mar 24, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #34513
parent
8f8dfc01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
common/CollaborativeEditingBase.js
common/CollaborativeEditingBase.js
+1
-1
word/Editor/Paragraph.js
word/Editor/Paragraph.js
+9
-6
No files found.
common/CollaborativeEditingBase.js
View file @
ce59e617
...
...
@@ -1113,7 +1113,7 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
{
var
oParagraph
=
mapParagraphs
[
sId
];
oParagraph
.
CheckParaEnd
();
oParagraph
.
Correct_Content
();
oParagraph
.
Correct_Content
(
null
,
null
,
true
);
}
var
oBinaryWriter
=
AscCommon
.
History
.
BinaryWriter
;
...
...
word/Editor/Paragraph.js
View file @
ce59e617
...
...
@@ -5373,7 +5373,7 @@ Paragraph.prototype =
return
0
;
},
Correct_Content
:
function
(
_StartPos
,
_EndPos
)
Correct_Content
:
function
(
_StartPos
,
_EndPos
,
bDoNotDeleteEmptyRuns
)
{
// Если у нас сейчас в данном параграфе используется ссылка на позицию, тогда мы не корректируем контент, чтобы
// не удалить место, на которое идет ссылка.
...
...
@@ -5386,8 +5386,8 @@ Paragraph.prototype =
// 3. Добавляем пустой ран в место, где нет рана (например, между двумя идущими подряд гиперссылками)
// 4. Удаляем пустые комментарии
var
StartPos
=
(
undefined
===
_StartPos
?
0
:
Math
.
max
(
_StartPos
-
1
,
0
)
);
var
EndPos
=
(
undefined
===
_EndPos
?
this
.
Content
.
length
-
1
:
Math
.
min
(
_EndPos
+
1
,
this
.
Content
.
length
-
1
)
);
var
StartPos
=
(
undefined
===
_StartPos
||
null
===
_StartPos
?
0
:
Math
.
max
(
_StartPos
-
1
,
0
)
);
var
EndPos
=
(
undefined
===
_EndPos
||
null
===
_EndPos
?
this
.
Content
.
length
-
1
:
Math
.
min
(
_EndPos
+
1
,
this
.
Content
.
length
-
1
)
);
var
CommentsToDelete
=
[];
for
(
var
CurPos
=
EndPos
;
CurPos
>=
StartPos
;
CurPos
--
)
...
...
@@ -5432,9 +5432,12 @@ Paragraph.prototype =
}
else
{
// TODO (Para_End): Предпоследний элемент мы не проверяем, т.к. на ран с Para_End мы не ориентируемся
if
(
true
===
CurElement
.
Is_Empty
()
&&
(
0
<
CurPos
||
para_Run
!==
this
.
Content
[
CurPos
].
Type
)
&&
CurPos
<
this
.
Content
.
length
-
2
&&
para_Run
===
this
.
Content
[
CurPos
+
1
].
Type
)
this
.
Internal_Content_Remove
(
CurPos
);
if
(
true
!==
bDoNotDeleteEmptyRuns
)
{
// TODO (Para_End): Предпоследний элемент мы не проверяем, т.к. на ран с Para_End мы не ориентируемся
if
(
true
===
CurElement
.
Is_Empty
()
&&
(
0
<
CurPos
||
para_Run
!==
this
.
Content
[
CurPos
].
Type
)
&&
CurPos
<
this
.
Content
.
length
-
2
&&
para_Run
===
this
.
Content
[
CurPos
+
1
].
Type
)
this
.
Internal_Content_Remove
(
CurPos
);
}
}
}
...
...
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