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
b89d02d8
Commit
b89d02d8
authored
Mar 28, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #34540
parent
fac01b2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
12 deletions
+42
-12
word/Editor/Document.js
word/Editor/Document.js
+29
-12
word/Editor/ParagraphContent.js
word/Editor/ParagraphContent.js
+13
-0
No files found.
word/Editor/Document.js
View file @
b89d02d8
...
...
@@ -11914,26 +11914,43 @@ CDocument.prototype.controller_AddToParagraph = function(ParaItem, bRecalculate)
var
Item
=
this
.
Content
[
this
.
CurPos
.
ContentPos
];
var
ItemType
=
Item
.
GetType
();
if
(
para_NewLine
===
ParaItem
.
Type
&&
true
===
ParaItem
.
Is
_
PageOrColumnBreak
())
if
(
para_NewLine
===
ParaItem
.
Type
&&
true
===
ParaItem
.
IsPageOrColumnBreak
())
{
if
(
type_Paragraph
===
ItemType
)
{
if
(
true
===
Item
.
Cursor_IsStart
())
{
this
.
Add_NewParagraph
(
undefined
,
true
);
var
CurPos
=
this
.
CurPos
.
ContentPos
-
1
;
this
.
Content
[
CurPos
].
Cursor_MoveToStartPos
();
this
.
Content
[
CurPos
].
Add
(
ParaItem
);
this
.
Content
[
CurPos
].
Clear_Formatting
();
if
(
ParaItem
.
IsColumnBreak
())
{
this
.
Content
[
this
.
CurPos
.
ContentPos
].
Add
(
ParaItem
);
}
else
{
this
.
Add_NewParagraph
(
undefined
,
true
);
var
CurPos
=
this
.
CurPos
.
ContentPos
-
1
;
this
.
Content
[
CurPos
].
Cursor_MoveToStartPos
();
this
.
Content
[
CurPos
].
Add
(
ParaItem
);
this
.
Content
[
CurPos
].
Clear_Formatting
();
}
}
else
{
this
.
Add_NewParagraph
(
undefined
,
true
);
this
.
Add_NewParagraph
(
undefined
,
true
);
var
CurPos
=
this
.
CurPos
.
ContentPos
-
1
;
this
.
Content
[
CurPos
].
Cursor_MoveToStartPos
();
this
.
Content
[
CurPos
].
Add
(
ParaItem
);
this
.
Content
[
CurPos
].
Clear_Formatting
();
if
(
ParaItem
.
IsColumnBreak
())
{
this
.
Add_NewParagraph
(
undefined
,
true
);
var
CurPos
=
this
.
CurPos
.
ContentPos
;
this
.
Content
[
CurPos
].
Cursor_MoveToStartPos
();
this
.
Content
[
CurPos
].
Add
(
ParaItem
);
}
else
{
this
.
Add_NewParagraph
(
undefined
,
true
);
this
.
Add_NewParagraph
(
undefined
,
true
);
var
CurPos
=
this
.
CurPos
.
ContentPos
-
1
;
this
.
Content
[
CurPos
].
Cursor_MoveToStartPos
();
this
.
Content
[
CurPos
].
Add
(
ParaItem
);
this
.
Content
[
CurPos
].
Clear_Formatting
();
}
}
if
(
false
!=
bRecalculate
)
...
...
word/Editor/ParagraphContent.js
View file @
b89d02d8
...
...
@@ -1109,6 +1109,19 @@ ParaNewLine.prototype =
return
false
;
}
};
ParaNewLine
.
prototype
.
IsPageOrColumnBreak
=
function
()
{
return
(
break_Page
===
this
.
BreakType
||
break_Column
===
this
.
BreakType
);
};
ParaNewLine
.
prototype
.
IsPageBreak
=
function
()
{
return
(
break_Page
===
this
.
BreakType
);
};
ParaNewLine
.
prototype
.
IsColumnBreak
=
function
()
{
return
(
break_Column
===
this
.
BreakType
);
};
// Класс ParaNumbering
function
ParaNumbering
()
...
...
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