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
126f9817
Commit
126f9817
authored
Mar 22, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #34420
parent
3b094a29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
15 deletions
+72
-15
word/Editor/Comments.js
word/Editor/Comments.js
+55
-15
word/Editor/Paragraph.js
word/Editor/Paragraph.js
+17
-0
No files found.
word/Editor/Comments.js
View file @
126f9817
...
@@ -411,29 +411,52 @@ function CComment(Parent, Data)
...
@@ -411,29 +411,52 @@ function CComment(Parent, Data)
this
.
m_oTypeInfo
.
Data
=
g_oTableId
.
Get_ById
(
Reader
.
GetString2
()
);
this
.
m_oTypeInfo
.
Data
=
g_oTableId
.
Get_ById
(
Reader
.
GetString2
()
);
};
};
this
.
Check_MergeData
=
function
()
this
.
Check_MergeData
=
function
(
arrAllParagraphs
)
{
{
// Проверяем, не удалили ли мы параграф, к которому был сделан данный комментарий
// Проверяем, не удалили ли мы параграф, к которому был сделан данный комментарий
// Делаем это в самом конце, а не сразу, чтобы заполнились данные о начальном и
// Делаем это в самом конце, а не сразу, чтобы заполнились данные о начальном и
// конечном параграфах.
// конечном параграфах.
var
bUse
=
true
;
this
.
Set_StartId
(
null
);
this
.
Set_EndId
(
null
);
if
(
null
!=
this
.
StartId
)
var
bStartSet
=
false
,
bEndSet
=
false
;
{
for
(
var
nIndex
=
0
,
nCount
=
arrAllParagraphs
.
length
;
nIndex
<
nCount
;
++
nIndex
)
var
ObjStart
=
g_oTableId
.
Get_ById
(
this
.
StartId
);
{
var
oPara
=
arrAllParagraphs
[
nIndex
];
var
oResult
=
oPara
.
CheckCommentStartEnd
(
this
.
Id
);
if
(
true
===
oResult
.
Start
)
{
this
.
Set_StartId
(
oPara
.
Get_Id
());
bStartSet
=
true
;
}
if
(
true
!=
ObjStart
.
Is_UseInDocument
()
)
if
(
true
===
oResult
.
End
)
bUse
=
false
;
{
}
this
.
Set_EndId
(
oPara
.
Get_Id
());
bEndSet
=
true
;
}
if
(
true
===
bUse
&&
null
!=
this
.
EndId
)
if
(
bStartSet
&&
bEndSet
)
{
break
;
var
ObjEnd
=
g_oTableId
.
Get_ById
(
this
.
EndId
);
}
if
(
true
!=
ObjEnd
.
Is_UseInDocument
()
)
var
bUse
=
true
;
bUse
=
false
;
if
(
null
!=
this
.
StartId
)
}
{
var
ObjStart
=
g_oTableId
.
Get_ById
(
this
.
StartId
);
if
(
true
!=
ObjStart
.
Is_UseInDocument
())
bUse
=
false
;
}
if
(
true
===
bUse
&&
null
!=
this
.
EndId
)
{
var
ObjEnd
=
g_oTableId
.
Get_ById
(
this
.
EndId
);
if
(
true
!=
ObjEnd
.
Is_UseInDocument
())
bUse
=
false
;
}
if
(
false
===
bUse
)
if
(
false
===
bUse
)
editor
.
WordControl
.
m_oLogicDocument
.
Remove_Comment
(
this
.
Id
,
true
,
false
);
editor
.
WordControl
.
m_oLogicDocument
.
Remove_Comment
(
this
.
Id
,
true
,
false
);
...
@@ -580,9 +603,14 @@ function CComments()
...
@@ -580,9 +603,14 @@ function CComments()
this
.
Check_MergeData
=
function
()
this
.
Check_MergeData
=
function
()
{
{
var
arrAllParagraphs
=
null
;
for
(
var
Id
in
this
.
m_aComments
)
for
(
var
Id
in
this
.
m_aComments
)
{
{
this
.
m_aComments
[
Id
].
Check_MergeData
();
if
(
!
arrAllParagraphs
&&
editor
&&
editor
.
WordControl
.
m_oLogicDocument
)
arrAllParagraphs
=
editor
.
WordControl
.
m_oLogicDocument
.
Get_AllParagraphs
({
All
:
true
});
this
.
m_aComments
[
Id
].
Check_MergeData
(
arrAllParagraphs
);
}
}
};
};
...
@@ -1132,6 +1160,18 @@ ParaComment.prototype.CanSplit = function()
...
@@ -1132,6 +1160,18 @@ ParaComment.prototype.CanSplit = function()
{
{
return
false
;
return
false
;
};
};
ParaComment
.
prototype
.
SetCommentId
=
function
(
sCommentId
)
{
this
.
Set_CommentId
(
sCommentId
);
};
ParaComment
.
prototype
.
GetCommentId
=
function
()
{
return
this
.
CommentId
;
};
ParaComment
.
prototype
.
IsCommentStart
=
function
()
{
return
this
.
Start
;
};
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// Разное
// Разное
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
...
...
word/Editor/Paragraph.js
View file @
126f9817
...
@@ -12309,6 +12309,23 @@ Paragraph.prototype.GetLineEndPos = function(CurLine)
...
@@ -12309,6 +12309,23 @@ Paragraph.prototype.GetLineEndPos = function(CurLine)
return
this
.
Get_EndRangePos2
(
CurLine
,
oLine
.
Ranges
.
length
-
1
);
return
this
.
Get_EndRangePos2
(
CurLine
,
oLine
.
Ranges
.
length
-
1
);
};
};
Paragraph
.
prototype
.
CheckCommentStartEnd
=
function
(
sCommentId
)
{
var
oResult
=
{
Start
:
false
,
End
:
false
};
for
(
var
nIndex
=
0
,
nCount
=
this
.
Content
.
length
;
nIndex
<
nCount
;
++
nIndex
)
{
var
oElement
=
this
.
Content
[
nIndex
];
if
(
para_Comment
===
oElement
.
Type
&&
sCommentId
===
oElement
.
GetCommentId
())
{
if
(
oElement
.
IsCommentStart
())
oResult
.
Start
=
true
;
else
oResult
.
End
=
true
;
}
}
return
oResult
;
};
var
pararecalc_0_All
=
0
;
var
pararecalc_0_All
=
0
;
var
pararecalc_0_None
=
1
;
var
pararecalc_0_None
=
1
;
...
...
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