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
d2ac9c18
Commit
d2ac9c18
authored
Jan 18, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #33596
parent
bb88b1a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
17 deletions
+30
-17
word/Editor/Paragraph.js
word/Editor/Paragraph.js
+25
-13
word/Editor/Run.js
word/Editor/Run.js
+5
-4
No files found.
word/Editor/Paragraph.js
View file @
d2ac9c18
...
...
@@ -6937,7 +6937,7 @@ Paragraph.prototype =
}
var
Para
=
null
;
if
(
true
===
this
.
Selection_IsFromStart
()
&&
true
===
this
.
Selection_CheckParaEnd
()
)
if
(
true
===
this
.
Selection_IsFromStart
(
true
)
&&
true
===
this
.
Selection_CheckParaEnd
()
)
{
Para
=
this
.
Copy
(
this
.
Parent
);
DocContent
.
Add
(
new
CSelectedElement
(
Para
,
true
)
);
...
...
@@ -8340,24 +8340,26 @@ Paragraph.prototype =
},
// Проверяем находится ли курсор в начале параграфа
Cursor_IsStart
:
function
(
_ContentPos
)
Cursor_IsStart
:
function
(
_ContentPos
,
bCheckAnchors
)
{
// Просто попробуем переместится вправо от текущего положения, если мы не можем, значит
// мы стоим в конце параграфа.
// Просто попробуем переместится вправо от текущего положения, если мы не можем, значит
// мы стоим в конце параграфа.
var
ContentPos
=
(
undefined
===
_ContentPos
?
this
.
Get_ParaContentPos
(
false
,
false
)
:
_ContentPos
);
var
SearchPos
=
new
CParagraphSearchPos
();
var
ContentPos
=
(
undefined
===
_ContentPos
?
this
.
Get_ParaContentPos
(
false
,
false
)
:
_ContentPos
);
var
SearchPos
=
new
CParagraphSearchPos
();
if
(
true
===
bCheckAnchors
)
SearchPos
.
SetCheckAnchors
();
this
.
Get_LeftPos
(
SearchPos
,
ContentPos
);
this
.
Get_LeftPos
(
SearchPos
,
ContentPos
);
if
(
true
===
SearchPos
.
Found
)
return
false
;
else
return
true
;
if
(
true
===
SearchPos
.
Found
)
return
false
;
else
return
true
;
},
// Проверим, начинается ли выделение с начала параграфа
Selection_IsFromStart
:
function
()
Selection_IsFromStart
:
function
(
bCheckAnchors
)
{
if
(
true
===
this
.
Is_SelectionUse
()
)
{
...
...
@@ -8367,7 +8369,7 @@ Paragraph.prototype =
if
(
StartPos
.
Compare
(
EndPos
)
>
0
)
StartPos
=
EndPos
;
if
(
true
!=
this
.
Cursor_IsStart
(
StartPos
)
)
if
(
true
!=
this
.
Cursor_IsStart
(
StartPos
,
bCheckAnchors
)
)
return
false
;
return
true
;
...
...
@@ -12966,7 +12968,17 @@ function CParagraphSearchPos()
this
.
UpdatePos
=
false
;
this
.
ForSelection
=
false
;
this
.
CheckAnchors
=
false
;
}
CParagraphSearchPos
.
prototype
.
SetCheckAnchors
=
function
(
bCheck
)
{
this
.
CheckAnchors
=
bCheck
;
};
CParagraphSearchPos
.
prototype
.
IsCheckAnchors
=
function
()
{
return
this
.
CheckAnchors
;
};
function
CParagraphSearchPosXY
()
{
...
...
word/Editor/Run.js
View file @
d2ac9c18
...
...
@@ -2884,8 +2884,9 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
Item
.
CheckRecalcAutoFit
(
oSectionPr
);
if
(
true
===
Item
.
Is_Inline
()
||
true
===
Para
.
Parent
.
Is_DrawingShape
())
{
if
(
true
!==
Item
.
Is_Inline
())
Item
.
Set_DrawingType
(
drawing_Inline
);
// TODO: Нельзя что-то писать в историю во время пересчета, это действие надо делать при открытии
// if (true !== Item.Is_Inline())
// Item.Set_DrawingType(drawing_Inline);
if
(
true
===
StartWord
)
FirstItemOnLine
=
false
;
...
...
@@ -5355,7 +5356,7 @@ ParaRun.prototype.Get_LeftPos = function(SearchPos, ContentPos, Depth, UseConten
CurPos
--
;
var
Item
=
this
.
Content
[
CurPos
];
if
(
CurPos
<
0
||
(
!
(
para_Drawing
===
Item
.
Type
&&
false
===
Item
.
Is_Inline
())
&&
!
(
para_FootnoteReference
===
Item
.
Type
&&
true
===
Item
.
IsCustomMarkFollows
())))
if
(
CurPos
<
0
||
(
!
(
para_Drawing
===
Item
.
Type
&&
false
===
Item
.
Is_Inline
()
&&
false
===
SearchPos
.
IsCheckAnchors
()
)
&&
!
(
para_FootnoteReference
===
Item
.
Type
&&
true
===
Item
.
IsCustomMarkFollows
())))
break
;
}
...
...
@@ -5385,7 +5386,7 @@ ParaRun.prototype.Get_RightPos = function(SearchPos, ContentPos, Depth, UseConte
var
PrevItem
=
this
.
Content
[
CurPos
-
1
];
var
PrevItemType
=
PrevItem
.
Type
;
if
((
true
!==
StepEnd
&&
para_End
===
PrevItemType
)
||
(
para_Drawing
===
PrevItemType
&&
false
===
PrevItem
.
Is_Inline
())
||
(
para_FootnoteReference
===
PrevItemType
&&
true
===
PrevItem
.
IsCustomMarkFollows
()))
if
((
true
!==
StepEnd
&&
para_End
===
PrevItemType
)
||
(
para_Drawing
===
PrevItemType
&&
false
===
PrevItem
.
Is_Inline
()
&&
false
===
SearchPos
.
IsCheckAnchors
()
)
||
(
para_FootnoteReference
===
PrevItemType
&&
true
===
PrevItem
.
IsCustomMarkFollows
()))
return
;
break
;
...
...
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