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
f6aff605
Commit
f6aff605
authored
Jan 30, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring
parent
7b59afb9
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1074 additions
and
2402 deletions
+1074
-2402
slide/api.js
slide/api.js
+2
-169
slide/apiCommon.js
slide/apiCommon.js
+20
-741
word/api.js
word/api.js
+175
-1481
word/apiCommon.js
word/apiCommon.js
+877
-11
No files found.
slide/api.js
View file @
f6aff605
...
...
@@ -520,85 +520,6 @@
this
.
SymbolsWSCount
=
v
;
};
/*----------------------------------------------------------------*/
/*functions for working with headers*/
/*
структура заголовков, предварительно, выглядит так
{
headerText: "Header1",//заголовок
pageNumber: 0, //содержит номер страницы, где находится искомая последовательность
X: 0,//координаты по OX начала последовательности на данной страницы
Y: 0,//координаты по OY начала последовательности на данной страницы
level: 0//уровень заголовка
}
заголовки приходят либо в списке, либо последовательно.
*/
// CHeader
function
CHeader
(
obj
)
{
if
(
obj
)
{
this
.
headerText
=
(
undefined
!=
obj
.
headerText
)
?
obj
.
headerText
:
null
;
//заголовок
this
.
pageNumber
=
(
undefined
!=
obj
.
pageNumber
)
?
obj
.
pageNumber
:
null
;
//содержит номер страницы, где находится искомая последовательность
this
.
X
=
(
undefined
!=
obj
.
X
)
?
obj
.
X
:
null
;
//координаты по OX начала последовательности на данной страницы
this
.
Y
=
(
undefined
!=
obj
.
Y
)
?
obj
.
Y
:
null
;
//координаты по OY начала последовательности на данной страницы
this
.
level
=
(
undefined
!=
obj
.
level
)
?
obj
.
level
:
null
;
//позиция заголовка
}
else
{
this
.
headerText
=
null
;
//заголовок
this
.
pageNumber
=
null
;
//содержит номер страницы, где находится искомая последовательность
this
.
X
=
null
;
//координаты по OX начала последовательности на данной страницы
this
.
Y
=
null
;
//координаты по OY начала последовательности на данной страницы
this
.
level
=
null
;
//позиция заголовка
}
}
CHeader
.
prototype
.
get_headerText
=
function
()
{
return
this
.
headerText
;
};
CHeader
.
prototype
.
get_pageNumber
=
function
()
{
return
this
.
pageNumber
;
};
CHeader
.
prototype
.
get_X
=
function
()
{
return
this
.
X
;
};
CHeader
.
prototype
.
get_Y
=
function
()
{
return
this
.
Y
;
};
CHeader
.
prototype
.
get_Level
=
function
()
{
return
this
.
level
;
};
var
_fakeHeaders
=
[
new
CHeader
({
headerText
:
"
Header1
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
1
}),
new
CHeader
({
headerText
:
"
Header2
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
1
}),
new
CHeader
({
headerText
:
"
Header3
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
2
}),
new
CHeader
({
headerText
:
"
Header4
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
1
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
1
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
1
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
2
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
3
}),
new
CHeader
({
headerText
:
"
Header3
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
4
}),
new
CHeader
({
headerText
:
"
Header3
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
5
}),
new
CHeader
({
headerText
:
"
Header3
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
6
}),
new
CHeader
({
headerText
:
"
Header4
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
7
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
8
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
1
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
1
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
2
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
3
}),
new
CHeader
({
headerText
:
"
Header6
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
1
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
0
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
1
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
0
}),
new
CHeader
({
headerText
:
"
Header5
"
,
pageNumber
:
0
,
X
:
0
,
Y
:
0
,
level
:
0
})
];
// CSearchResult - returns result of searching
function
CSearchResult
(
obj
)
{
...
...
@@ -624,75 +545,6 @@
this
.
Object
.
text
=
obj
;
};
function
CTablePropLook
(
obj
)
{
this
.
FirstCol
=
false
;
this
.
FirstRow
=
false
;
this
.
LastCol
=
false
;
this
.
LastRow
=
false
;
this
.
BandHor
=
false
;
this
.
BandVer
=
false
;
if
(
obj
)
{
this
.
FirstCol
=
(
undefined
===
obj
.
m_bFirst_Col
?
false
:
obj
.
m_bFirst_Col
);
this
.
FirstRow
=
(
undefined
===
obj
.
m_bFirst_Row
?
false
:
obj
.
m_bFirst_Row
);
this
.
LastCol
=
(
undefined
===
obj
.
m_bLast_Col
?
false
:
obj
.
m_bLast_Col
);
this
.
LastRow
=
(
undefined
===
obj
.
m_bLast_Row
?
false
:
obj
.
m_bLast_Row
);
this
.
BandHor
=
(
undefined
===
obj
.
m_bBand_Hor
?
false
:
obj
.
m_bBand_Hor
);
this
.
BandVer
=
(
undefined
===
obj
.
m_bBand_Ver
?
false
:
obj
.
m_bBand_Ver
);
}
}
CTablePropLook
.
prototype
.
get_FirstCol
=
function
()
{
return
this
.
FirstCol
;
};
CTablePropLook
.
prototype
.
put_FirstCol
=
function
(
v
)
{
this
.
FirstCol
=
v
;
};
CTablePropLook
.
prototype
.
get_FirstRow
=
function
()
{
return
this
.
FirstRow
;
};
CTablePropLook
.
prototype
.
put_FirstRow
=
function
(
v
)
{
this
.
FirstRow
=
v
;
};
CTablePropLook
.
prototype
.
get_LastCol
=
function
()
{
return
this
.
LastCol
;
};
CTablePropLook
.
prototype
.
put_LastCol
=
function
(
v
)
{
this
.
LastCol
=
v
;
};
CTablePropLook
.
prototype
.
get_LastRow
=
function
()
{
return
this
.
LastRow
;
};
CTablePropLook
.
prototype
.
put_LastRow
=
function
(
v
)
{
this
.
LastRow
=
v
;
};
CTablePropLook
.
prototype
.
get_BandHor
=
function
()
{
return
this
.
BandHor
;
};
CTablePropLook
.
prototype
.
put_BandHor
=
function
(
v
)
{
this
.
BandHor
=
v
;
};
CTablePropLook
.
prototype
.
get_BandVer
=
function
()
{
return
this
.
BandVer
;
};
CTablePropLook
.
prototype
.
put_BandVer
=
function
(
v
)
{
this
.
BandVer
=
v
;
};
/**
*
* @param config
...
...
@@ -1589,7 +1441,7 @@ background-repeat: no-repeat;\
var
TextPr
=
Doc
.
Get_Paragraph_TextPr
();
// return { ParaPr: ParaPr, TextPr : TextPr };
return
new
Asc
CommonSlide
.
CParagraphAndTextProp
(
ParaPr
,
TextPr
);
// uncomment if this method will be used externally. 20/03/2012 uncommented for testers
return
new
Asc
.
CParagraphAndTextProp
(
ParaPr
,
TextPr
);
// uncomment if this method will be used externally. 20/03/2012 uncommented for testers
};
// -------
...
...
@@ -2222,7 +2074,7 @@ background-repeat: no-repeat;\
asc_docs_api
.
prototype
.
CollectHeaders
=
function
()
{
this
.
sync_ReturnHeadersCallback
(
_fakeHeaders
);
this
.
sync_ReturnHeadersCallback
(
[]
);
};
asc_docs_api
.
prototype
.
GetActiveHeader
=
function
()
{
...
...
@@ -7053,27 +6905,8 @@ background-repeat: no-repeat;\
CDocInfoProp
.
prototype
[
'
put_SymbolsCount
'
]
=
CDocInfoProp
.
prototype
.
put_SymbolsCount
;
CDocInfoProp
.
prototype
[
'
get_SymbolsWSCount
'
]
=
CDocInfoProp
.
prototype
.
get_SymbolsWSCount
;
CDocInfoProp
.
prototype
[
'
put_SymbolsWSCount
'
]
=
CDocInfoProp
.
prototype
.
put_SymbolsWSCount
;
CHeader
.
prototype
[
'
get_headerText
'
]
=
CHeader
.
prototype
.
get_headerText
;
CHeader
.
prototype
[
'
get_pageNumber
'
]
=
CHeader
.
prototype
.
get_pageNumber
;
CHeader
.
prototype
[
'
get_X
'
]
=
CHeader
.
prototype
.
get_X
;
CHeader
.
prototype
[
'
get_Y
'
]
=
CHeader
.
prototype
.
get_Y
;
CHeader
.
prototype
[
'
get_Level
'
]
=
CHeader
.
prototype
.
get_Level
;
CSearchResult
.
prototype
[
'
get_Text
'
]
=
CSearchResult
.
prototype
.
get_Text
;
CSearchResult
.
prototype
[
'
get_Navigator
'
]
=
CSearchResult
.
prototype
.
get_Navigator
;
CSearchResult
.
prototype
[
'
put_Navigator
'
]
=
CSearchResult
.
prototype
.
put_Navigator
;
CSearchResult
.
prototype
[
'
put_Text
'
]
=
CSearchResult
.
prototype
.
put_Text
;
window
[
'
Asc
'
][
'
CTablePropLook
'
]
=
window
[
'
Asc
'
].
CTablePropLook
=
CTablePropLook
;
CTablePropLook
.
prototype
[
'
get_FirstCol
'
]
=
CTablePropLook
.
prototype
.
get_FirstCol
;
CTablePropLook
.
prototype
[
'
put_FirstCol
'
]
=
CTablePropLook
.
prototype
.
put_FirstCol
;
CTablePropLook
.
prototype
[
'
get_FirstRow
'
]
=
CTablePropLook
.
prototype
.
get_FirstRow
;
CTablePropLook
.
prototype
[
'
put_FirstRow
'
]
=
CTablePropLook
.
prototype
.
put_FirstRow
;
CTablePropLook
.
prototype
[
'
get_LastCol
'
]
=
CTablePropLook
.
prototype
.
get_LastCol
;
CTablePropLook
.
prototype
[
'
put_LastCol
'
]
=
CTablePropLook
.
prototype
.
put_LastCol
;
CTablePropLook
.
prototype
[
'
get_LastRow
'
]
=
CTablePropLook
.
prototype
.
get_LastRow
;
CTablePropLook
.
prototype
[
'
put_LastRow
'
]
=
CTablePropLook
.
prototype
.
put_LastRow
;
CTablePropLook
.
prototype
[
'
get_BandHor
'
]
=
CTablePropLook
.
prototype
.
get_BandHor
;
CTablePropLook
.
prototype
[
'
put_BandHor
'
]
=
CTablePropLook
.
prototype
.
put_BandHor
;
CTablePropLook
.
prototype
[
'
get_BandVer
'
]
=
CTablePropLook
.
prototype
.
get_BandVer
;
CTablePropLook
.
prototype
[
'
put_BandVer
'
]
=
CTablePropLook
.
prototype
.
put_BandVer
;
})(
window
,
window
.
document
);
slide/apiCommon.js
View file @
f6aff605
This diff is collapsed.
Click to expand it.
word/api.js
View file @
f6aff605
This diff is collapsed.
Click to expand it.
word/apiCommon.js
View file @
f6aff605
This diff is collapsed.
Click to expand it.
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