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
81670178
Commit
81670178
authored
Nov 02, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added default values for all levels of the TOC styles.
parent
967d4ee7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
22 deletions
+28
-22
word/Editor/Styles.js
word/Editor/Styles.js
+28
-22
No files found.
word/Editor/Styles.js
View file @
81670178
...
@@ -3167,30 +3167,37 @@ CStyle.prototype.CreateFootnoteReference = function()
...
@@ -3167,30 +3167,37 @@ CStyle.prototype.CreateFootnoteReference = function()
this
.
Set_UnhideWhenUsed
(
true
);
this
.
Set_UnhideWhenUsed
(
true
);
this
.
Set_TextPr
(
oTextPr
);
this
.
Set_TextPr
(
oTextPr
);
};
};
CStyle
.
prototype
.
CreateTOC
1
=
function
(
)
CStyle
.
prototype
.
CreateTOC
=
function
(
nLvl
)
{
{
var
ParaPr
=
{
var
ParaPr
=
{
Spacing
:
{
Spacing
:
{
After
:
5
*
g_dKoef_pt_to_mm
After
:
57
/
20
*
g_dKoef_pt_to_mm
}
};
this
.
Set_UiPriority
(
39
);
this
.
Set_UnhideWhenUsed
(
true
);
this
.
Set_ParaPr
(
ParaPr
);
};
CStyle
.
prototype
.
CreateTOC2
=
function
()
{
var
ParaPr
=
{
Spacing
:
{
After
:
5
*
g_dKoef_pt_to_mm
},
},
Ind
:
{
Ind
:
{
Left
:
11
*
g_dKoef_pt_to_mm
Left
:
0
,
Right
:
0
,
FirstLine
:
0
}
}
};
};
if
(
1
===
nLvl
)
ParaPr
.
Ind
.
Left
=
283
/
20
*
g_dKoef_pt_to_mm
;
else
if
(
2
===
nLvl
)
ParaPr
.
Ind
.
Left
=
567
/
20
*
g_dKoef_pt_to_mm
;
else
if
(
3
===
nLvl
)
ParaPr
.
Ind
.
Left
=
850
/
20
*
g_dKoef_pt_to_mm
;
else
if
(
4
===
nLvl
)
ParaPr
.
Ind
.
Left
=
1134
/
20
*
g_dKoef_pt_to_mm
;
else
if
(
5
===
nLvl
)
ParaPr
.
Ind
.
Left
=
1417
/
20
*
g_dKoef_pt_to_mm
;
else
if
(
6
===
nLvl
)
ParaPr
.
Ind
.
Left
=
1701
/
20
*
g_dKoef_pt_to_mm
;
else
if
(
7
===
nLvl
)
ParaPr
.
Ind
.
Left
=
1984
/
20
*
g_dKoef_pt_to_mm
;
else
if
(
8
===
nLvl
)
ParaPr
.
Ind
.
Left
=
2268
/
20
*
g_dKoef_pt_to_mm
;
this
.
Set_UiPriority
(
39
);
this
.
Set_UiPriority
(
39
);
this
.
Set_UnhideWhenUsed
(
true
);
this
.
Set_UnhideWhenUsed
(
true
);
this
.
Set_ParaPr
(
ParaPr
);
this
.
Set_ParaPr
(
ParaPr
);
...
@@ -3470,13 +3477,12 @@ function CStyles(bCreateDefault)
...
@@ -3470,13 +3477,12 @@ function CStyles(bCreateDefault)
StyleFootnoteReference
.
CreateFootnoteReference
();
StyleFootnoteReference
.
CreateFootnoteReference
();
this
.
Default
.
FootnoteReference
=
this
.
Add
(
StyleFootnoteReference
);
this
.
Default
.
FootnoteReference
=
this
.
Add
(
StyleFootnoteReference
);
var
TOC1
=
new
CStyle
(
"
toc 1
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
for
(
var
nLvl
=
0
;
nLvl
<=
8
;
++
nLvl
)
TOC1
.
CreateTOC1
();
{
this
.
Default
.
TOC
[
0
]
=
this
.
Add
(
TOC1
);
var
oStyleTOC
=
new
CStyle
(
"
toc
"
+
(
nLvl
+
1
),
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
oStyleTOC
.
CreateTOC
(
nLvl
);
var
TOC2
=
new
CStyle
(
"
toc 2
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
this
.
Default
.
TOC
[
nLvl
]
=
this
.
Add
(
oStyleTOC
);
TOC2
.
CreateTOC2
();
}
this
.
Default
.
TOC
[
1
]
=
this
.
Add
(
TOC2
);
// Добавляем данный класс в таблицу Id (обязательно в конце конструктора)
// Добавляем данный класс в таблицу Id (обязательно в конце конструктора)
g_oTableId
.
Add
(
this
,
this
.
Id
);
g_oTableId
.
Add
(
this
,
this
.
Id
);
...
...
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