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
ef8f0d99
Commit
ef8f0d99
authored
Aug 08, 2016
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
creating numbering; fix typo
parent
f2d95710
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
48 deletions
+32
-48
slide/apiBuilder.js
slide/apiBuilder.js
+32
-48
No files found.
slide/apiBuilder.js
View file @
ef8f0d99
...
@@ -289,7 +289,7 @@
...
@@ -289,7 +289,7 @@
/**
/**
* This type specifies the bullet type
* This type specifies the bullet type
* @typedef {("ArabicPeriod" | "ArabicParenR" | "RomanUcPeriod" | "RomanLcPeriod" | "AlphaLcParenR" | "AlphaLcPeriod" | "AlphaUcParenR" | "AlphaUcPeriod")} BulletType
* @typedef {("
None" | "
ArabicPeriod" | "ArabicParenR" | "RomanUcPeriod" | "RomanLcPeriod" | "AlphaLcParenR" | "AlphaLcPeriod" | "AlphaUcParenR" | "AlphaUcPeriod")} BulletType
*/
*/
...
@@ -506,7 +506,7 @@
...
@@ -506,7 +506,7 @@
* */
* */
Api
.
prototype
.
CreateBlipFill
=
function
(
sImageUrl
,
sBlipFillType
)
Api
.
prototype
.
CreateBlipFill
=
function
(
sImageUrl
,
sBlipFillType
)
{
{
return
new
ApiFill
(
AscFormat
.
builder_CreateBlipFill
());
return
new
ApiFill
(
AscFormat
.
builder_CreateBlipFill
(
sImageUrl
,
sBlipFillType
));
};
};
/**
/**
...
@@ -583,14 +583,15 @@
...
@@ -583,14 +583,15 @@
/**
/**
* Create a new numbering
* Create a new numbering
* @memberof Api
* @memberof Api
* @param {BulletType} sType
* @param {number} nStartAt
* @returns {ApiBullet}
* @returns {ApiBullet}
* */
* */
Api
.
CreateNumbering
=
function
(
sType
,
nStartAt
){
Api
.
CreateNumbering
=
function
(
sType
,
nStartAt
){
var
oBullet
=
new
AscFormat
.
CBullet
();
var
oBullet
=
new
AscFormat
.
CBullet
();
oBullet
.
bulletType
=
new
AscFormat
.
CBulletType
();
oBullet
.
bulletType
=
new
AscFormat
.
CBulletType
();
oBullet
.
bulletType
.
type
=
AscFormat
.
BULLET_TYPE_BULLET_AUTONUM
;
switch
(
sType
){
switch
(
sType
){
case
"
ArabicPeriod
"
:{
case
"
ArabicPeriod
"
:{
oBullet
.
bulletType
.
AutoNumType
=
12
;
oBullet
.
bulletType
.
AutoNumType
=
12
;
...
@@ -605,64 +606,35 @@
...
@@ -605,64 +606,35 @@
break
;
break
;
}
}
case
"
RomanLcPeriod
"
:{
case
"
RomanLcPeriod
"
:{
oBullet
.
bulletType
.
AutoNumType
=
12
;
oBullet
.
bulletType
.
AutoNumType
=
31
;
break
;
break
;
}
}
case
"
AlphaLcParenR
"
:{
case
"
AlphaLcParenR
"
:{
oBullet
.
bulletType
.
AutoNumType
=
1
2
;
oBullet
.
bulletType
.
AutoNumType
=
1
;
break
;
break
;
}
}
case
"
AlphaLcPeriod
"
:{
case
"
AlphaLcPeriod
"
:{
oBullet
.
bulletType
.
AutoNumType
=
1
2
;
oBullet
.
bulletType
.
AutoNumType
=
2
;
break
;
break
;
}
}
case
"
AlphaUcParenR
"
:{
case
"
AlphaUcParenR
"
:{
oBullet
.
bulletType
.
AutoNumType
=
12
;
oBullet
.
bulletType
.
AutoNumType
=
4
;
break
;
break
;
}
}
case
"
AlphaUcPeriod
"
:{
case
"
AlphaUcPeriod
"
:{
oBullet
.
bulletType
.
AutoNumType
=
12
;
oBullet
.
bulletType
.
AutoNumType
=
5
;
break
;
break
;
}
}
case
"
None
"
:{
oBullet
.
bulletType
.
type
=
AscFormat
.
BULLET_TYPE_BULLET_NONE
;
}
}
switch
(
sType
){
case
"
bulletTypeArabicPeriod
"
:{
var
numberingType
=
12
;
//numbering_numfmt_arabicPeriod;
break
;
}
case
"
bulletTypeArabicParenR
"
:
{
numberingType
=
11
;
//numbering_numfmt_arabicParenR;
break
;
}
case
"
bulletTyperomanUcPeriod
"
:
{
numberingType
=
34
;
//numbering_numfmt_romanUcPeriod;
break
;
}
case
"
bulletTypeArabicPeriod
"
:
{
numberingType
=
5
;
//numbering_numfmt_alphaUcPeriod;
break
;
}
case
"
bulletTypeArabicPeriod
"
:
{
numberingType
=
8
;
break
;
}
}
case
"
bulletTypeArabicPeriod
"
:
if
(
oBullet
.
bulletType
.
type
===
AscFormat
.
BULLET_TYPE_BULLET_AUTONUM
){
{
if
(
AscFormat
.
isRealNumber
(
nStartAt
)){
numberingType
=
40
;
oBullet
.
bulletType
.
startAt
=
nStartAt
;
break
;
}
case
"
bulletTypeArabicPeriod
"
:
{
numberingType
=
31
;
//numbering_numfmt_romanLcPeriod;
break
;
}
}
}
}
return
new
ApiBullet
(
oBullet
);
};
};
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
...
@@ -1326,6 +1298,17 @@
...
@@ -1326,6 +1298,17 @@
this
.
private_OnChange
();
this
.
private_OnChange
();
};
};
/*
* Set paragraph's bullet
* @param {ApiBullet} oBullet
* */
ApiParaPr
.
prototype
.
SetBullet
=
function
(
oBullet
){
if
(
oBullet
){
this
.
ParaPr
.
Bullet
=
oBullet
.
Bullet
;
this
.
private_OnChange
();
}
};
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
//
//
// ApiDrawing
// ApiDrawing
...
@@ -1358,8 +1341,8 @@
...
@@ -1358,8 +1341,8 @@
/**
/**
* Set the size of the bounding box.
* Set the size of the bounding box.
* @param {EMU} n
Width
* @param {EMU} n
PosX
* @param {EMU} n
Height
* @param {EMU} n
PosY
*/
*/
ApiDrawing
.
prototype
.
SetPosition
=
function
(
nPosX
,
nPosY
)
ApiDrawing
.
prototype
.
SetPosition
=
function
(
nPosX
,
nPosY
)
{
{
...
@@ -1467,7 +1450,7 @@
...
@@ -1467,7 +1450,7 @@
*/
*/
ApiChart
.
prototype
.
SetTitle
=
function
(
sTitle
,
nFontSize
)
ApiChart
.
prototype
.
SetTitle
=
function
(
sTitle
,
nFontSize
)
{
{
AscFormat
.
builder_SetChartTitle
(
this
.
Chart
);
AscFormat
.
builder_SetChartTitle
(
this
.
Chart
,
sTitle
,
nFontSize
);
};
};
/**
/**
...
@@ -1690,6 +1673,7 @@
...
@@ -1690,6 +1673,7 @@
ApiParaPr
.
prototype
[
"
SetSpacingLine
"
]
=
ApiParaPr
.
prototype
.
SetSpacingLine
;
ApiParaPr
.
prototype
[
"
SetSpacingLine
"
]
=
ApiParaPr
.
prototype
.
SetSpacingLine
;
ApiParaPr
.
prototype
[
"
SetSpacingBefore
"
]
=
ApiParaPr
.
prototype
.
SetSpacingBefore
;
ApiParaPr
.
prototype
[
"
SetSpacingBefore
"
]
=
ApiParaPr
.
prototype
.
SetSpacingBefore
;
ApiParaPr
.
prototype
[
"
SetSpacingAfter
"
]
=
ApiParaPr
.
prototype
.
SetSpacingAfter
;
ApiParaPr
.
prototype
[
"
SetSpacingAfter
"
]
=
ApiParaPr
.
prototype
.
SetSpacingAfter
;
ApiParaPr
.
prototype
[
"
SetBullet
"
]
=
ApiParaPr
.
prototype
.
SetBullet
;
ApiDrawing
.
prototype
[
"
GetClassType
"
]
=
ApiDrawing
.
prototype
.
GetClassType
;
ApiDrawing
.
prototype
[
"
GetClassType
"
]
=
ApiDrawing
.
prototype
.
GetClassType
;
ApiDrawing
.
prototype
[
"
SetSize
"
]
=
ApiDrawing
.
prototype
.
SetSize
;
ApiDrawing
.
prototype
[
"
SetSize
"
]
=
ApiDrawing
.
prototype
.
SetSize
;
...
...
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