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
6e088216
Commit
6e088216
authored
Feb 10, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #34045
parent
0878b13d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
13 deletions
+28
-13
word/Editor/Document.js
word/Editor/Document.js
+14
-7
word/Editor/DocumentContent.js
word/Editor/DocumentContent.js
+14
-6
No files found.
word/Editor/Document.js
View file @
6e088216
...
...
@@ -5798,13 +5798,14 @@ CDocument.prototype.Insert_Content = function(SelectedContent, NearPos)
ParaEIndex
=
DstIndex
+
1
;
}
var
NewEmptyPara
=
null
;
if
(
true
===
bAddEmptyPara
)
{
// Создаем новый параграф
var
NewParagraph
=
new
Paragraph
(
this
.
DrawingDocument
,
this
,
0
,
0
,
0
,
0
,
0
);
New
Paragraph
.
Set_Pr
(
ParaS
.
Pr
);
New
Paragraph
.
TextPr
.
Apply_TextPr
(
ParaS
.
TextPr
.
Value
);
this
.
Internal_Content_Add
(
DstIndex
+
1
,
New
Paragraph
);
NewEmptyPara
=
new
Paragraph
(
this
.
DrawingDocument
,
this
,
0
,
0
,
0
,
0
,
0
);
New
EmptyPara
.
Set_Pr
(
ParaS
.
Pr
);
New
EmptyPara
.
TextPr
.
Apply_TextPr
(
ParaS
.
TextPr
.
Value
);
this
.
Internal_Content_Add
(
DstIndex
+
1
,
New
EmptyPara
);
}
var
StartIndex
=
0
;
...
...
@@ -5852,17 +5853,23 @@ CDocument.prototype.Insert_Content = function(SelectedContent, NearPos)
EndIndex
--
;
}
for
(
var
Index
=
StartIndex
;
Index
<=
EndIndex
;
Index
++
)
{
this
.
Internal_Content_Add
(
DstIndex
+
Index
,
Elements
[
Index
].
Element
);
this
.
Content
[
DstIndex
+
Index
].
Select_All
();
}
var
LastPos
=
DstIndex
+
ElementsCount
-
1
;
if
(
NewEmptyPara
&&
NewEmptyPara
===
this
.
Content
[
LastPos
+
1
])
{
LastPos
++
;
this
.
Content
[
LastPos
].
Select_All
();
}
this
.
Selection
.
Use
=
true
;
this
.
Selection
.
StartPos
=
DstIndex
;
this
.
Selection
.
EndPos
=
DstIndex
+
ElementsCount
-
1
;
this
.
CurPos
.
ContentPos
=
DstIndex
+
ElementsCount
-
1
;
this
.
Selection
.
EndPos
=
LastPos
;
this
.
CurPos
.
ContentPos
=
LastPos
;
}
if
(
docpostype_DrawingObjects
!==
this
.
CurPos
.
Type
)
...
...
word/Editor/DocumentContent.js
View file @
6e088216
...
...
@@ -4386,13 +4386,14 @@ CDocumentContent.prototype.Insert_Content = function(Selecte
ParaEIndex
=
DstIndex
+
1
;
}
var
NewEmptyPara
=
null
;
if
(
true
===
bAddEmptyPara
)
{
// Создаем новый параграф
var
NewParagraph
=
new
Paragraph
(
this
.
DrawingDocument
,
this
,
0
,
0
,
0
,
0
,
0
,
this
.
bPresentation
===
true
);
NewParagraph
.
Set_Pr
(
ParaS
.
Pr
);
NewParagraph
.
TextPr
.
Apply_TextPr
(
ParaS
.
TextPr
.
Value
);
this
.
Internal_Content_Add
(
DstIndex
+
1
,
New
Paragraph
);
NewEmptyPara
=
new
Paragraph
(
this
.
DrawingDocument
,
this
,
0
,
0
,
0
,
0
,
0
,
this
.
bPresentation
===
true
);
NewEmptyPara
.
Set_Pr
(
ParaS
.
Pr
);
NewEmptyPara
.
TextPr
.
Apply_TextPr
(
ParaS
.
TextPr
.
Value
);
this
.
Internal_Content_Add
(
DstIndex
+
1
,
New
EmptyPara
);
}
var
StartIndex
=
0
;
...
...
@@ -4443,11 +4444,18 @@ CDocumentContent.prototype.Insert_Content = function(Selecte
this
.
Content
[
DstIndex
+
Index
].
Select_All
();
}
var
LastPos
=
DstIndex
+
ElementsCount
-
1
;
if
(
NewEmptyPara
&&
NewEmptyPara
===
this
.
Content
[
LastPos
+
1
])
{
LastPos
++
;
this
.
Content
[
LastPos
].
Select_All
();
}
this
.
Selection
.
Start
=
false
;
this
.
Selection
.
Use
=
true
;
this
.
Selection
.
StartPos
=
DstIndex
;
this
.
Selection
.
EndPos
=
DstIndex
+
ElementsCount
-
1
;
this
.
CurPos
.
ContentPos
=
DstIndex
+
ElementsCount
-
1
;
this
.
Selection
.
EndPos
=
LastPos
;
this
.
CurPos
.
ContentPos
=
LastPos
;
}
if
(
true
===
bNeedSelect
)
...
...
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