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
2be97d0f
Commit
2be97d0f
authored
Apr 17, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove function was moved to Base class and was adapted for the new class CBlockLevelSdt.
parent
85dc3772
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
394 additions
and
792 deletions
+394
-792
word/Editor/Document.js
word/Editor/Document.js
+2
-410
word/Editor/DocumentContent.js
word/Editor/DocumentContent.js
+1
-379
word/Editor/DocumentContentBase.js
word/Editor/DocumentContentBase.js
+375
-0
word/Editor/StructuredDocumentTags/BlockLevel.js
word/Editor/StructuredDocumentTags/BlockLevel.js
+16
-3
No files found.
word/Editor/Document.js
View file @
2be97d0f
This diff is collapsed.
Click to expand it.
word/Editor/DocumentContent.js
View file @
2be97d0f
This diff is collapsed.
Click to expand it.
word/Editor/DocumentContentBase.js
View file @
2be97d0f
This diff is collapsed.
Click to expand it.
word/Editor/StructuredDocumentTags/BlockLevel.js
View file @
2be97d0f
...
...
@@ -50,7 +50,7 @@ function CBlockLevelSdt(oLogicDocument, oParent)
CDocumentContentElementBase
.
call
(
this
,
oParent
);
this
.
LogicDocument
=
oLogicDocument
;
this
.
Content
=
new
CDocumentContent
(
this
,
oLogicDocument
.
Get_DrawingDocument
()
,
0
,
0
,
0
,
0
,
true
,
false
,
false
);
this
.
Content
=
new
CDocumentContent
(
this
,
oLogicDocument
?
oLogicDocument
.
Get_DrawingDocument
()
:
null
,
0
,
0
,
0
,
0
,
true
,
false
,
false
);
// Добавляем данный класс в таблицу Id (обязательно в конце конструктора)
g_oTableId
.
Add
(
this
,
this
.
Id
);
...
...
@@ -112,16 +112,26 @@ CBlockLevelSdt.prototype.Write_ToBinary2 = function(Writer)
{
Writer
.
WriteLong
(
AscDFH
.
historyitem_type_BlockLevelSdt
);
// String : Content id
Writer
.
WriteString
(
this
.
Content
.
GetId
());
Writer
.
WriteString
2
(
this
.
Content
.
GetId
());
};
CBlockLevelSdt
.
prototype
.
Read_FromBinary2
=
function
(
Reader
)
{
this
.
LogicDocument
=
editor
.
WordControl
.
m_oLogicDocument
;
// String : Content id
this
.
Content
=
this
.
LogicDocument
.
Get_TableId
().
Get_ById
(
Reader
.
GetString2
());
};
CBlockLevelSdt
.
prototype
.
Draw
=
function
(
CurPage
,
oGraphics
)
{
this
.
Content
.
Draw
(
CurPage
,
oGraphics
);
var
oPageBounds
=
this
.
GetPageBounds
(
CurPage
);
oGraphics
.
p_color
(
0
,
0
,
255
,
255
);
oGraphics
.
drawVerLine
(
0
,
oPageBounds
.
Left
,
oPageBounds
.
Top
,
oPageBounds
.
Bottom
,
0
);
oGraphics
.
drawVerLine
(
0
,
oPageBounds
.
Right
,
oPageBounds
.
Top
,
oPageBounds
.
Bottom
,
0
);
oGraphics
.
drawHorLine
(
0
,
oPageBounds
.
Top
,
oPageBounds
.
Left
,
oPageBounds
.
Right
,
0
);
oGraphics
.
drawHorLine
(
0
,
oPageBounds
.
Bottom
,
oPageBounds
.
Left
,
oPageBounds
.
Right
,
0
);
};
CBlockLevelSdt
.
prototype
.
Get_CurrentPage_Absolute
=
function
()
{
...
...
@@ -329,7 +339,7 @@ CBlockLevelSdt.prototype.AddInlineTable = function(nCols, nRows)
};
CBlockLevelSdt
.
prototype
.
Remove
=
function
(
nCount
,
bOnlyText
,
bRemoveOnlySelection
,
bOnAddText
)
{
return
this
.
Content
.
Remove
(
nCount
,
bOnlyText
,
bRemoveOnlySelection
,
bOn
ly
Text
);
return
this
.
Content
.
Remove
(
nCount
,
bOnlyText
,
bRemoveOnlySelection
,
bOn
Add
Text
);
};
CBlockLevelSdt
.
prototype
.
Is_Empty
=
function
()
{
...
...
@@ -455,6 +465,9 @@ window['AscCommonWord'].type_BlockLevelSdt = type_BlockLevelSdt;
function
TEST_ADD_SDT
()
{
var
oLogicDocument
=
editor
.
WordControl
.
m_oLogicDocument
;
oLogicDocument
.
Create_NewHistoryPoint
();
var
oSdt
=
new
CBlockLevelSdt
(
oLogicDocument
,
oLogicDocument
);
oSdt
.
Content
.
Paragraph_Add
(
new
ParaText
(
"
S
"
));
oSdt
.
Content
.
Paragraph_Add
(
new
ParaText
(
"
d
"
));
...
...
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