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
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
...
...
@@ -33,7 +33,6 @@
"
use strict
"
;
// ---------------------------------------------------------------
function
CAscSlideTiming
()
{
this
.
TransitionType
=
undefined
;
...
...
@@ -46,21 +45,21 @@ function CAscSlideTiming()
this
.
ShowLoop
=
undefined
;
}
CAscSlideTiming
.
prototype
.
put_TransitionType
=
function
(
v
)
{
this
.
TransitionType
=
v
;
}
CAscSlideTiming
.
prototype
.
get_TransitionType
=
function
()
{
return
this
.
TransitionType
;
}
CAscSlideTiming
.
prototype
.
put_TransitionOption
=
function
(
v
)
{
this
.
TransitionOption
=
v
;
}
CAscSlideTiming
.
prototype
.
get_TransitionOption
=
function
()
{
return
this
.
TransitionOption
;
}
CAscSlideTiming
.
prototype
.
put_TransitionDuration
=
function
(
v
)
{
this
.
TransitionDuration
=
v
;
}
CAscSlideTiming
.
prototype
.
get_TransitionDuration
=
function
()
{
return
this
.
TransitionDuration
;
}
CAscSlideTiming
.
prototype
.
put_SlideAdvanceOnMouseClick
=
function
(
v
)
{
this
.
SlideAdvanceOnMouseClick
=
v
;
}
CAscSlideTiming
.
prototype
.
get_SlideAdvanceOnMouseClick
=
function
()
{
return
this
.
SlideAdvanceOnMouseClick
;
}
CAscSlideTiming
.
prototype
.
put_SlideAdvanceAfter
=
function
(
v
)
{
this
.
SlideAdvanceAfter
=
v
;
}
CAscSlideTiming
.
prototype
.
get_SlideAdvanceAfter
=
function
()
{
return
this
.
SlideAdvanceAfter
;
}
CAscSlideTiming
.
prototype
.
put_SlideAdvanceDuration
=
function
(
v
)
{
this
.
SlideAdvanceDuration
=
v
;
}
CAscSlideTiming
.
prototype
.
get_SlideAdvanceDuration
=
function
()
{
return
this
.
SlideAdvanceDuration
;
}
CAscSlideTiming
.
prototype
.
put_ShowLoop
=
function
(
v
)
{
this
.
ShowLoop
=
v
;
};
CAscSlideTiming
.
prototype
.
get_ShowLoop
=
function
()
{
return
this
.
ShowLoop
;
};
CAscSlideTiming
.
prototype
.
put_TransitionType
=
function
(
v
)
{
this
.
TransitionType
=
v
;
}
;
CAscSlideTiming
.
prototype
.
get_TransitionType
=
function
()
{
return
this
.
TransitionType
;
}
;
CAscSlideTiming
.
prototype
.
put_TransitionOption
=
function
(
v
)
{
this
.
TransitionOption
=
v
;
}
;
CAscSlideTiming
.
prototype
.
get_TransitionOption
=
function
()
{
return
this
.
TransitionOption
;
}
;
CAscSlideTiming
.
prototype
.
put_TransitionDuration
=
function
(
v
)
{
this
.
TransitionDuration
=
v
;
}
;
CAscSlideTiming
.
prototype
.
get_TransitionDuration
=
function
()
{
return
this
.
TransitionDuration
;
}
;
CAscSlideTiming
.
prototype
.
put_SlideAdvanceOnMouseClick
=
function
(
v
)
{
this
.
SlideAdvanceOnMouseClick
=
v
;
}
;
CAscSlideTiming
.
prototype
.
get_SlideAdvanceOnMouseClick
=
function
()
{
return
this
.
SlideAdvanceOnMouseClick
;
}
;
CAscSlideTiming
.
prototype
.
put_SlideAdvanceAfter
=
function
(
v
)
{
this
.
SlideAdvanceAfter
=
v
;
}
;
CAscSlideTiming
.
prototype
.
get_SlideAdvanceAfter
=
function
()
{
return
this
.
SlideAdvanceAfter
;
}
;
CAscSlideTiming
.
prototype
.
put_SlideAdvanceDuration
=
function
(
v
)
{
this
.
SlideAdvanceDuration
=
v
;
}
;
CAscSlideTiming
.
prototype
.
get_SlideAdvanceDuration
=
function
()
{
return
this
.
SlideAdvanceDuration
;
}
;
CAscSlideTiming
.
prototype
.
put_ShowLoop
=
function
(
v
)
{
this
.
ShowLoop
=
v
;
};
CAscSlideTiming
.
prototype
.
get_ShowLoop
=
function
()
{
return
this
.
ShowLoop
;
};
CAscSlideTiming
.
prototype
.
applyProps
=
function
(
v
)
{
...
...
@@ -79,7 +78,7 @@ CAscSlideTiming.prototype.applyProps = function(v)
this
.
SlideAdvanceDuration
=
v
.
SlideAdvanceDuration
;
if
(
undefined
!==
v
.
ShowLoop
&&
null
!==
v
.
ShowLoop
)
this
.
ShowLoop
=
v
.
ShowLoop
;
}
}
;
CAscSlideTiming
.
prototype
.
createDuplicate
=
function
(
v
)
{
...
...
@@ -95,7 +94,7 @@ CAscSlideTiming.prototype.createDuplicate = function(v)
_slideT
.
ShowLoop
=
this
.
ShowLoop
;
return
_slideT
;
}
}
;
CAscSlideTiming
.
prototype
.
makeDuplicate
=
function
(
_slideT
)
{
...
...
@@ -110,7 +109,7 @@ CAscSlideTiming.prototype.makeDuplicate = function(_slideT)
_slideT
.
SlideAdvanceAfter
=
this
.
SlideAdvanceAfter
;
_slideT
.
SlideAdvanceDuration
=
this
.
SlideAdvanceDuration
;
_slideT
.
ShowLoop
=
this
.
ShowLoop
;
}
}
;
CAscSlideTiming
.
prototype
.
setUndefinedOptions
=
function
()
{
...
...
@@ -122,7 +121,7 @@ CAscSlideTiming.prototype.setUndefinedOptions = function()
this
.
SlideAdvanceAfter
=
undefined
;
this
.
SlideAdvanceDuration
=
undefined
;
this
.
ShowLoop
=
undefined
;
}
}
;
CAscSlideTiming
.
prototype
.
setDefaultParams
=
function
()
{
...
...
@@ -134,7 +133,7 @@ CAscSlideTiming.prototype.setDefaultParams = function()
this
.
SlideAdvanceAfter
=
false
;
this
.
SlideAdvanceDuration
=
10000
;
this
.
ShowLoop
=
true
;
}
}
;
CAscSlideTiming
.
prototype
.
Write_ToBinary
=
function
(
w
)
{
...
...
@@ -224,587 +223,6 @@ CLayoutThumbnail.prototype.get_Name = function() { return this.Name; };
CLayoutThumbnail
.
prototype
.
get_Width
=
function
()
{
return
this
.
Width
;
};
CLayoutThumbnail
.
prototype
.
get_Height
=
function
()
{
return
this
.
Height
;
};
// Object:
// {
// Bottom :
// {
// Color : { r : 0, g : 0, b : 0 },
// Value : border_Single,
// Size : 0.5 * g_dKoef_pt_to_mm
// Space : 0
// },
// Left :
// {
// ....
// }
// Right :
// {
// ....
// }
// Top :
// {
// ....
// }
// },
// Between :
// {
// ....
// }
// }
// CBackground
// Value : тип заливки(прозрачная или нет),
// Color : { r : 0, g : 0, b : 0 }
function
CBackground
(
obj
)
{
if
(
obj
)
{
if
(
obj
.
Unifill
&&
obj
.
Unifill
.
fill
&&
obj
.
Unifill
.
fill
.
type
===
window
[
'
Asc
'
].
c_oAscFill
.
FILL_TYPE_SOLID
&&
obj
.
Unifill
.
fill
.
color
)
{
this
.
Color
=
AscCommon
.
CreateAscColor
(
obj
.
Unifill
.
fill
.
color
);
}
else
{
this
.
Color
=
(
undefined
!=
obj
.
Color
&&
null
!=
obj
.
Color
)
?
AscCommon
.
CreateAscColorCustom
(
obj
.
Color
.
r
,
obj
.
Color
.
g
,
obj
.
Color
.
b
)
:
null
;
}
this
.
Value
=
(
undefined
!=
obj
.
Value
)
?
obj
.
Value
:
null
;
}
else
{
this
.
Color
=
AscCommon
.
CreateAscColorCustom
(
0
,
0
,
0
);
this
.
Value
=
1
;
}
}
CBackground
.
prototype
.
get_Color
=
function
(){
return
this
.
Color
;};
CBackground
.
prototype
.
put_Color
=
function
(
v
){
this
.
Color
=
(
v
)
?
v
:
null
;};
CBackground
.
prototype
.
get_Value
=
function
(){
return
this
.
Value
;};
CBackground
.
prototype
.
put_Value
=
function
(
v
){
this
.
Value
=
v
;};
function
CTablePositionH
(
obj
)
{
if
(
obj
)
{
this
.
RelativeFrom
=
(
undefined
===
obj
.
RelativeFrom
)
?
Asc
.
c_oAscHAnchor
.
Margin
:
obj
.
RelativeFrom
;
this
.
UseAlign
=
(
true
===
obj
.
Align
)
?
true
:
false
;
this
.
Align
=
undefined
;
this
.
Value
=
undefined
;
if
(
true
===
this
.
UseAlign
)
this
.
Align
=
(
undefined
===
obj
.
Value
)
?
Asc
.
c_oAscXAlign
.
Left
:
obj
.
Value
;
else
this
.
Value
=
(
undefined
===
obj
.
Value
)
?
0
:
obj
.
Value
;
}
else
{
this
.
RelativeFrom
=
Asc
.
c_oAscHAnchor
.
Column
;
this
.
UseAlign
=
false
;
this
.
Align
=
undefined
;
this
.
Value
=
0
;
}
}
CTablePositionH
.
prototype
.
get_RelativeFrom
=
function
()
{
return
this
.
RelativeFrom
;
}
CTablePositionH
.
prototype
.
put_RelativeFrom
=
function
(
v
)
{
this
.
RelativeFrom
=
v
;
}
CTablePositionH
.
prototype
.
get_UseAlign
=
function
()
{
return
this
.
UseAlign
;
}
CTablePositionH
.
prototype
.
put_UseAlign
=
function
(
v
)
{
this
.
UseAlign
=
v
;
}
CTablePositionH
.
prototype
.
get_Align
=
function
()
{
return
this
.
Align
;
}
CTablePositionH
.
prototype
.
put_Align
=
function
(
v
)
{
this
.
Align
=
v
;
}
CTablePositionH
.
prototype
.
get_Value
=
function
()
{
return
this
.
Value
;
}
CTablePositionH
.
prototype
.
put_Value
=
function
(
v
)
{
this
.
Value
=
v
;
}
function
CTablePositionV
(
obj
)
{
if
(
obj
)
{
this
.
RelativeFrom
=
(
undefined
===
obj
.
RelativeFrom
)
?
Asc
.
c_oAscVAnchor
.
Text
:
obj
.
RelativeFrom
;
this
.
UseAlign
=
(
true
===
obj
.
Align
)
?
true
:
false
;
this
.
Align
=
undefined
;
this
.
Value
=
undefined
;
if
(
true
===
this
.
UseAlign
)
this
.
Align
=
(
undefined
===
obj
.
Value
)
?
Asc
.
c_oAscYAlign
.
Top
:
obj
.
Value
;
else
this
.
Value
=
(
undefined
===
obj
.
Value
)
?
0
:
obj
.
Value
;
}
else
{
this
.
RelativeFrom
=
Asc
.
c_oAscVAnchor
.
Text
;
this
.
UseAlign
=
false
;
this
.
Align
=
undefined
;
this
.
Value
=
0
;
}
}
CTablePositionV
.
prototype
.
get_RelativeFrom
=
function
()
{
return
this
.
RelativeFrom
;
};
CTablePositionV
.
prototype
.
put_RelativeFrom
=
function
(
v
)
{
this
.
RelativeFrom
=
v
;
};
CTablePositionV
.
prototype
.
get_UseAlign
=
function
()
{
return
this
.
UseAlign
;
};
CTablePositionV
.
prototype
.
put_UseAlign
=
function
(
v
)
{
this
.
UseAlign
=
v
;
};
CTablePositionV
.
prototype
.
get_Align
=
function
()
{
return
this
.
Align
;
};
CTablePositionV
.
prototype
.
put_Align
=
function
(
v
)
{
this
.
Align
=
v
;
};
CTablePositionV
.
prototype
.
get_Value
=
function
()
{
return
this
.
Value
;
};
CTablePositionV
.
prototype
.
put_Value
=
function
(
v
)
{
this
.
Value
=
v
;
};
function
CTableProp
(
tblProp
)
{
if
(
tblProp
)
{
this
.
CanBeFlow
=
(
undefined
!=
tblProp
.
CanBeFlow
?
tblProp
.
CanBeFlow
:
false
);
this
.
CellSelect
=
(
undefined
!=
tblProp
.
CellSelect
?
tblProp
.
CellSelect
:
false
);
this
.
CellSelect
=
(
undefined
!=
tblProp
.
CellSelect
)
?
tblProp
.
CellSelect
:
false
;
this
.
TableWidth
=
(
undefined
!=
tblProp
.
TableWidth
)
?
tblProp
.
TableWidth
:
null
;
this
.
TableSpacing
=
(
undefined
!=
tblProp
.
TableSpacing
)
?
tblProp
.
TableSpacing
:
null
;
this
.
TableDefaultMargins
=
(
undefined
!=
tblProp
.
TableDefaultMargins
&&
null
!=
tblProp
.
TableDefaultMargins
)
?
new
Asc
.
asc_CPaddings
(
tblProp
.
TableDefaultMargins
)
:
null
;
this
.
CellMargins
=
(
undefined
!=
tblProp
.
CellMargins
&&
null
!=
tblProp
.
CellMargins
)
?
new
CMargins
(
tblProp
.
CellMargins
)
:
null
;
this
.
TableAlignment
=
(
undefined
!=
tblProp
.
TableAlignment
)
?
tblProp
.
TableAlignment
:
null
;
this
.
TableIndent
=
(
undefined
!=
tblProp
.
TableIndent
)
?
tblProp
.
TableIndent
:
null
;
this
.
TableWrappingStyle
=
(
undefined
!=
tblProp
.
TableWrappingStyle
)
?
tblProp
.
TableWrappingStyle
:
null
;
this
.
TablePaddings
=
(
undefined
!=
tblProp
.
TablePaddings
&&
null
!=
tblProp
.
TablePaddings
)
?
new
Asc
.
asc_CPaddings
(
tblProp
.
TablePaddings
)
:
null
;
this
.
TableBorders
=
(
undefined
!=
tblProp
.
TableBorders
&&
null
!=
tblProp
.
TableBorders
)
?
new
CBorders
(
tblProp
.
TableBorders
)
:
null
;
this
.
CellBorders
=
(
undefined
!=
tblProp
.
CellBorders
&&
null
!=
tblProp
.
CellBorders
)
?
new
CBorders
(
tblProp
.
CellBorders
)
:
null
;
this
.
TableBackground
=
(
undefined
!=
tblProp
.
TableBackground
&&
null
!=
tblProp
.
TableBackground
)
?
new
CBackground
(
tblProp
.
TableBackground
)
:
null
;
this
.
CellsBackground
=
(
undefined
!=
tblProp
.
CellsBackground
&&
null
!=
tblProp
.
CellsBackground
)
?
new
CBackground
(
tblProp
.
CellsBackground
)
:
null
;
this
.
Position
=
(
undefined
!=
tblProp
.
Position
&&
null
!=
tblProp
.
Position
)
?
new
Asc
.
CPosition
(
tblProp
.
Position
)
:
null
;
this
.
PositionH
=
(
undefined
!=
tblProp
.
PositionH
&&
null
!=
tblProp
.
PositionH
)
?
new
CTablePositionH
(
tblProp
.
PositionH
)
:
undefined
;
this
.
PositionV
=
(
undefined
!=
tblProp
.
PositionV
&&
null
!=
tblProp
.
PositionV
)
?
new
CTablePositionV
(
tblProp
.
PositionV
)
:
undefined
;
this
.
Internal_Position
=
(
undefined
!=
tblProp
.
Internal_Position
)
?
tblProp
.
Internal_Position
:
undefined
;
this
.
ForSelectedCells
=
(
undefined
!=
tblProp
.
ForSelectedCells
)
?
tblProp
.
ForSelectedCells
:
true
;
this
.
TableStyle
=
(
undefined
!=
tblProp
.
TableStyle
)
?
tblProp
.
TableStyle
:
null
;
this
.
TableLook
=
(
undefined
!=
tblProp
.
TableLook
)
?
new
Asc
.
CTablePropLook
(
tblProp
.
TableLook
)
:
null
;
this
.
RowsInHeader
=
(
undefined
!=
tblProp
.
RowsInHeader
)
?
tblProp
.
RowsInHeader
:
0
;
this
.
CellsVAlign
=
(
undefined
!=
tblProp
.
CellsVAlign
)
?
tblProp
.
CellsVAlign
:
c_oAscVertAlignJc
.
Top
;
this
.
Locked
=
(
undefined
!=
tblProp
.
Locked
)
?
tblProp
.
Locked
:
false
;
}
else
{
//Все свойства класса CTableProp должны быть undefined если они не изменялись
//this.CanBeFlow = false;
this
.
CellSelect
=
false
;
//обязательное свойство
/*this.TableWidth = null;
this.TableSpacing = null;
this.TableDefaultMargins = new Asc.asc_CPaddings ();
this.CellMargins = new CMargins ();
this.TableAlignment = 0;
this.TableIndent = 0;
this.TableWrappingStyle = c_oAscWrapStyle.Inline;
this.TablePaddings = new Asc.asc_CPaddings ();
this.TableBorders = new CBorders ();
this.CellBorders = new CBorders ();
this.TableBackground = new CBackground ();
this.CellsBackground = new CBackground ();;
this.Position = new CPosition ();
this.ForSelectedCells = true;*/
this
.
Locked
=
false
;
}
}
CTableProp
.
prototype
.
get_Width
=
function
(){
return
this
.
TableWidth
;}
CTableProp
.
prototype
.
put_Width
=
function
(
v
){
this
.
TableWidth
=
v
;}
CTableProp
.
prototype
.
get_Spacing
=
function
(){
return
this
.
TableSpacing
;}
CTableProp
.
prototype
.
put_Spacing
=
function
(
v
){
this
.
TableSpacing
=
v
;}
CTableProp
.
prototype
.
get_DefaultMargins
=
function
(){
return
this
.
TableDefaultMargins
;}
CTableProp
.
prototype
.
put_DefaultMargins
=
function
(
v
){
this
.
TableDefaultMargins
=
v
;}
CTableProp
.
prototype
.
get_CellMargins
=
function
(){
return
this
.
CellMargins
;}
CTableProp
.
prototype
.
put_CellMargins
=
function
(
v
){
this
.
CellMargins
=
v
;}
CTableProp
.
prototype
.
get_TableAlignment
=
function
(){
return
this
.
TableAlignment
;}
CTableProp
.
prototype
.
put_TableAlignment
=
function
(
v
){
this
.
TableAlignment
=
v
;}
CTableProp
.
prototype
.
get_TableIndent
=
function
(){
return
this
.
TableIndent
;}
CTableProp
.
prototype
.
put_TableIndent
=
function
(
v
){
this
.
TableIndent
=
v
;}
CTableProp
.
prototype
.
get_TableWrap
=
function
(){
return
this
.
TableWrappingStyle
;}
CTableProp
.
prototype
.
put_TableWrap
=
function
(
v
){
this
.
TableWrappingStyle
=
v
;}
CTableProp
.
prototype
.
get_TablePaddings
=
function
(){
return
this
.
TablePaddings
;}
CTableProp
.
prototype
.
put_TablePaddings
=
function
(
v
){
this
.
TablePaddings
=
v
;}
CTableProp
.
prototype
.
get_TableBorders
=
function
(){
return
this
.
TableBorders
;}
CTableProp
.
prototype
.
put_TableBorders
=
function
(
v
){
this
.
TableBorders
=
v
;}
CTableProp
.
prototype
.
get_CellBorders
=
function
(){
return
this
.
CellBorders
;}
CTableProp
.
prototype
.
put_CellBorders
=
function
(
v
){
this
.
CellBorders
=
v
;}
CTableProp
.
prototype
.
get_TableBackground
=
function
(){
return
this
.
TableBackground
;}
CTableProp
.
prototype
.
put_TableBackground
=
function
(
v
){
this
.
TableBackground
=
v
;}
CTableProp
.
prototype
.
get_CellsBackground
=
function
(){
return
this
.
CellsBackground
;}
CTableProp
.
prototype
.
put_CellsBackground
=
function
(
v
){
this
.
CellsBackground
=
v
;}
CTableProp
.
prototype
.
get_Position
=
function
(){
return
this
.
Position
;}
CTableProp
.
prototype
.
put_Position
=
function
(
v
){
this
.
Position
=
v
;}
CTableProp
.
prototype
.
get_PositionH
=
function
(){
return
this
.
PositionH
;}
CTableProp
.
prototype
.
put_PositionH
=
function
(
v
){
this
.
PositionH
=
v
;}
CTableProp
.
prototype
.
get_PositionV
=
function
(){
return
this
.
PositionV
;}
CTableProp
.
prototype
.
put_PositionV
=
function
(
v
){
this
.
PositionV
=
v
;}
CTableProp
.
prototype
.
get_Value_X
=
function
(
RelativeFrom
)
{
if
(
undefined
!=
this
.
Internal_Position
)
return
this
.
Internal_Position
.
Calculate_X_Value
(
RelativeFrom
);
return
0
;
}
CTableProp
.
prototype
.
get_Value_Y
=
function
(
RelativeFrom
)
{
if
(
undefined
!=
this
.
Internal_Position
)
return
this
.
Internal_Position
.
Calculate_Y_Value
(
RelativeFrom
);
return
0
;
}
CTableProp
.
prototype
.
get_ForSelectedCells
=
function
(){
return
this
.
ForSelectedCells
;}
CTableProp
.
prototype
.
put_ForSelectedCells
=
function
(
v
){
this
.
ForSelectedCells
=
v
;}
CTableProp
.
prototype
.
put_CellSelect
=
function
(
v
){
this
.
CellSelect
=
v
;}
CTableProp
.
prototype
.
get_CellSelect
=
function
(){
return
this
.
CellSelect
};
CTableProp
.
prototype
.
get_CanBeFlow
=
function
(){
return
this
.
CanBeFlow
;}
CTableProp
.
prototype
.
get_RowsInHeader
=
function
(){
return
this
.
RowsInHeader
;};
CTableProp
.
prototype
.
put_RowsInHeader
=
function
(
v
){
this
.
RowsInHeader
=
v
;};
CTableProp
.
prototype
.
get_Locked
=
function
()
{
return
this
.
Locked
;
}
CTableProp
.
prototype
.
get_CellsVAlign
=
function
()
{
return
this
.
CellsVAlign
;
}
CTableProp
.
prototype
.
put_CellsVAlign
=
function
(
v
){
this
.
CellsVAlign
=
v
;
}
CTableProp
.
prototype
.
get_TableLook
=
function
()
{
return
this
.
TableLook
;}
CTableProp
.
prototype
.
put_TableLook
=
function
(
v
){
this
.
TableLook
=
v
;}
CTableProp
.
prototype
.
get_TableStyle
=
function
()
{
return
this
.
TableStyle
;}
CTableProp
.
prototype
.
put_TableStyle
=
function
(
v
){
this
.
TableStyle
=
v
;}
function
CBorders
(
obj
)
{
if
(
obj
)
{
this
.
Left
=
(
undefined
!=
obj
.
Left
&&
null
!=
obj
.
Left
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Left
)
:
null
;
this
.
Top
=
(
undefined
!=
obj
.
Top
&&
null
!=
obj
.
Top
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Top
)
:
null
;
this
.
Right
=
(
undefined
!=
obj
.
Right
&&
null
!=
obj
.
Right
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Right
)
:
null
;
this
.
Bottom
=
(
undefined
!=
obj
.
Bottom
&&
null
!=
obj
.
Bottom
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Bottom
)
:
null
;
this
.
InsideH
=
(
undefined
!=
obj
.
InsideH
&&
null
!=
obj
.
InsideH
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
InsideH
)
:
null
;
this
.
InsideV
=
(
undefined
!=
obj
.
InsideV
&&
null
!=
obj
.
InsideV
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
InsideV
)
:
null
;
}
//Все свойства класса CBorders должны быть undefined если они не изменялись
/*else
{
this.Left = null;
this.Top = null;
this.Right = null;
this.Bottom = null;
this.InsideH = null;
this.InsideV = null;
}*/
}
CBorders
.
prototype
.
get_Left
=
function
(){
return
this
.
Left
;
}
CBorders
.
prototype
.
put_Left
=
function
(
v
){
this
.
Left
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;}
CBorders
.
prototype
.
get_Top
=
function
(){
return
this
.
Top
;
}
CBorders
.
prototype
.
put_Top
=
function
(
v
){
this
.
Top
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;}
CBorders
.
prototype
.
get_Right
=
function
(){
return
this
.
Right
;
}
CBorders
.
prototype
.
put_Right
=
function
(
v
){
this
.
Right
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;}
CBorders
.
prototype
.
get_Bottom
=
function
(){
return
this
.
Bottom
;
}
CBorders
.
prototype
.
put_Bottom
=
function
(
v
){
this
.
Bottom
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;}
CBorders
.
prototype
.
get_InsideH
=
function
(){
return
this
.
InsideH
;
}
CBorders
.
prototype
.
put_InsideH
=
function
(
v
){
this
.
InsideH
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;}
CBorders
.
prototype
.
get_InsideV
=
function
(){
return
this
.
InsideV
;
}
CBorders
.
prototype
.
put_InsideV
=
function
(
v
){
this
.
InsideV
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;}
// CMargins
function
CMargins
(
obj
)
{
if
(
obj
)
{
this
.
Left
=
(
undefined
!=
obj
.
Left
)
?
obj
.
Left
:
null
;
this
.
Right
=
(
undefined
!=
obj
.
Right
)
?
obj
.
Right
:
null
;
this
.
Top
=
(
undefined
!=
obj
.
Top
)
?
obj
.
Top
:
null
;
this
.
Bottom
=
(
undefined
!=
obj
.
Bottom
)
?
obj
.
Bottom
:
null
;
this
.
Flag
=
(
undefined
!=
obj
.
Flag
)
?
obj
.
Flag
:
null
;
}
else
{
this
.
Left
=
null
;
this
.
Right
=
null
;
this
.
Top
=
null
;
this
.
Bottom
=
null
;
this
.
Flag
=
null
;
}
}
CMargins
.
prototype
.
get_Left
=
function
(){
return
this
.
Left
;
}
CMargins
.
prototype
.
put_Left
=
function
(
v
){
this
.
Left
=
v
;}
CMargins
.
prototype
.
get_Right
=
function
(){
return
this
.
Right
;
}
CMargins
.
prototype
.
put_Right
=
function
(
v
){
this
.
Right
=
v
;}
CMargins
.
prototype
.
get_Top
=
function
(){
return
this
.
Top
;
}
CMargins
.
prototype
.
put_Top
=
function
(
v
){
this
.
Top
=
v
;}
CMargins
.
prototype
.
get_Bottom
=
function
(){
return
this
.
Bottom
;
}
CMargins
.
prototype
.
put_Bottom
=
function
(
v
){
this
.
Bottom
=
v
;}
CMargins
.
prototype
.
get_Flag
=
function
(){
return
this
.
Flag
;
}
CMargins
.
prototype
.
put_Flag
=
function
(
v
){
this
.
Flag
=
v
;}
// Возвращает
//{
// ParaPr :
// {
// ContextualSpacing : false, // Удалять ли интервал между параграфами одинакового стиля
//
// Ind :
// {
// Left : 0, // Левый отступ
// Right : 0, // Правый отступ
// FirstLine : 0 // Первая строка
// },
//
// Jc : align_Left, // Прилегание параграфа
//
// KeepLines : false, // переносить параграф на новую страницу,
// // если на текущей он целиком не убирается
// KeepNext : false, // переносить параграф вместе со следующим параграфом
//
// PageBreakBefore : false, // начинать параграф с новой страницы
//
// Spacing :
// {
// Line : 1.15, // Расстояние между строками внутри абзаца
// LineRule : linerule_Auto, // Тип расстрояния между строками
// Before : 0, // Дополнительное расстояние до абзаца
// After : 10 * g_dKoef_pt_to_mm // Дополнительное расстояние после абзаца
// },
//
// Shd :
// {
// Value : shd_Nil,
// Color :
// {
// r : 255,
// g : 255,
// b : 255
// }
// },
//
// WidowControl : true, // Запрет висячих строк
//
// Tabs : []
// },
//
// TextPr :
// {
// Bold : false,
// Italic : false,
// Underline : false,
// Strikeout : false,
// FontFamily :
// {
// Name : "Times New Roman",
// Index : -1
// },
// FontSize : 12,
// Color :
// {
// r : 0,
// g : 0,
// b : 0
// },
// VertAlign : vertalign_Baseline,
// HighLight : highlight_None
// }
//}
// Paragraph properties
function
CParagraphPropEx
(
obj
)
{
if
(
obj
)
{
this
.
ContextualSpacing
=
(
undefined
!=
obj
.
ContextualSpacing
)
?
obj
.
ContextualSpacing
:
null
;
this
.
Ind
=
(
undefined
!=
obj
.
Ind
&&
null
!=
obj
.
Ind
)
?
new
Asc
.
asc_CParagraphInd
(
obj
.
Ind
)
:
null
;
this
.
Jc
=
(
undefined
!=
obj
.
Jc
)
?
obj
.
Jc
:
null
;
this
.
KeepLines
=
(
undefined
!=
obj
.
KeepLines
)
?
obj
.
KeepLines
:
null
;
this
.
KeepNext
=
(
undefined
!=
obj
.
KeepNext
)
?
obj
.
KeepNext
:
null
;
this
.
PageBreakBefore
=
(
undefined
!=
obj
.
PageBreakBefore
)
?
obj
.
PageBreakBefore
:
null
;
this
.
Spacing
=
(
undefined
!=
obj
.
Spacing
&&
null
!=
obj
.
Spacing
)
?
new
AscCommon
.
asc_CParagraphSpacing
(
obj
.
Spacing
)
:
null
;
this
.
Shd
=
(
undefined
!=
obj
.
Shd
&&
null
!=
obj
.
Shd
)
?
new
Asc
.
asc_CParagraphShd
(
obj
.
Shd
)
:
null
;
this
.
WidowControl
=
(
undefined
!=
obj
.
WidowControl
)
?
obj
.
WidowControl
:
null
;
// Запрет висячих строк
this
.
Tabs
=
obj
.
Tabs
;
}
else
{
//ContextualSpacing : false, // Удалять ли интервал между параграфами одинакового стиля
//
// Ind :
// {
// Left : 0, // Левый отступ
// Right : 0, // Правый отступ
// FirstLine : 0 // Первая строка
// },
//
// Jc : align_Left, // Прилегание параграфа
//
// KeepLines : false, // переносить параграф на новую страницу,
// // если на текущей он целиком не убирается
// KeepNext : false, // переносить параграф вместе со следующим параграфом
//
// PageBreakBefore : false, // начинать параграф с новой страницы
this
.
ContextualSpacing
=
false
;
this
.
Ind
=
new
Asc
.
asc_CParagraphInd
();
this
.
Jc
=
AscCommon
.
align_Left
;
this
.
KeepLines
=
false
;
this
.
KeepNext
=
false
;
this
.
PageBreakBefore
=
false
;
this
.
Spacing
=
new
AscCommon
.
asc_CParagraphSpacing
();
this
.
Shd
=
new
Asc
.
asc_CParagraphShd
();
this
.
WidowControl
=
true
;
// Запрет висячих строк
this
.
Tabs
=
null
;
}
}
CParagraphPropEx
.
prototype
.
get_ContextualSpacing
=
function
()
{
return
this
.
ContextualSpacing
;
}
CParagraphPropEx
.
prototype
.
get_Ind
=
function
()
{
return
this
.
Ind
;
}
CParagraphPropEx
.
prototype
.
get_Jc
=
function
()
{
return
this
.
Jc
;
}
CParagraphPropEx
.
prototype
.
get_KeepLines
=
function
()
{
return
this
.
KeepLines
;
}
CParagraphPropEx
.
prototype
.
get_KeepNext
=
function
()
{
return
this
.
KeepNext
;
}
CParagraphPropEx
.
prototype
.
get_PageBreakBefore
=
function
()
{
return
this
.
PageBreakBefore
;
}
CParagraphPropEx
.
prototype
.
get_Spacing
=
function
()
{
return
this
.
Spacing
;
}
CParagraphPropEx
.
prototype
.
get_Shd
=
function
()
{
return
this
.
Shd
;
}
CParagraphPropEx
.
prototype
.
get_WidowControl
=
function
()
{
return
this
.
WidowControl
;
}
CParagraphPropEx
.
prototype
.
get_Tabs
=
function
()
{
return
this
.
Tabs
;
}
// Text properties
// TextPr :
// {
// Bold : false,
// Italic : false,
// Underline : false,
// Strikeout : false,
// FontFamily :
// {
// Name : "Times New Roman",
// Index : -1
// },
// FontSize : 12,
// Color :
// {
// r : 0,
// g : 0,
// b : 0
// },
// VertAlign : vertalign_Baseline,
// HighLight : highlight_None
// }
// CTextProp
function
CTextProp
(
obj
)
{
if
(
obj
)
{
this
.
Bold
=
(
undefined
!=
obj
.
Bold
)
?
obj
.
Bold
:
null
;
this
.
Italic
=
(
undefined
!=
obj
.
Italic
)
?
obj
.
Italic
:
null
;
this
.
Underline
=
(
undefined
!=
obj
.
Underline
)
?
obj
.
Underline
:
null
;
this
.
Strikeout
=
(
undefined
!=
obj
.
Strikeout
)
?
obj
.
Strikeout
:
null
;
this
.
FontFamily
=
(
undefined
!=
obj
.
FontFamily
&&
null
!=
obj
.
FontFamily
)
?
new
AscCommon
.
asc_CTextFontFamily
(
obj
.
FontFamily
)
:
null
;
this
.
FontSize
=
(
undefined
!=
obj
.
FontSize
)
?
obj
.
FontSize
:
null
;
this
.
Color
=
(
undefined
!=
obj
.
Color
&&
null
!=
obj
.
Color
)
?
new
AscCommon
.
CColor
(
obj
.
Color
.
r
,
obj
.
Color
.
g
,
obj
.
Color
.
b
)
:
null
;
this
.
VertAlign
=
(
undefined
!=
obj
.
VertAlign
)
?
obj
.
VertAlign
:
null
;
this
.
HighLight
=
(
undefined
!=
obj
.
HighLight
)
?
obj
.
HighLight
==
AscCommonWord
.
highlight_None
?
obj
.
HighLight
:
new
AscCommon
.
CColor
(
obj
.
HighLight
.
r
,
obj
.
HighLight
.
g
,
obj
.
HighLight
.
b
)
:
null
;
}
else
{
// Bold : false,
// Italic : false,
// Underline : false,
// Strikeout : false,
// FontFamily :
// {
// Name : "Times New Roman",
// Index : -1
// },
// FontSize : 12,
// Color :
// {
// r : 0,
// g : 0,
// b : 0
// },
// VertAlign : vertalign_Baseline,
// HighLight : highlight_None
this
.
Bold
=
false
;
this
.
Italic
=
false
;
this
.
Underline
=
false
;
this
.
Strikeout
=
false
;
this
.
FontFamily
=
new
CFontFamily
();
this
.
FontSize
=
12
;
this
.
Color
=
new
AscCommon
.
CColor
();
this
.
VertAlign
=
AscCommon
.
vertalign_Baseline
;
this
.
HighLight
=
AscCommonWord
.
highlight_None
;
}
}
CTextProp
.
prototype
.
get_Bold
=
function
()
{
return
this
.
Bold
;
}
CTextProp
.
prototype
.
get_Italic
=
function
()
{
return
this
.
Italic
;
}
CTextProp
.
prototype
.
get_Underline
=
function
()
{
return
this
.
Underline
;
}
CTextProp
.
prototype
.
get_Strikeout
=
function
()
{
return
this
.
Strikeout
;
}
CTextProp
.
prototype
.
get_FontFamily
=
function
()
{
return
this
.
FontFamily
;
}
CTextProp
.
prototype
.
get_FontSize
=
function
()
{
return
this
.
FontSize
;
}
CTextProp
.
prototype
.
get_Color
=
function
()
{
return
this
.
Color
;
}
CTextProp
.
prototype
.
get_VertAlign
=
function
()
{
return
this
.
VertAlign
;
}
CTextProp
.
prototype
.
get_HighLight
=
function
()
{
return
this
.
HighLight
;
}
// paragraph and text properties objects container
function
CParagraphAndTextProp
(
paragraphProp
,
textProp
)
{
this
.
ParaPr
=
(
undefined
!=
paragraphProp
&&
null
!=
paragraphProp
)
?
new
CParagraphPropEx
(
paragraphProp
)
:
null
;
this
.
TextPr
=
(
undefined
!=
textProp
&&
null
!=
textProp
)
?
new
CTextProp
(
textProp
)
:
null
;
}
CParagraphAndTextProp
.
prototype
.
get_ParaPr
=
function
()
{
return
this
.
ParaPr
;
}
CParagraphAndTextProp
.
prototype
.
get_TextPr
=
function
()
{
return
this
.
TextPr
;
}
function
CHyperlinkProperty
(
obj
)
{
if
(
obj
)
...
...
@@ -829,16 +247,6 @@ CHyperlinkProperty.prototype.get_Text = function() { return this.Text; };
CHyperlinkProperty
.
prototype
.
put_Text
=
function
(
v
)
{
this
.
Text
=
v
;
};
function
CAscTableStyle
()
{
this
.
Id
=
""
;
this
.
Type
=
0
;
this
.
Image
=
""
;
}
CAscTableStyle
.
prototype
.
get_Id
=
function
(){
return
this
.
Id
;
};
CAscTableStyle
.
prototype
.
get_Image
=
function
(){
return
this
.
Image
;
};
CAscTableStyle
.
prototype
.
get_Type
=
function
(){
return
this
.
Type
;
};
//------------------------------------------------------------export----------------------------------------------------
window
[
'
Asc
'
]
=
window
[
'
Asc
'
]
||
{};
window
[
'
AscCommonSlide
'
]
=
window
[
'
AscCommonSlide
'
]
||
{};
...
...
@@ -877,132 +285,3 @@ CLayoutThumbnail.prototype['get_Image'] = CLayoutThumbnail.prototype.get_Image;
CLayoutThumbnail
.
prototype
[
'
get_Name
'
]
=
CLayoutThumbnail
.
prototype
.
get_Name
;
CLayoutThumbnail
.
prototype
[
'
get_Width
'
]
=
CLayoutThumbnail
.
prototype
.
get_Width
;
CLayoutThumbnail
.
prototype
[
'
get_Height
'
]
=
CLayoutThumbnail
.
prototype
.
get_Height
;
window
[
'
Asc
'
][
'
CBackground
'
]
=
window
[
'
Asc
'
].
CBackground
=
CBackground
;
CBackground
.
prototype
[
'
get_Color
'
]
=
CBackground
.
prototype
.
get_Color
;
CBackground
.
prototype
[
'
put_Color
'
]
=
CBackground
.
prototype
.
put_Color
;
CBackground
.
prototype
[
'
get_Value
'
]
=
CBackground
.
prototype
.
get_Value
;
CBackground
.
prototype
[
'
put_Value
'
]
=
CBackground
.
prototype
.
put_Value
;
window
[
'
Asc
'
][
'
CTablePositionH
'
]
=
CTablePositionH
;
CTablePositionH
.
prototype
[
'
get_RelativeFrom
'
]
=
CTablePositionH
.
prototype
.
get_RelativeFrom
;
CTablePositionH
.
prototype
[
'
put_RelativeFrom
'
]
=
CTablePositionH
.
prototype
.
put_RelativeFrom
;
CTablePositionH
.
prototype
[
'
get_UseAlign
'
]
=
CTablePositionH
.
prototype
.
get_UseAlign
;
CTablePositionH
.
prototype
[
'
put_UseAlign
'
]
=
CTablePositionH
.
prototype
.
put_UseAlign
;
CTablePositionH
.
prototype
[
'
get_Align
'
]
=
CTablePositionH
.
prototype
.
get_Align
;
CTablePositionH
.
prototype
[
'
put_Align
'
]
=
CTablePositionH
.
prototype
.
put_Align
;
CTablePositionH
.
prototype
[
'
get_Value
'
]
=
CTablePositionH
.
prototype
.
get_Value
;
CTablePositionH
.
prototype
[
'
put_Value
'
]
=
CTablePositionH
.
prototype
.
put_Value
;
window
[
'
Asc
'
][
'
CTablePositionV
'
]
=
CTablePositionV
;
CTablePositionV
.
prototype
[
'
get_RelativeFrom
'
]
=
CTablePositionV
.
prototype
.
get_RelativeFrom
;
CTablePositionV
.
prototype
[
'
put_RelativeFrom
'
]
=
CTablePositionV
.
prototype
.
put_RelativeFrom
;
CTablePositionV
.
prototype
[
'
get_UseAlign
'
]
=
CTablePositionV
.
prototype
.
get_UseAlign
;
CTablePositionV
.
prototype
[
'
put_UseAlign
'
]
=
CTablePositionV
.
prototype
.
put_UseAlign
;
CTablePositionV
.
prototype
[
'
get_Align
'
]
=
CTablePositionV
.
prototype
.
get_Align
;
CTablePositionV
.
prototype
[
'
put_Align
'
]
=
CTablePositionV
.
prototype
.
put_Align
;
CTablePositionV
.
prototype
[
'
get_Value
'
]
=
CTablePositionV
.
prototype
.
get_Value
;
CTablePositionV
.
prototype
[
'
put_Value
'
]
=
CTablePositionV
.
prototype
.
put_Value
;
window
[
'
Asc
'
][
'
CTableProp
'
]
=
window
[
'
Asc
'
].
CTableProp
=
CTableProp
;
CTableProp
.
prototype
[
'
get_Width
'
]
=
CTableProp
.
prototype
.
get_Width
;
CTableProp
.
prototype
[
'
put_Width
'
]
=
CTableProp
.
prototype
.
put_Width
;
CTableProp
.
prototype
[
'
get_Spacing
'
]
=
CTableProp
.
prototype
.
get_Spacing
;
CTableProp
.
prototype
[
'
put_Spacing
'
]
=
CTableProp
.
prototype
.
put_Spacing
;
CTableProp
.
prototype
[
'
get_DefaultMargins
'
]
=
CTableProp
.
prototype
.
get_DefaultMargins
;
CTableProp
.
prototype
[
'
put_DefaultMargins
'
]
=
CTableProp
.
prototype
.
put_DefaultMargins
;
CTableProp
.
prototype
[
'
get_CellMargins
'
]
=
CTableProp
.
prototype
.
get_CellMargins
;
CTableProp
.
prototype
[
'
put_CellMargins
'
]
=
CTableProp
.
prototype
.
put_CellMargins
;
CTableProp
.
prototype
[
'
get_TableAlignment
'
]
=
CTableProp
.
prototype
.
get_TableAlignment
;
CTableProp
.
prototype
[
'
put_TableAlignment
'
]
=
CTableProp
.
prototype
.
put_TableAlignment
;
CTableProp
.
prototype
[
'
get_TableIndent
'
]
=
CTableProp
.
prototype
.
get_TableIndent
;
CTableProp
.
prototype
[
'
put_TableIndent
'
]
=
CTableProp
.
prototype
.
put_TableIndent
;
CTableProp
.
prototype
[
'
get_TableWrap
'
]
=
CTableProp
.
prototype
.
get_TableWrap
;
CTableProp
.
prototype
[
'
put_TableWrap
'
]
=
CTableProp
.
prototype
.
put_TableWrap
;
CTableProp
.
prototype
[
'
get_TablePaddings
'
]
=
CTableProp
.
prototype
.
get_TablePaddings
;
CTableProp
.
prototype
[
'
put_TablePaddings
'
]
=
CTableProp
.
prototype
.
put_TablePaddings
;
CTableProp
.
prototype
[
'
get_TableBorders
'
]
=
CTableProp
.
prototype
.
get_TableBorders
;
CTableProp
.
prototype
[
'
put_TableBorders
'
]
=
CTableProp
.
prototype
.
put_TableBorders
;
CTableProp
.
prototype
[
'
get_CellBorders
'
]
=
CTableProp
.
prototype
.
get_CellBorders
;
CTableProp
.
prototype
[
'
put_CellBorders
'
]
=
CTableProp
.
prototype
.
put_CellBorders
;
CTableProp
.
prototype
[
'
get_TableBackground
'
]
=
CTableProp
.
prototype
.
get_TableBackground
;
CTableProp
.
prototype
[
'
put_TableBackground
'
]
=
CTableProp
.
prototype
.
put_TableBackground
;
CTableProp
.
prototype
[
'
get_CellsBackground
'
]
=
CTableProp
.
prototype
.
get_CellsBackground
;
CTableProp
.
prototype
[
'
put_CellsBackground
'
]
=
CTableProp
.
prototype
.
put_CellsBackground
;
CTableProp
.
prototype
[
'
get_Position
'
]
=
CTableProp
.
prototype
.
get_Position
;
CTableProp
.
prototype
[
'
put_Position
'
]
=
CTableProp
.
prototype
.
put_Position
;
CTableProp
.
prototype
[
'
get_PositionH
'
]
=
CTableProp
.
prototype
.
get_PositionH
;
CTableProp
.
prototype
[
'
put_PositionH
'
]
=
CTableProp
.
prototype
.
put_PositionH
;
CTableProp
.
prototype
[
'
get_PositionV
'
]
=
CTableProp
.
prototype
.
get_PositionV
;
CTableProp
.
prototype
[
'
put_PositionV
'
]
=
CTableProp
.
prototype
.
put_PositionV
;
CTableProp
.
prototype
[
'
get_Value_X
'
]
=
CTableProp
.
prototype
.
get_Value_X
;
CTableProp
.
prototype
[
'
get_Value_Y
'
]
=
CTableProp
.
prototype
.
get_Value_Y
;
CTableProp
.
prototype
[
'
get_ForSelectedCells
'
]
=
CTableProp
.
prototype
.
get_ForSelectedCells
;
CTableProp
.
prototype
[
'
put_ForSelectedCells
'
]
=
CTableProp
.
prototype
.
put_ForSelectedCells
;
CTableProp
.
prototype
[
'
put_CellSelect
'
]
=
CTableProp
.
prototype
.
put_CellSelect
;
CTableProp
.
prototype
[
'
get_CellSelect
'
]
=
CTableProp
.
prototype
.
get_CellSelect
;
CTableProp
.
prototype
[
'
get_CanBeFlow
'
]
=
CTableProp
.
prototype
.
get_CanBeFlow
;
CTableProp
.
prototype
[
'
get_RowsInHeader
'
]
=
CTableProp
.
prototype
.
get_RowsInHeader
;
CTableProp
.
prototype
[
'
put_RowsInHeader
'
]
=
CTableProp
.
prototype
.
put_RowsInHeader
;
CTableProp
.
prototype
[
'
get_Locked
'
]
=
CTableProp
.
prototype
.
get_Locked
;
CTableProp
.
prototype
[
'
get_CellsVAlign
'
]
=
CTableProp
.
prototype
.
get_CellsVAlign
;
CTableProp
.
prototype
[
'
put_CellsVAlign
'
]
=
CTableProp
.
prototype
.
put_CellsVAlign
;
CTableProp
.
prototype
[
'
get_TableLook
'
]
=
CTableProp
.
prototype
.
get_TableLook
;
CTableProp
.
prototype
[
'
put_TableLook
'
]
=
CTableProp
.
prototype
.
put_TableLook
;
CTableProp
.
prototype
[
'
get_TableStyle
'
]
=
CTableProp
.
prototype
.
get_TableStyle
;
CTableProp
.
prototype
[
'
put_TableStyle
'
]
=
CTableProp
.
prototype
.
put_TableStyle
;
window
[
'
Asc
'
][
'
CBorders
'
]
=
window
[
'
Asc
'
].
CBorders
=
CBorders
;
CBorders
.
prototype
[
'
get_Left
'
]
=
CBorders
.
prototype
.
get_Left
;
CBorders
.
prototype
[
'
put_Left
'
]
=
CBorders
.
prototype
.
put_Left
;
CBorders
.
prototype
[
'
get_Top
'
]
=
CBorders
.
prototype
.
get_Top
;
CBorders
.
prototype
[
'
put_Top
'
]
=
CBorders
.
prototype
.
put_Top
;
CBorders
.
prototype
[
'
get_Right
'
]
=
CBorders
.
prototype
.
get_Right
;
CBorders
.
prototype
[
'
put_Right
'
]
=
CBorders
.
prototype
.
put_Right
;
CBorders
.
prototype
[
'
get_Bottom
'
]
=
CBorders
.
prototype
.
get_Bottom
;
CBorders
.
prototype
[
'
put_Bottom
'
]
=
CBorders
.
prototype
.
put_Bottom
;
CBorders
.
prototype
[
'
get_InsideH
'
]
=
CBorders
.
prototype
.
get_InsideH
;
CBorders
.
prototype
[
'
put_InsideH
'
]
=
CBorders
.
prototype
.
put_InsideH
;
CBorders
.
prototype
[
'
get_InsideV
'
]
=
CBorders
.
prototype
.
get_InsideV
;
CBorders
.
prototype
[
'
put_InsideV
'
]
=
CBorders
.
prototype
.
put_InsideV
;
window
[
'
Asc
'
][
'
CMargins
'
]
=
window
[
'
Asc
'
].
CMargins
=
CMargins
;
CMargins
.
prototype
[
'
get_Left
'
]
=
CMargins
.
prototype
.
get_Left
;
CMargins
.
prototype
[
'
put_Left
'
]
=
CMargins
.
prototype
.
put_Left
;
CMargins
.
prototype
[
'
get_Right
'
]
=
CMargins
.
prototype
.
get_Right
;
CMargins
.
prototype
[
'
put_Right
'
]
=
CMargins
.
prototype
.
put_Right
;
CMargins
.
prototype
[
'
get_Top
'
]
=
CMargins
.
prototype
.
get_Top
;
CMargins
.
prototype
[
'
put_Top
'
]
=
CMargins
.
prototype
.
put_Top
;
CMargins
.
prototype
[
'
get_Bottom
'
]
=
CMargins
.
prototype
.
get_Bottom
;
CMargins
.
prototype
[
'
put_Bottom
'
]
=
CMargins
.
prototype
.
put_Bottom
;
CMargins
.
prototype
[
'
get_Flag
'
]
=
CMargins
.
prototype
.
get_Flag
;
CMargins
.
prototype
[
'
put_Flag
'
]
=
CMargins
.
prototype
.
put_Flag
;
CParagraphPropEx
.
prototype
[
'
get_ContextualSpacing
'
]
=
CParagraphPropEx
.
prototype
.
get_ContextualSpacing
;
CParagraphPropEx
.
prototype
[
'
get_Ind
'
]
=
CParagraphPropEx
.
prototype
.
get_Ind
;
CParagraphPropEx
.
prototype
[
'
get_Jc
'
]
=
CParagraphPropEx
.
prototype
.
get_Jc
;
CParagraphPropEx
.
prototype
[
'
get_KeepLines
'
]
=
CParagraphPropEx
.
prototype
.
get_KeepLines
;
CParagraphPropEx
.
prototype
[
'
get_KeepNext
'
]
=
CParagraphPropEx
.
prototype
.
get_KeepNext
;
CParagraphPropEx
.
prototype
[
'
get_PageBreakBefore
'
]
=
CParagraphPropEx
.
prototype
.
get_PageBreakBefore
;
CParagraphPropEx
.
prototype
[
'
get_Spacing
'
]
=
CParagraphPropEx
.
prototype
.
get_Spacing
;
CParagraphPropEx
.
prototype
[
'
get_Shd
'
]
=
CParagraphPropEx
.
prototype
.
get_Shd
;
CParagraphPropEx
.
prototype
[
'
get_WidowControl
'
]
=
CParagraphPropEx
.
prototype
.
get_WidowControl
;
CParagraphPropEx
.
prototype
[
'
get_Tabs
'
]
=
CParagraphPropEx
.
prototype
.
get_Tabs
;
CAscTableStyle
.
prototype
[
'
get_Id
'
]
=
CAscTableStyle
.
prototype
.
get_Id
;
CAscTableStyle
.
prototype
[
'
get_Image
'
]
=
CAscTableStyle
.
prototype
.
get_Image
;
CAscTableStyle
.
prototype
[
'
get_Type
'
]
=
CAscTableStyle
.
prototype
.
get_Type
;
CTextProp
.
prototype
[
'
get_Bold
'
]
=
CTextProp
.
prototype
.
get_Bold
;
CTextProp
.
prototype
[
'
get_Italic
'
]
=
CTextProp
.
prototype
.
get_Italic
;
CTextProp
.
prototype
[
'
get_Underline
'
]
=
CTextProp
.
prototype
.
get_Underline
;
CTextProp
.
prototype
[
'
get_Strikeout
'
]
=
CTextProp
.
prototype
.
get_Strikeout
;
CTextProp
.
prototype
[
'
get_FontFamily
'
]
=
CTextProp
.
prototype
.
get_FontFamily
;
CTextProp
.
prototype
[
'
get_FontSize
'
]
=
CTextProp
.
prototype
.
get_FontSize
;
CTextProp
.
prototype
[
'
get_Color
'
]
=
CTextProp
.
prototype
.
get_Color
;
CTextProp
.
prototype
[
'
get_VertAlign
'
]
=
CTextProp
.
prototype
.
get_VertAlign
;
CTextProp
.
prototype
[
'
get_HighLight
'
]
=
CTextProp
.
prototype
.
get_HighLight
;
window
[
'
AscCommonSlide
'
].
CParagraphAndTextProp
=
CParagraphAndTextProp
;
CParagraphAndTextProp
.
prototype
[
'
get_ParaPr
'
]
=
CParagraphAndTextProp
.
prototype
.
get_ParaPr
;
CParagraphAndTextProp
.
prototype
[
'
get_TextPr
'
]
=
CParagraphAndTextProp
.
prototype
.
get_TextPr
;
word/api.js
View file @
f6aff605
...
...
@@ -1424,247 +1424,6 @@ background-repeat: no-repeat;\
this
.
WordControl
.
m_oLogicDocument
.
Remove_DropCap
(
bDropCap
);
};
// Paragraph properties
function
CParagraphPropEx
(
obj
)
{
if
(
obj
)
{
this
.
ContextualSpacing
=
(
undefined
!=
obj
.
ContextualSpacing
)
?
obj
.
ContextualSpacing
:
null
;
this
.
Ind
=
(
undefined
!=
obj
.
Ind
&&
null
!=
obj
.
Ind
)
?
new
Asc
.
asc_CParagraphInd
(
obj
.
Ind
)
:
null
;
this
.
Jc
=
(
undefined
!=
obj
.
Jc
)
?
obj
.
Jc
:
null
;
this
.
KeepLines
=
(
undefined
!=
obj
.
KeepLines
)
?
obj
.
KeepLines
:
null
;
this
.
KeepNext
=
(
undefined
!=
obj
.
KeepNext
)
?
obj
.
KeepNext
:
null
;
this
.
PageBreakBefore
=
(
undefined
!=
obj
.
PageBreakBefore
)
?
obj
.
PageBreakBefore
:
null
;
this
.
Spacing
=
(
undefined
!=
obj
.
Spacing
&&
null
!=
obj
.
Spacing
)
?
new
AscCommon
.
asc_CParagraphSpacing
(
obj
.
Spacing
)
:
null
;
this
.
Shd
=
(
undefined
!=
obj
.
Shd
&&
null
!=
obj
.
Shd
)
?
new
Asc
.
asc_CParagraphShd
(
obj
.
Shd
)
:
null
;
this
.
WidowControl
=
(
undefined
!=
obj
.
WidowControl
)
?
obj
.
WidowControl
:
null
;
// Запрет висячих строк
this
.
Tabs
=
obj
.
Tabs
;
}
else
{
//ContextualSpacing : false, // Удалять ли интервал между параграфами одинакового стиля
//
// Ind :
// {
// Left : 0, // Левый отступ
// Right : 0, // Правый отступ
// FirstLine : 0 // Первая строка
// },
//
// Jc : align_Left, // Прилегание параграфа
//
// KeepLines : false, // переносить параграф на новую страницу,
// // если на текущей он целиком не убирается
// KeepNext : false, // переносить параграф вместе со следующим параграфом
//
// PageBreakBefore : false, // начинать параграф с новой страницы
this
.
ContextualSpacing
=
false
;
this
.
Ind
=
new
Asc
.
asc_CParagraphInd
();
this
.
Jc
=
AscCommon
.
align_Left
;
this
.
KeepLines
=
false
;
this
.
KeepNext
=
false
;
this
.
PageBreakBefore
=
false
;
this
.
Spacing
=
new
AscCommon
.
asc_CParagraphSpacing
();
this
.
Shd
=
new
Asc
.
asc_CParagraphShd
();
this
.
WidowControl
=
true
;
// Запрет висячих строк
this
.
Tabs
=
null
;
}
}
CParagraphPropEx
.
prototype
.
get_ContextualSpacing
=
function
()
{
return
this
.
ContextualSpacing
;
};
CParagraphPropEx
.
prototype
.
get_Ind
=
function
()
{
return
this
.
Ind
;
};
CParagraphPropEx
.
prototype
.
get_Jc
=
function
()
{
return
this
.
Jc
;
};
CParagraphPropEx
.
prototype
.
get_KeepLines
=
function
()
{
return
this
.
KeepLines
;
};
CParagraphPropEx
.
prototype
.
get_KeepNext
=
function
()
{
return
this
.
KeepNext
;
};
CParagraphPropEx
.
prototype
.
get_PageBreakBefore
=
function
()
{
return
this
.
PageBreakBefore
;
};
CParagraphPropEx
.
prototype
.
get_Spacing
=
function
()
{
return
this
.
Spacing
;
};
CParagraphPropEx
.
prototype
.
get_Shd
=
function
()
{
return
this
.
Shd
;
};
CParagraphPropEx
.
prototype
.
get_WidowControl
=
function
()
{
return
this
.
WidowControl
;
};
CParagraphPropEx
.
prototype
.
get_Tabs
=
function
()
{
return
this
.
Tabs
;
};
// Text properties
// TextPr :
// {
// Bold : false,
// Italic : false,
// Underline : false,
// Strikeout : false,
// FontFamily :
// {
// Name : "Times New Roman",
// Index : -1
// },
// FontSize : 12,
// Color :
// {
// r : 0,
// g : 0,
// b : 0
// },
// VertAlign : vertalign_Baseline,
// HighLight : highlight_None
// }
// CTextProp
function
CTextProp
(
obj
)
{
if
(
obj
)
{
this
.
Bold
=
(
undefined
!=
obj
.
Bold
)
?
obj
.
Bold
:
null
;
this
.
Italic
=
(
undefined
!=
obj
.
Italic
)
?
obj
.
Italic
:
null
;
this
.
Underline
=
(
undefined
!=
obj
.
Underline
)
?
obj
.
Underline
:
null
;
this
.
Strikeout
=
(
undefined
!=
obj
.
Strikeout
)
?
obj
.
Strikeout
:
null
;
this
.
FontFamily
=
(
undefined
!=
obj
.
FontFamily
&&
null
!=
obj
.
FontFamily
)
?
new
asc_CTextFontFamily
(
obj
.
FontFamily
)
:
null
;
this
.
FontSize
=
(
undefined
!=
obj
.
FontSize
)
?
obj
.
FontSize
:
null
;
this
.
Color
=
(
undefined
!=
obj
.
Color
&&
null
!=
obj
.
Color
)
?
AscCommon
.
CreateAscColorCustom
(
obj
.
Color
.
r
,
obj
.
Color
.
g
,
obj
.
Color
.
b
)
:
null
;
this
.
VertAlign
=
(
undefined
!=
obj
.
VertAlign
)
?
obj
.
VertAlign
:
null
;
this
.
HighLight
=
(
undefined
!=
obj
.
HighLight
)
?
obj
.
HighLight
==
AscCommonWord
.
highlight_None
?
obj
.
HighLight
:
new
AscCommon
.
CColor
(
obj
.
HighLight
.
r
,
obj
.
HighLight
.
g
,
obj
.
HighLight
.
b
)
:
null
;
this
.
DStrikeout
=
(
undefined
!=
obj
.
DStrikeout
)
?
obj
.
DStrikeout
:
null
;
this
.
Spacing
=
(
undefined
!=
obj
.
Spacing
)
?
obj
.
Spacing
:
null
;
this
.
Caps
=
(
undefined
!=
obj
.
Caps
)
?
obj
.
Caps
:
null
;
this
.
SmallCaps
=
(
undefined
!=
obj
.
SmallCaps
)
?
obj
.
SmallCaps
:
null
;
}
else
{
// Bold : false,
// Italic : false,
// Underline : false,
// Strikeout : false,
// FontFamily :
// {
// Name : "Times New Roman",
// Index : -1
// },
// FontSize : 12,
// Color :
// {
// r : 0,
// g : 0,
// b : 0
// },
// VertAlign : vertalign_Baseline,
// HighLight : highlight_None
this
.
Bold
=
false
;
this
.
Italic
=
false
;
this
.
Underline
=
false
;
this
.
Strikeout
=
false
;
this
.
FontFamily
=
new
asc_CTextFontFamily
();
this
.
FontSize
=
12
;
this
.
Color
=
AscCommon
.
CreateAscColorCustom
(
0
,
0
,
0
);
this
.
VertAlign
=
AscCommon
.
vertalign_Baseline
;
this
.
HighLight
=
AscCommonWord
.
highlight_None
;
this
.
DStrikeout
=
false
;
this
.
Spacing
=
0
;
this
.
Caps
=
false
;
this
.
SmallCaps
=
false
;
}
}
CTextProp
.
prototype
.
get_Bold
=
function
()
{
return
this
.
Bold
;
};
CTextProp
.
prototype
.
get_Italic
=
function
()
{
return
this
.
Italic
;
};
CTextProp
.
prototype
.
get_Underline
=
function
()
{
return
this
.
Underline
;
};
CTextProp
.
prototype
.
get_Strikeout
=
function
()
{
return
this
.
Strikeout
;
};
CTextProp
.
prototype
.
get_FontFamily
=
function
()
{
return
this
.
FontFamily
;
};
CTextProp
.
prototype
.
get_FontSize
=
function
()
{
return
this
.
FontSize
;
};
CTextProp
.
prototype
.
get_Color
=
function
()
{
return
this
.
Color
;
};
CTextProp
.
prototype
.
get_VertAlign
=
function
()
{
return
this
.
VertAlign
;
};
CTextProp
.
prototype
.
get_HighLight
=
function
()
{
return
this
.
HighLight
;
};
CTextProp
.
prototype
.
get_Spacing
=
function
()
{
return
this
.
Spacing
;
};
CTextProp
.
prototype
.
get_DStrikeout
=
function
()
{
return
this
.
DStrikeout
;
};
CTextProp
.
prototype
.
get_Caps
=
function
()
{
return
this
.
Caps
;
};
CTextProp
.
prototype
.
get_SmallCaps
=
function
()
{
return
this
.
SmallCaps
;
};
// paragraph and text properties objects container
function
CParagraphAndTextProp
(
paragraphProp
,
textProp
)
{
this
.
ParaPr
=
(
undefined
!=
paragraphProp
&&
null
!=
paragraphProp
)
?
new
CParagraphPropEx
(
paragraphProp
)
:
null
;
this
.
TextPr
=
(
undefined
!=
textProp
&&
null
!=
textProp
)
?
new
CTextProp
(
textProp
)
:
null
;
}
CParagraphAndTextProp
.
prototype
.
get_ParaPr
=
function
()
{
return
this
.
ParaPr
;
};
CParagraphAndTextProp
.
prototype
.
get_TextPr
=
function
()
{
return
this
.
TextPr
;
};
//
asc_docs_api
.
prototype
.
get_TextProps
=
function
()
{
var
Doc
=
this
.
WordControl
.
m_oLogicDocument
;
...
...
@@ -1672,7 +1431,7 @@ background-repeat: no-repeat;\
var
TextPr
=
Doc
.
Get_Paragraph_TextPr
();
// return { ParaPr: ParaPr, TextPr : TextPr };
return
new
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
};
// -------
...
...
@@ -2520,88 +2279,9 @@ background-repeat: no-repeat;\
this
.
WordControl
.
m_oDrawingDocument
.
EndTableStylesCheck
();
};
/*----------------------------------------------------------------*/
/*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
})
];
asc_docs_api
.
prototype
.
CollectHeaders
=
function
()
{
this
.
sync_ReturnHeadersCallback
(
_fakeHeaders
);
this
.
sync_ReturnHeadersCallback
(
[]
);
};
asc_docs_api
.
prototype
.
GetActiveHeader
=
function
()
{
...
...
@@ -3901,1081 +3581,250 @@ background-repeat: no-repeat;\
this
.
WordControl
.
m_oLogicDocument
.
Document_AddPageNum
(
where
,
align
);
}
}
else
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Paragraph_Content
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_AddPageNumToCurrentPos
);
this
.
WordControl
.
m_oLogicDocument
.
Document_AddPageNum
(
where
,
align
);
}
}
};
asc_docs_api
.
prototype
.
put_HeadersAndFootersDistance
=
function
(
value
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_HdrFtr
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SetHdrFtrDistance
);
this
.
WordControl
.
m_oLogicDocument
.
Document_SetHdrFtrDistance
(
value
);
}
};
asc_docs_api
.
prototype
.
HeadersAndFooters_DifferentFirstPage
=
function
(
isOn
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_HdrFtr
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SetHdrFtrFirstPage
);
this
.
WordControl
.
m_oLogicDocument
.
Document_SetHdrFtrFirstPage
(
isOn
);
}
};
asc_docs_api
.
prototype
.
HeadersAndFooters_DifferentOddandEvenPage
=
function
(
isOn
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_HdrFtr
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SetHdrFtrEvenAndOdd
);
this
.
WordControl
.
m_oLogicDocument
.
Document_SetHdrFtrEvenAndOddHeaders
(
isOn
);
}
};
asc_docs_api
.
prototype
.
HeadersAndFooters_LinkToPrevious
=
function
(
isOn
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_HdrFtr
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SetHdrFtrLink
);
this
.
WordControl
.
m_oLogicDocument
.
Document_SetHdrFtrLink
(
isOn
);
}
};
/*структура для передачи настроек колонтитулов
{
Type : hdrftr_Footer (hdrftr_Header),
Position : 12.5,
DifferentFirst : true/false,
DifferentEvenOdd : true/false,
}
*/
/*callback*/
asc_docs_api
.
prototype
.
sync_DocSizeCallback
=
function
(
width
,
height
)
{
this
.
sendEvent
(
"
asc_onDocSize
"
,
width
,
height
);
};
asc_docs_api
.
prototype
.
sync_PageOrientCallback
=
function
(
isPortrait
)
{
this
.
sendEvent
(
"
asc_onPageOrient
"
,
isPortrait
);
};
asc_docs_api
.
prototype
.
sync_HeadersAndFootersPropCallback
=
function
(
hafProp
)
{
if
(
true
===
hafProp
)
hafProp
.
Locked
=
true
;
this
.
SelectedObjectsStack
[
this
.
SelectedObjectsStack
.
length
]
=
new
asc_CSelectedObject
(
c_oAscTypeSelectElement
.
Header
,
new
CHeaderProp
(
hafProp
));
};
/*----------------------------------------------------------------*/
/*functions for working with table*/
asc_docs_api
.
prototype
.
put_Table
=
function
(
col
,
row
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_Document_Content_Add
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_AddTable
);
this
.
WordControl
.
m_oLogicDocument
.
Add_InlineTable
(
col
,
row
);
}
};
asc_docs_api
.
prototype
.
addRowAbove
=
function
(
count
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableAddRowAbove
);
this
.
WordControl
.
m_oLogicDocument
.
Table_AddRow
(
true
);
}
};
asc_docs_api
.
prototype
.
addRowBelow
=
function
(
count
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableAddRowBelow
);
this
.
WordControl
.
m_oLogicDocument
.
Table_AddRow
(
false
);
}
};
asc_docs_api
.
prototype
.
addColumnLeft
=
function
(
count
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableAddColumnLeft
);
this
.
WordControl
.
m_oLogicDocument
.
Table_AddCol
(
true
);
}
};
asc_docs_api
.
prototype
.
addColumnRight
=
function
(
count
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableAddColumnRight
);
this
.
WordControl
.
m_oLogicDocument
.
Table_AddCol
(
false
);
}
};
asc_docs_api
.
prototype
.
remRow
=
function
()
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_RemoveCells
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableRemoveRow
);
this
.
WordControl
.
m_oLogicDocument
.
Table_RemoveRow
();
}
};
asc_docs_api
.
prototype
.
remColumn
=
function
()
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_RemoveCells
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableRemoveColumn
);
this
.
WordControl
.
m_oLogicDocument
.
Table_RemoveCol
();
}
};
asc_docs_api
.
prototype
.
remTable
=
function
()
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_RemoveCells
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_RemoveTable
);
this
.
WordControl
.
m_oLogicDocument
.
Table_RemoveTable
();
}
};
asc_docs_api
.
prototype
.
selectRow
=
function
()
{
this
.
WordControl
.
m_oLogicDocument
.
Table_Select
(
c_oAscTableSelectionType
.
Row
);
};
asc_docs_api
.
prototype
.
selectColumn
=
function
()
{
this
.
WordControl
.
m_oLogicDocument
.
Table_Select
(
c_oAscTableSelectionType
.
Column
);
};
asc_docs_api
.
prototype
.
selectCell
=
function
()
{
this
.
WordControl
.
m_oLogicDocument
.
Table_Select
(
c_oAscTableSelectionType
.
Cell
);
};
asc_docs_api
.
prototype
.
selectTable
=
function
()
{
this
.
WordControl
.
m_oLogicDocument
.
Table_Select
(
c_oAscTableSelectionType
.
Table
);
};
asc_docs_api
.
prototype
.
setColumnWidth
=
function
(
width
)
{
};
asc_docs_api
.
prototype
.
setRowHeight
=
function
(
height
)
{
};
asc_docs_api
.
prototype
.
set_TblDistanceFromText
=
function
(
left
,
top
,
right
,
bottom
)
{
};
asc_docs_api
.
prototype
.
CheckBeforeMergeCells
=
function
()
{
return
this
.
WordControl
.
m_oLogicDocument
.
Table_CheckMerge
();
};
asc_docs_api
.
prototype
.
CheckBeforeSplitCells
=
function
()
{
return
this
.
WordControl
.
m_oLogicDocument
.
Table_CheckSplit
();
};
asc_docs_api
.
prototype
.
MergeCells
=
function
()
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_MergeTableCells
);
this
.
WordControl
.
m_oLogicDocument
.
Table_MergeCells
();
}
};
asc_docs_api
.
prototype
.
SplitCell
=
function
(
Cols
,
Rows
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SplitTableCells
);
this
.
WordControl
.
m_oLogicDocument
.
Table_SplitCell
(
Cols
,
Rows
);
}
};
asc_docs_api
.
prototype
.
widthTable
=
function
(
width
)
{
};
asc_docs_api
.
prototype
.
put_CellsMargin
=
function
(
left
,
top
,
right
,
bottom
)
{
};
asc_docs_api
.
prototype
.
set_TblWrap
=
function
(
type
)
{
};
asc_docs_api
.
prototype
.
set_TblIndentLeft
=
function
(
spacing
)
{
};
asc_docs_api
.
prototype
.
set_Borders
=
function
(
typeBorders
,
size
,
Color
)
{
//если size == 0 то границы нет.
};
asc_docs_api
.
prototype
.
set_TableBackground
=
function
(
Color
)
{
};
asc_docs_api
.
prototype
.
set_AlignCell
=
function
(
align
)
{
// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER
switch
(
align
)
{
case
c_oAscAlignType
.
LEFT
:
break
;
case
c_oAscAlignType
.
CENTER
:
break
;
case
c_oAscAlignType
.
RIGHT
:
break
;
}
};
asc_docs_api
.
prototype
.
set_TblAlign
=
function
(
align
)
{
// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER
switch
(
align
)
{
case
c_oAscAlignType
.
LEFT
:
break
;
case
c_oAscAlignType
.
CENTER
:
break
;
case
c_oAscAlignType
.
RIGHT
:
break
;
}
};
asc_docs_api
.
prototype
.
set_SpacingBetweenCells
=
function
(
isOn
,
spacing
)
{
// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER
if
(
isOn
)
{
}
};
// CBackground
// Value : тип заливки(прозрачная или нет),
// Color : { r : 0, g : 0, b : 0 }
function
CBackground
(
obj
)
{
if
(
obj
)
{
if
(
obj
.
Unifill
&&
obj
.
Unifill
.
fill
&&
obj
.
Unifill
.
fill
.
type
===
window
[
'
Asc
'
].
c_oAscFill
.
FILL_TYPE_SOLID
&&
obj
.
Unifill
.
fill
.
color
)
{
this
.
Color
=
AscCommon
.
CreateAscColor
(
obj
.
Unifill
.
fill
.
color
);
}
else
{
this
.
Color
=
(
undefined
!=
obj
.
Color
&&
null
!=
obj
.
Color
)
?
AscCommon
.
CreateAscColorCustom
(
obj
.
Color
.
r
,
obj
.
Color
.
g
,
obj
.
Color
.
b
)
:
null
;
}
this
.
Value
=
(
undefined
!=
obj
.
Value
)
?
obj
.
Value
:
null
;
}
else
{
this
.
Color
=
AscCommon
.
CreateAscColorCustom
(
0
,
0
,
0
);
this
.
Value
=
1
;
}
}
CBackground
.
prototype
.
get_Color
=
function
()
{
return
this
.
Color
;
};
CBackground
.
prototype
.
put_Color
=
function
(
v
)
{
this
.
Color
=
(
v
)
?
v
:
null
;
};
CBackground
.
prototype
.
get_Value
=
function
()
{
return
this
.
Value
;
};
CBackground
.
prototype
.
put_Value
=
function
(
v
)
{
this
.
Value
=
v
;
};
function
CTablePositionH
(
obj
)
{
if
(
obj
)
{
this
.
RelativeFrom
=
(
undefined
===
obj
.
RelativeFrom
)
?
Asc
.
c_oAscHAnchor
.
Margin
:
obj
.
RelativeFrom
;
this
.
UseAlign
=
(
undefined
===
obj
.
UseAlign
)
?
false
:
obj
.
UseAlign
;
this
.
Align
=
(
undefined
===
obj
.
Align
)
?
undefined
:
obj
.
Align
;
this
.
Value
=
(
undefined
===
obj
.
Value
)
?
0
:
obj
.
Value
;
}
else
{
this
.
RelativeFrom
=
Asc
.
c_oAscHAnchor
.
Column
;
this
.
UseAlign
=
false
;
this
.
Align
=
undefined
;
this
.
Value
=
0
;
}
}
CTablePositionH
.
prototype
.
get_RelativeFrom
=
function
()
{
return
this
.
RelativeFrom
;
};
CTablePositionH
.
prototype
.
put_RelativeFrom
=
function
(
v
)
{
this
.
RelativeFrom
=
v
;
};
CTablePositionH
.
prototype
.
get_UseAlign
=
function
()
{
return
this
.
UseAlign
;
};
CTablePositionH
.
prototype
.
put_UseAlign
=
function
(
v
)
{
this
.
UseAlign
=
v
;
};
CTablePositionH
.
prototype
.
get_Align
=
function
()
{
return
this
.
Align
;
};
CTablePositionH
.
prototype
.
put_Align
=
function
(
v
)
{
this
.
Align
=
v
;
};
CTablePositionH
.
prototype
.
get_Value
=
function
()
{
return
this
.
Value
;
};
CTablePositionH
.
prototype
.
put_Value
=
function
(
v
)
{
this
.
Value
=
v
;
};
function
CTablePositionV
(
obj
)
{
if
(
obj
)
{
this
.
RelativeFrom
=
(
undefined
===
obj
.
RelativeFrom
)
?
Asc
.
c_oAscVAnchor
.
Text
:
obj
.
RelativeFrom
;
this
.
UseAlign
=
(
undefined
===
obj
.
UseAlign
)
?
false
:
obj
.
UseAlign
;
this
.
Align
=
(
undefined
===
obj
.
Align
)
?
undefined
:
obj
.
Align
;
this
.
Value
=
(
undefined
===
obj
.
Value
)
?
0
:
obj
.
Value
;
}
else
{
this
.
RelativeFrom
=
Asc
.
c_oAscVAnchor
.
Text
;
this
.
UseAlign
=
false
;
this
.
Align
=
undefined
;
this
.
Value
=
0
;
}
}
CTablePositionV
.
prototype
.
get_RelativeFrom
=
function
()
{
return
this
.
RelativeFrom
;
};
CTablePositionV
.
prototype
.
put_RelativeFrom
=
function
(
v
)
{
this
.
RelativeFrom
=
v
;
};
CTablePositionV
.
prototype
.
get_UseAlign
=
function
()
{
return
this
.
UseAlign
;
};
CTablePositionV
.
prototype
.
put_UseAlign
=
function
(
v
)
{
this
.
UseAlign
=
v
;
};
CTablePositionV
.
prototype
.
get_Align
=
function
()
{
return
this
.
Align
;
};
CTablePositionV
.
prototype
.
put_Align
=
function
(
v
)
{
this
.
Align
=
v
;
};
CTablePositionV
.
prototype
.
get_Value
=
function
()
{
return
this
.
Value
;
};
CTablePositionV
.
prototype
.
put_Value
=
function
(
v
)
{
this
.
Value
=
v
;
};
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
;
};
function
CTableProp
(
tblProp
)
{
if
(
tblProp
)
{
this
.
CanBeFlow
=
(
undefined
!=
tblProp
.
CanBeFlow
?
tblProp
.
CanBeFlow
:
false
);
this
.
CellSelect
=
(
undefined
!=
tblProp
.
CellSelect
?
tblProp
.
CellSelect
:
false
);
this
.
CellSelect
=
(
undefined
!=
tblProp
.
CellSelect
)
?
tblProp
.
CellSelect
:
false
;
this
.
TableWidth
=
(
undefined
!=
tblProp
.
TableWidth
)
?
tblProp
.
TableWidth
:
null
;
this
.
TableSpacing
=
(
undefined
!=
tblProp
.
TableSpacing
)
?
tblProp
.
TableSpacing
:
null
;
this
.
TableDefaultMargins
=
(
undefined
!=
tblProp
.
TableDefaultMargins
&&
null
!=
tblProp
.
TableDefaultMargins
)
?
new
Asc
.
asc_CPaddings
(
tblProp
.
TableDefaultMargins
)
:
null
;
this
.
CellMargins
=
(
undefined
!=
tblProp
.
CellMargins
&&
null
!=
tblProp
.
CellMargins
)
?
new
CMargins
(
tblProp
.
CellMargins
)
:
null
;
this
.
TableAlignment
=
(
undefined
!=
tblProp
.
TableAlignment
)
?
tblProp
.
TableAlignment
:
null
;
this
.
TableIndent
=
(
undefined
!=
tblProp
.
TableIndent
)
?
tblProp
.
TableIndent
:
null
;
this
.
TableWrappingStyle
=
(
undefined
!=
tblProp
.
TableWrappingStyle
)
?
tblProp
.
TableWrappingStyle
:
null
;
this
.
TablePaddings
=
(
undefined
!=
tblProp
.
TablePaddings
&&
null
!=
tblProp
.
TablePaddings
)
?
new
Asc
.
asc_CPaddings
(
tblProp
.
TablePaddings
)
:
null
;
this
.
TableBorders
=
(
undefined
!=
tblProp
.
TableBorders
&&
null
!=
tblProp
.
TableBorders
)
?
new
CBorders
(
tblProp
.
TableBorders
)
:
null
;
this
.
CellBorders
=
(
undefined
!=
tblProp
.
CellBorders
&&
null
!=
tblProp
.
CellBorders
)
?
new
CBorders
(
tblProp
.
CellBorders
)
:
null
;
this
.
TableBackground
=
(
undefined
!=
tblProp
.
TableBackground
&&
null
!=
tblProp
.
TableBackground
)
?
new
CBackground
(
tblProp
.
TableBackground
)
:
null
;
this
.
CellsBackground
=
(
undefined
!=
tblProp
.
CellsBackground
&&
null
!=
tblProp
.
CellsBackground
)
?
new
CBackground
(
tblProp
.
CellsBackground
)
:
null
;
this
.
Position
=
(
undefined
!=
tblProp
.
Position
&&
null
!=
tblProp
.
Position
)
?
new
Asc
.
CPosition
(
tblProp
.
Position
)
:
null
;
this
.
PositionH
=
(
undefined
!=
tblProp
.
PositionH
&&
null
!=
tblProp
.
PositionH
)
?
new
CTablePositionH
(
tblProp
.
PositionH
)
:
undefined
;
this
.
PositionV
=
(
undefined
!=
tblProp
.
PositionV
&&
null
!=
tblProp
.
PositionV
)
?
new
CTablePositionV
(
tblProp
.
PositionV
)
:
undefined
;
this
.
Internal_Position
=
(
undefined
!=
tblProp
.
Internal_Position
)
?
tblProp
.
Internal_Position
:
undefined
;
this
.
ForSelectedCells
=
(
undefined
!=
tblProp
.
ForSelectedCells
)
?
tblProp
.
ForSelectedCells
:
true
;
this
.
TableStyle
=
(
undefined
!=
tblProp
.
TableStyle
)
?
tblProp
.
TableStyle
:
null
;
this
.
TableLook
=
(
undefined
!=
tblProp
.
TableLook
)
?
new
CTablePropLook
(
tblProp
.
TableLook
)
:
null
;
this
.
RowsInHeader
=
(
undefined
!=
tblProp
.
RowsInHeader
)
?
tblProp
.
RowsInHeader
:
0
;
this
.
CellsVAlign
=
(
undefined
!=
tblProp
.
CellsVAlign
)
?
tblProp
.
CellsVAlign
:
c_oAscVertAlignJc
.
Top
;
this
.
AllowOverlap
=
(
undefined
!=
tblProp
.
AllowOverlap
)
?
tblProp
.
AllowOverlap
:
undefined
;
this
.
TableLayout
=
tblProp
.
TableLayout
;
this
.
CellsTextDirection
=
tblProp
.
CellsTextDirection
;
this
.
CellsNoWrap
=
tblProp
.
CellsNoWrap
;
this
.
CellsWidth
=
tblProp
.
CellsWidth
;
this
.
CellsWidthNotEqual
=
tblProp
.
CellsWidthNotEqual
;
this
.
Locked
=
(
undefined
!=
tblProp
.
Locked
)
?
tblProp
.
Locked
:
false
;
this
.
PercentFullWidth
=
tblProp
.
PercentFullWidth
;
this
.
TableDescription
=
tblProp
.
TableDescription
;
this
.
TableCaption
=
tblProp
.
TableCaption
;
}
else
{
//Все свойства класса CTableProp должны быть undefined если они не изменялись
//this.CanBeFlow = false;
this
.
CellSelect
=
false
;
//обязательное свойство
/*this.TableWidth = null;
this.TableSpacing = null;
this.TableDefaultMargins = new Asc.asc_CPaddings ();
this.CellMargins = new CMargins ();
this.TableAlignment = 0;
this.TableIndent = 0;
this.TableWrappingStyle = c_oAscWrapStyle.Inline;
this.TablePaddings = new Asc.asc_CPaddings ();
this.TableBorders = new CBorders ();
this.CellBorders = new CBorders ();
this.TableBackground = new CBackground ();
this.CellsBackground = new CBackground ();;
this.Position = new CPosition ();
this.ForSelectedCells = true;*/
this
.
Locked
=
false
;
}
}
CTableProp
.
prototype
.
get_Width
=
function
()
{
return
this
.
TableWidth
;
};
CTableProp
.
prototype
.
put_Width
=
function
(
v
)
{
this
.
TableWidth
=
v
;
};
CTableProp
.
prototype
.
get_Spacing
=
function
()
{
return
this
.
TableSpacing
;
};
CTableProp
.
prototype
.
put_Spacing
=
function
(
v
)
{
this
.
TableSpacing
=
v
;
};
CTableProp
.
prototype
.
get_DefaultMargins
=
function
()
{
return
this
.
TableDefaultMargins
;
};
CTableProp
.
prototype
.
put_DefaultMargins
=
function
(
v
)
{
this
.
TableDefaultMargins
=
v
;
};
CTableProp
.
prototype
.
get_CellMargins
=
function
()
{
return
this
.
CellMargins
;
};
CTableProp
.
prototype
.
put_CellMargins
=
function
(
v
)
{
this
.
CellMargins
=
v
;
};
CTableProp
.
prototype
.
get_TableAlignment
=
function
()
{
return
this
.
TableAlignment
;
};
CTableProp
.
prototype
.
put_TableAlignment
=
function
(
v
)
{
this
.
TableAlignment
=
v
;
};
CTableProp
.
prototype
.
get_TableIndent
=
function
()
{
return
this
.
TableIndent
;
};
CTableProp
.
prototype
.
put_TableIndent
=
function
(
v
)
{
this
.
TableIndent
=
v
;
};
CTableProp
.
prototype
.
get_TableWrap
=
function
()
{
return
this
.
TableWrappingStyle
;
};
CTableProp
.
prototype
.
put_TableWrap
=
function
(
v
)
{
this
.
TableWrappingStyle
=
v
;
};
CTableProp
.
prototype
.
get_TablePaddings
=
function
()
{
return
this
.
TablePaddings
;
};
CTableProp
.
prototype
.
put_TablePaddings
=
function
(
v
)
{
this
.
TablePaddings
=
v
;
};
CTableProp
.
prototype
.
get_TableBorders
=
function
()
{
return
this
.
TableBorders
;
};
CTableProp
.
prototype
.
put_TableBorders
=
function
(
v
)
{
this
.
TableBorders
=
v
;
};
CTableProp
.
prototype
.
get_CellBorders
=
function
()
{
return
this
.
CellBorders
;
};
CTableProp
.
prototype
.
put_CellBorders
=
function
(
v
)
{
this
.
CellBorders
=
v
;
};
CTableProp
.
prototype
.
get_TableBackground
=
function
()
{
return
this
.
TableBackground
;
};
CTableProp
.
prototype
.
put_TableBackground
=
function
(
v
)
{
this
.
TableBackground
=
v
;
};
CTableProp
.
prototype
.
get_CellsBackground
=
function
()
{
return
this
.
CellsBackground
;
};
CTableProp
.
prototype
.
put_CellsBackground
=
function
(
v
)
{
this
.
CellsBackground
=
v
;
};
CTableProp
.
prototype
.
get_Position
=
function
()
{
return
this
.
Position
;
};
CTableProp
.
prototype
.
put_Position
=
function
(
v
)
{
this
.
Position
=
v
;
};
CTableProp
.
prototype
.
get_PositionH
=
function
()
{
return
this
.
PositionH
;
};
CTableProp
.
prototype
.
put_PositionH
=
function
(
v
)
{
this
.
PositionH
=
v
;
};
CTableProp
.
prototype
.
get_PositionV
=
function
()
{
return
this
.
PositionV
;
};
CTableProp
.
prototype
.
put_PositionV
=
function
(
v
)
{
this
.
PositionV
=
v
;
};
CTableProp
.
prototype
.
get_Value_X
=
function
(
RelativeFrom
)
{
if
(
undefined
!=
this
.
Internal_Position
)
return
this
.
Internal_Position
.
Calculate_X_Value
(
RelativeFrom
);
return
0
;
};
CTableProp
.
prototype
.
get_Value_Y
=
function
(
RelativeFrom
)
{
if
(
undefined
!=
this
.
Internal_Position
)
return
this
.
Internal_Position
.
Calculate_Y_Value
(
RelativeFrom
);
return
0
;
};
CTableProp
.
prototype
.
get_ForSelectedCells
=
function
()
{
return
this
.
ForSelectedCells
;
};
CTableProp
.
prototype
.
put_ForSelectedCells
=
function
(
v
)
{
this
.
ForSelectedCells
=
v
;
};
CTableProp
.
prototype
.
put_CellSelect
=
function
(
v
)
{
this
.
CellSelect
=
v
;
};
CTableProp
.
prototype
.
get_CellSelect
=
function
()
{
return
this
.
CellSelect
};
CTableProp
.
prototype
.
get_CanBeFlow
=
function
()
{
return
this
.
CanBeFlow
;
};
CTableProp
.
prototype
.
get_RowsInHeader
=
function
()
{
return
this
.
RowsInHeader
;
};
CTableProp
.
prototype
.
put_RowsInHeader
=
function
(
v
)
{
this
.
RowsInHeader
=
v
;
};
CTableProp
.
prototype
.
get_Locked
=
function
()
{
return
this
.
Locked
;
};
CTableProp
.
prototype
.
get_CellsVAlign
=
function
()
{
return
this
.
CellsVAlign
;
};
CTableProp
.
prototype
.
put_CellsVAlign
=
function
(
v
)
{
this
.
CellsVAlign
=
v
;
};
CTableProp
.
prototype
.
get_TableLook
=
function
()
{
return
this
.
TableLook
;
};
CTableProp
.
prototype
.
put_TableLook
=
function
(
v
)
{
this
.
TableLook
=
v
;
};
CTableProp
.
prototype
.
get_TableStyle
=
function
()
{
return
this
.
TableStyle
;
};
CTableProp
.
prototype
.
put_TableStyle
=
function
(
v
)
{
this
.
TableStyle
=
v
;
};
CTableProp
.
prototype
.
get_AllowOverlap
=
function
()
{
return
this
.
AllowOverlap
;
};
CTableProp
.
prototype
.
put_AllowOverlap
=
function
(
v
)
{
this
.
AllowOverlap
=
v
;
};
CTableProp
.
prototype
.
get_TableLayout
=
function
()
{
return
this
.
TableLayout
;
};
CTableProp
.
prototype
.
put_TableLayout
=
function
(
v
)
{
this
.
TableLayout
=
v
;
else
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Paragraph_Content
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_AddPageNumToCurrentPos
);
this
.
WordControl
.
m_oLogicDocument
.
Document_AddPageNum
(
where
,
align
);
}
}
};
CTableProp
.
prototype
.
get_CellsTextDirection
=
function
()
asc_docs_api
.
prototype
.
put_HeadersAndFootersDistance
=
function
(
value
)
{
return
this
.
CellsTextDirection
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_HdrFtr
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SetHdrFtrDistance
);
this
.
WordControl
.
m_oLogicDocument
.
Document_SetHdrFtrDistance
(
value
);
}
};
CTableProp
.
prototype
.
put_CellsTextDirection
=
function
(
v
)
asc_docs_api
.
prototype
.
HeadersAndFooters_DifferentFirstPage
=
function
(
isOn
)
{
this
.
CellsTextDirection
=
v
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_HdrFtr
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SetHdrFtrFirstPage
);
this
.
WordControl
.
m_oLogicDocument
.
Document_SetHdrFtrFirstPage
(
isOn
);
}
};
CTableProp
.
prototype
.
get_CellsNoWrap
=
function
()
asc_docs_api
.
prototype
.
HeadersAndFooters_DifferentOddandEvenPage
=
function
(
isOn
)
{
return
this
.
CellsNoWrap
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_HdrFtr
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SetHdrFtrEvenAndOdd
);
this
.
WordControl
.
m_oLogicDocument
.
Document_SetHdrFtrEvenAndOddHeaders
(
isOn
);
}
};
CTableProp
.
prototype
.
put_CellsNoWrap
=
function
(
v
)
asc_docs_api
.
prototype
.
HeadersAndFooters_LinkToPrevious
=
function
(
isOn
)
{
this
.
CellsNoWrap
=
v
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_HdrFtr
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SetHdrFtrLink
);
this
.
WordControl
.
m_oLogicDocument
.
Document_SetHdrFtrLink
(
isOn
);
}
};
CTableProp
.
prototype
.
get_CellsWidth
=
function
()
/*структура для передачи настроек колонтитулов
{
Type : hdrftr_Footer (hdrftr_Header),
Position : 12.5,
DifferentFirst : true/false,
DifferentEvenOdd : true/false,
}
*/
/*callback*/
asc_docs_api
.
prototype
.
sync_DocSizeCallback
=
function
(
width
,
height
)
{
return
this
.
CellsWidth
;
this
.
sendEvent
(
"
asc_onDocSize
"
,
width
,
height
)
;
};
CTableProp
.
prototype
.
put_CellsWidth
=
function
(
v
)
asc_docs_api
.
prototype
.
sync_PageOrientCallback
=
function
(
isPortrait
)
{
this
.
CellsWidth
=
v
;
this
.
sendEvent
(
"
asc_onPageOrient
"
,
isPortrait
)
;
};
CTableProp
.
prototype
.
get_PercentFullWidth
=
function
(
)
asc_docs_api
.
prototype
.
sync_HeadersAndFootersPropCallback
=
function
(
hafProp
)
{
return
this
.
PercentFullWidth
;
if
(
true
===
hafProp
)
hafProp
.
Locked
=
true
;
this
.
SelectedObjectsStack
[
this
.
SelectedObjectsStack
.
length
]
=
new
asc_CSelectedObject
(
c_oAscTypeSelectElement
.
Header
,
new
CHeaderProp
(
hafProp
));
};
CTableProp
.
prototype
.
get_CellsWidthNotEqual
=
function
()
/*----------------------------------------------------------------*/
/*functions for working with table*/
asc_docs_api
.
prototype
.
put_Table
=
function
(
col
,
row
)
{
return
this
.
CellsWidthNotEqual
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_Document_Content_Add
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_AddTable
);
this
.
WordControl
.
m_oLogicDocument
.
Add_InlineTable
(
col
,
row
);
}
};
CTableProp
.
prototype
.
get_TableDescription
=
function
(
)
asc_docs_api
.
prototype
.
addRowAbove
=
function
(
count
)
{
return
this
.
TableDescription
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableAddRowAbove
);
this
.
WordControl
.
m_oLogicDocument
.
Table_AddRow
(
true
);
}
};
CTableProp
.
prototype
.
put_TableDescription
=
function
(
v
)
asc_docs_api
.
prototype
.
addRowBelow
=
function
(
count
)
{
this
.
TableDescription
=
v
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableAddRowBelow
);
this
.
WordControl
.
m_oLogicDocument
.
Table_AddRow
(
false
);
}
};
CTableProp
.
prototype
.
get_TableCaption
=
function
(
)
asc_docs_api
.
prototype
.
addColumnLeft
=
function
(
count
)
{
return
this
.
TableCaption
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableAddColumnLeft
);
this
.
WordControl
.
m_oLogicDocument
.
Table_AddCol
(
true
);
}
};
CTableProp
.
prototype
.
put_TableCaption
=
function
(
v
)
asc_docs_api
.
prototype
.
addColumnRight
=
function
(
count
)
{
this
.
TableCaption
=
v
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableAddColumnRight
);
this
.
WordControl
.
m_oLogicDocument
.
Table_AddCol
(
false
);
}
};
function
CBorders
(
obj
)
asc_docs_api
.
prototype
.
remRow
=
function
()
{
if
(
obj
)
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_RemoveCells
)
)
{
this
.
Left
=
(
undefined
!=
obj
.
Left
&&
null
!=
obj
.
Left
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Left
)
:
null
;
this
.
Top
=
(
undefined
!=
obj
.
Top
&&
null
!=
obj
.
Top
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Top
)
:
null
;
this
.
Right
=
(
undefined
!=
obj
.
Right
&&
null
!=
obj
.
Right
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Right
)
:
null
;
this
.
Bottom
=
(
undefined
!=
obj
.
Bottom
&&
null
!=
obj
.
Bottom
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Bottom
)
:
null
;
this
.
InsideH
=
(
undefined
!=
obj
.
InsideH
&&
null
!=
obj
.
InsideH
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
InsideH
)
:
null
;
this
.
InsideV
=
(
undefined
!=
obj
.
InsideV
&&
null
!=
obj
.
InsideV
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
InsideV
)
:
null
;
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableRemoveRow
);
this
.
WordControl
.
m_oLogicDocument
.
Table_RemoveRow
();
}
//Все свойства класса CBorders должны быть undefined если они не изменялись
/*else
{
this.Left = null;
this.Top = null;
this.Right = null;
this.Bottom = null;
this.InsideH = null;
this.InsideV = null;
}*/
}
CBorders
.
prototype
.
get_Left
=
function
()
{
return
this
.
Left
;
};
CBorders
.
prototype
.
put_Left
=
function
(
v
)
asc_docs_api
.
prototype
.
remColumn
=
function
(
)
{
this
.
Left
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_RemoveCells
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_TableRemoveColumn
);
this
.
WordControl
.
m_oLogicDocument
.
Table_RemoveCol
();
}
};
CBorders
.
prototype
.
get_Top
=
function
()
asc_docs_api
.
prototype
.
remTable
=
function
()
{
return
this
.
Top
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_RemoveCells
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_RemoveTable
);
this
.
WordControl
.
m_oLogicDocument
.
Table_RemoveTable
();
}
};
CBorders
.
prototype
.
put_Top
=
function
(
v
)
asc_docs_api
.
prototype
.
selectRow
=
function
(
)
{
this
.
Top
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
this
.
WordControl
.
m_oLogicDocument
.
Table_Select
(
c_oAscTableSelectionType
.
Row
)
;
};
CBorders
.
prototype
.
get_Right
=
function
()
asc_docs_api
.
prototype
.
selectColumn
=
function
()
{
return
this
.
Right
;
this
.
WordControl
.
m_oLogicDocument
.
Table_Select
(
c_oAscTableSelectionType
.
Column
)
;
};
CBorders
.
prototype
.
put_Right
=
function
(
v
)
asc_docs_api
.
prototype
.
selectCell
=
function
(
)
{
this
.
Right
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
this
.
WordControl
.
m_oLogicDocument
.
Table_Select
(
c_oAscTableSelectionType
.
Cell
)
;
};
CBorders
.
prototype
.
get_Bottom
=
function
()
asc_docs_api
.
prototype
.
selectTable
=
function
()
{
return
this
.
Bottom
;
this
.
WordControl
.
m_oLogicDocument
.
Table_Select
(
c_oAscTableSelectionType
.
Table
)
;
};
CBorders
.
prototype
.
put_Bottom
=
function
(
v
)
asc_docs_api
.
prototype
.
setColumnWidth
=
function
(
width
)
{
this
.
Bottom
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
};
CBorders
.
prototype
.
get_InsideH
=
function
(
)
asc_docs_api
.
prototype
.
setRowHeight
=
function
(
height
)
{
return
this
.
InsideH
;
};
CBorders
.
prototype
.
put_InsideH
=
function
(
v
)
asc_docs_api
.
prototype
.
set_TblDistanceFromText
=
function
(
left
,
top
,
right
,
bottom
)
{
this
.
InsideH
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
};
CBorders
.
prototype
.
get_InsideV
=
function
()
asc_docs_api
.
prototype
.
CheckBeforeMergeCells
=
function
()
{
return
this
.
InsideV
;
return
this
.
WordControl
.
m_oLogicDocument
.
Table_CheckMerge
()
;
};
CBorders
.
prototype
.
put_InsideV
=
function
(
v
)
asc_docs_api
.
prototype
.
CheckBeforeSplitCells
=
function
(
)
{
this
.
InsideV
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
return
this
.
WordControl
.
m_oLogicDocument
.
Table_CheckSplit
()
;
};
// CMargins
function
CMargins
(
obj
)
asc_docs_api
.
prototype
.
MergeCells
=
function
()
{
if
(
obj
)
{
this
.
Left
=
(
undefined
!=
obj
.
Left
)
?
obj
.
Left
:
null
;
this
.
Right
=
(
undefined
!=
obj
.
Right
)
?
obj
.
Right
:
null
;
this
.
Top
=
(
undefined
!=
obj
.
Top
)
?
obj
.
Top
:
null
;
this
.
Bottom
=
(
undefined
!=
obj
.
Bottom
)
?
obj
.
Bottom
:
null
;
this
.
Flag
=
(
undefined
!=
obj
.
Flag
)
?
obj
.
Flag
:
null
;
}
else
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
Left
=
null
;
this
.
Right
=
null
;
this
.
Top
=
null
;
this
.
Bottom
=
null
;
this
.
Flag
=
null
;
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_MergeTableCells
);
this
.
WordControl
.
m_oLogicDocument
.
Table_MergeCells
();
}
}
CMargins
.
prototype
.
get_Left
=
function
()
{
return
this
.
Left
;
};
CMargins
.
prototype
.
put_Left
=
function
(
v
)
asc_docs_api
.
prototype
.
SplitCell
=
function
(
Cols
,
Rows
)
{
this
.
Left
=
v
;
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SplitTableCells
);
this
.
WordControl
.
m_oLogicDocument
.
Table_SplitCell
(
Cols
,
Rows
);
}
};
CMargins
.
prototype
.
get_Right
=
function
(
)
asc_docs_api
.
prototype
.
widthTable
=
function
(
width
)
{
return
this
.
Right
;
};
CMargins
.
prototype
.
put_Right
=
function
(
v
)
asc_docs_api
.
prototype
.
put_CellsMargin
=
function
(
left
,
top
,
right
,
bottom
)
{
this
.
Right
=
v
;
};
CMargins
.
prototype
.
get_Top
=
function
(
)
asc_docs_api
.
prototype
.
set_TblWrap
=
function
(
type
)
{
return
this
.
Top
;
};
CMargins
.
prototype
.
put_Top
=
function
(
v
)
asc_docs_api
.
prototype
.
set_TblIndentLeft
=
function
(
spacing
)
{
this
.
Top
=
v
;
};
CMargins
.
prototype
.
get_Bottom
=
function
(
)
{
return
this
.
Bottom
;
asc_docs_api
.
prototype
.
set_Borders
=
function
(
typeBorders
,
size
,
Color
)
{
//если size == 0 то границы нет.
};
CMargins
.
prototype
.
put_Bottom
=
function
(
v
)
asc_docs_api
.
prototype
.
set_TableBackground
=
function
(
Color
)
{
this
.
Bottom
=
v
;
};
CMargins
.
prototype
.
get_Flag
=
function
()
{
return
this
.
Flag
;
asc_docs_api
.
prototype
.
set_AlignCell
=
function
(
align
)
{
// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER
switch
(
align
)
{
case
c_oAscAlignType
.
LEFT
:
break
;
case
c_oAscAlignType
.
CENTER
:
break
;
case
c_oAscAlignType
.
RIGHT
:
break
;
}
};
CMargins
.
prototype
.
put_Flag
=
function
(
v
)
{
this
.
Flag
=
v
;
asc_docs_api
.
prototype
.
set_TblAlign
=
function
(
align
)
{
// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER
switch
(
align
)
{
case
c_oAscAlignType
.
LEFT
:
break
;
case
c_oAscAlignType
.
CENTER
:
break
;
case
c_oAscAlignType
.
RIGHT
:
break
;
}
};
asc_docs_api
.
prototype
.
set_SpacingBetweenCells
=
function
(
isOn
,
spacing
)
{
// c_oAscAlignType.RIGHT, c_oAscAlignType.LEFT, c_oAscAlignType.CENTER
if
(
isOn
)
{
/*
{
TableWidth : null - галочка убрана, либо заданное значение в мм
TableSpacing : null - галочка убрана, либо заданное значение в мм
TableDefaultMargins : // маргины для всей таблицы(значение по умолчанию)
{
Left : 1.9,
Right : 1.9,
Top : 0,
Bottom : 0
}
CellMargins :
{
Left : 1.9, (null - неопределенное значение)
Right : 1.9, (null - неопределенное значение)
Top : 0, (null - неопределенное значение)
Bottom : 0, (null - неопределенное значение)
Flag : 0 - У всех выделенных ячеек значение берется из TableDefaultMargins
1 - У выделенных ячеек есть ячейки с дефолтовыми значениями, и есть со своими собственными
2 - У всех ячеек свои собственные значения
}
TableAlignment : 0, 1, 2 (слева, по центру, справа)
TableIndent : значение в мм,
TableWrappingStyle : 0, 1 (inline, flow)
TablePaddings:
{
Left : 3.2,
Right : 3.2,
Top : 0,
Bottom : 0
}
TableBorders : // границы таблицы
{
Bottom :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Left :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Right :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Top :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
InsideH :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
InsideV :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
}
}
CellBorders : // границы выделенных ячеек
{
ForSelectedCells : true,
Bottom :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Left :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Right :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Top :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
InsideH : // данного элемента может не быть, если у выделенных ячеек
// нет горизонтальных внутренних границ
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
InsideV : // данного элемента может не быть, если у выделенных ячеек
// нет вертикальных внутренних границ
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
}
}
TableBackground :
{
Value : тип заливки(прозрачная или нет),
Color : { r : 0, g : 0, b : 0 }
}
CellsBackground : null если заливка не определена для выделенных ячеек
{
Value : тип заливки(прозрачная или нет),
Color : { r : 0, g : 0, b : 0 }
}
Position:
{
X:0,
Y:0
}
}
*/
}
};
asc_docs_api
.
prototype
.
tblApply
=
function
(
obj
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Table_Properties
))
...
...
@@ -9013,32 +7862,6 @@ background-repeat: no-repeat;\
// mobile
asc_docs_api
.
prototype
[
"
asc_GetDefaultTableStyles
"
]
=
asc_docs_api
.
prototype
.
asc_GetDefaultTableStyles
;
asc_docs_api
.
prototype
[
"
asc_Remove
"
]
=
asc_docs_api
.
prototype
.
asc_Remove
;
CParagraphPropEx
.
prototype
[
'
get_ContextualSpacing
'
]
=
CParagraphPropEx
.
prototype
.
get_ContextualSpacing
;
CParagraphPropEx
.
prototype
[
'
get_Ind
'
]
=
CParagraphPropEx
.
prototype
.
get_Ind
;
CParagraphPropEx
.
prototype
[
'
get_Jc
'
]
=
CParagraphPropEx
.
prototype
.
get_Jc
;
CParagraphPropEx
.
prototype
[
'
get_KeepLines
'
]
=
CParagraphPropEx
.
prototype
.
get_KeepLines
;
CParagraphPropEx
.
prototype
[
'
get_KeepNext
'
]
=
CParagraphPropEx
.
prototype
.
get_KeepNext
;
CParagraphPropEx
.
prototype
[
'
get_PageBreakBefore
'
]
=
CParagraphPropEx
.
prototype
.
get_PageBreakBefore
;
CParagraphPropEx
.
prototype
[
'
get_Spacing
'
]
=
CParagraphPropEx
.
prototype
.
get_Spacing
;
CParagraphPropEx
.
prototype
[
'
get_Shd
'
]
=
CParagraphPropEx
.
prototype
.
get_Shd
;
CParagraphPropEx
.
prototype
[
'
get_WidowControl
'
]
=
CParagraphPropEx
.
prototype
.
get_WidowControl
;
CParagraphPropEx
.
prototype
[
'
get_Tabs
'
]
=
CParagraphPropEx
.
prototype
.
get_Tabs
;
CTextProp
.
prototype
[
'
get_Bold
'
]
=
CTextProp
.
prototype
.
get_Bold
;
CTextProp
.
prototype
[
'
get_Italic
'
]
=
CTextProp
.
prototype
.
get_Italic
;
CTextProp
.
prototype
[
'
get_Underline
'
]
=
CTextProp
.
prototype
.
get_Underline
;
CTextProp
.
prototype
[
'
get_Strikeout
'
]
=
CTextProp
.
prototype
.
get_Strikeout
;
CTextProp
.
prototype
[
'
get_FontFamily
'
]
=
CTextProp
.
prototype
.
get_FontFamily
;
CTextProp
.
prototype
[
'
get_FontSize
'
]
=
CTextProp
.
prototype
.
get_FontSize
;
CTextProp
.
prototype
[
'
get_Color
'
]
=
CTextProp
.
prototype
.
get_Color
;
CTextProp
.
prototype
[
'
get_VertAlign
'
]
=
CTextProp
.
prototype
.
get_VertAlign
;
CTextProp
.
prototype
[
'
get_HighLight
'
]
=
CTextProp
.
prototype
.
get_HighLight
;
CTextProp
.
prototype
[
'
get_Spacing
'
]
=
CTextProp
.
prototype
.
get_Spacing
;
CTextProp
.
prototype
[
'
get_DStrikeout
'
]
=
CTextProp
.
prototype
.
get_DStrikeout
;
CTextProp
.
prototype
[
'
get_Caps
'
]
=
CTextProp
.
prototype
.
get_Caps
;
CTextProp
.
prototype
[
'
get_SmallCaps
'
]
=
CTextProp
.
prototype
.
get_SmallCaps
;
CParagraphAndTextProp
.
prototype
[
'
get_ParaPr
'
]
=
CParagraphAndTextProp
.
prototype
.
get_ParaPr
;
CParagraphAndTextProp
.
prototype
[
'
get_TextPr
'
]
=
CParagraphAndTextProp
.
prototype
.
get_TextPr
;
CDocInfoProp
.
prototype
[
'
get_PageCount
'
]
=
CDocInfoProp
.
prototype
.
get_PageCount
;
CDocInfoProp
.
prototype
[
'
put_PageCount
'
]
=
CDocInfoProp
.
prototype
.
put_PageCount
;
CDocInfoProp
.
prototype
[
'
get_WordsCount
'
]
=
CDocInfoProp
.
prototype
.
get_WordsCount
;
...
...
@@ -9049,135 +7872,6 @@ 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
;
window
[
'
Asc
'
][
'
CBackground
'
]
=
window
[
'
Asc
'
].
CBackground
=
CBackground
;
CBackground
.
prototype
[
'
get_Color
'
]
=
CBackground
.
prototype
.
get_Color
;
CBackground
.
prototype
[
'
put_Color
'
]
=
CBackground
.
prototype
.
put_Color
;
CBackground
.
prototype
[
'
get_Value
'
]
=
CBackground
.
prototype
.
get_Value
;
CBackground
.
prototype
[
'
put_Value
'
]
=
CBackground
.
prototype
.
put_Value
;
window
[
'
Asc
'
][
'
CTablePositionH
'
]
=
CTablePositionH
;
CTablePositionH
.
prototype
[
'
get_RelativeFrom
'
]
=
CTablePositionH
.
prototype
.
get_RelativeFrom
;
CTablePositionH
.
prototype
[
'
put_RelativeFrom
'
]
=
CTablePositionH
.
prototype
.
put_RelativeFrom
;
CTablePositionH
.
prototype
[
'
get_UseAlign
'
]
=
CTablePositionH
.
prototype
.
get_UseAlign
;
CTablePositionH
.
prototype
[
'
put_UseAlign
'
]
=
CTablePositionH
.
prototype
.
put_UseAlign
;
CTablePositionH
.
prototype
[
'
get_Align
'
]
=
CTablePositionH
.
prototype
.
get_Align
;
CTablePositionH
.
prototype
[
'
put_Align
'
]
=
CTablePositionH
.
prototype
.
put_Align
;
CTablePositionH
.
prototype
[
'
get_Value
'
]
=
CTablePositionH
.
prototype
.
get_Value
;
CTablePositionH
.
prototype
[
'
put_Value
'
]
=
CTablePositionH
.
prototype
.
put_Value
;
window
[
'
Asc
'
][
'
CTablePositionV
'
]
=
CTablePositionV
;
CTablePositionV
.
prototype
[
'
get_RelativeFrom
'
]
=
CTablePositionV
.
prototype
.
get_RelativeFrom
;
CTablePositionV
.
prototype
[
'
put_RelativeFrom
'
]
=
CTablePositionV
.
prototype
.
put_RelativeFrom
;
CTablePositionV
.
prototype
[
'
get_UseAlign
'
]
=
CTablePositionV
.
prototype
.
get_UseAlign
;
CTablePositionV
.
prototype
[
'
put_UseAlign
'
]
=
CTablePositionV
.
prototype
.
put_UseAlign
;
CTablePositionV
.
prototype
[
'
get_Align
'
]
=
CTablePositionV
.
prototype
.
get_Align
;
CTablePositionV
.
prototype
[
'
put_Align
'
]
=
CTablePositionV
.
prototype
.
put_Align
;
CTablePositionV
.
prototype
[
'
get_Value
'
]
=
CTablePositionV
.
prototype
.
get_Value
;
CTablePositionV
.
prototype
[
'
put_Value
'
]
=
CTablePositionV
.
prototype
.
put_Value
;
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
[
'
Asc
'
][
'
CTableProp
'
]
=
window
[
'
Asc
'
].
CTableProp
=
CTableProp
;
CTableProp
.
prototype
[
'
get_Width
'
]
=
CTableProp
.
prototype
.
get_Width
;
CTableProp
.
prototype
[
'
put_Width
'
]
=
CTableProp
.
prototype
.
put_Width
;
CTableProp
.
prototype
[
'
get_Spacing
'
]
=
CTableProp
.
prototype
.
get_Spacing
;
CTableProp
.
prototype
[
'
put_Spacing
'
]
=
CTableProp
.
prototype
.
put_Spacing
;
CTableProp
.
prototype
[
'
get_DefaultMargins
'
]
=
CTableProp
.
prototype
.
get_DefaultMargins
;
CTableProp
.
prototype
[
'
put_DefaultMargins
'
]
=
CTableProp
.
prototype
.
put_DefaultMargins
;
CTableProp
.
prototype
[
'
get_CellMargins
'
]
=
CTableProp
.
prototype
.
get_CellMargins
;
CTableProp
.
prototype
[
'
put_CellMargins
'
]
=
CTableProp
.
prototype
.
put_CellMargins
;
CTableProp
.
prototype
[
'
get_TableAlignment
'
]
=
CTableProp
.
prototype
.
get_TableAlignment
;
CTableProp
.
prototype
[
'
put_TableAlignment
'
]
=
CTableProp
.
prototype
.
put_TableAlignment
;
CTableProp
.
prototype
[
'
get_TableIndent
'
]
=
CTableProp
.
prototype
.
get_TableIndent
;
CTableProp
.
prototype
[
'
put_TableIndent
'
]
=
CTableProp
.
prototype
.
put_TableIndent
;
CTableProp
.
prototype
[
'
get_TableWrap
'
]
=
CTableProp
.
prototype
.
get_TableWrap
;
CTableProp
.
prototype
[
'
put_TableWrap
'
]
=
CTableProp
.
prototype
.
put_TableWrap
;
CTableProp
.
prototype
[
'
get_TablePaddings
'
]
=
CTableProp
.
prototype
.
get_TablePaddings
;
CTableProp
.
prototype
[
'
put_TablePaddings
'
]
=
CTableProp
.
prototype
.
put_TablePaddings
;
CTableProp
.
prototype
[
'
get_TableBorders
'
]
=
CTableProp
.
prototype
.
get_TableBorders
;
CTableProp
.
prototype
[
'
put_TableBorders
'
]
=
CTableProp
.
prototype
.
put_TableBorders
;
CTableProp
.
prototype
[
'
get_CellBorders
'
]
=
CTableProp
.
prototype
.
get_CellBorders
;
CTableProp
.
prototype
[
'
put_CellBorders
'
]
=
CTableProp
.
prototype
.
put_CellBorders
;
CTableProp
.
prototype
[
'
get_TableBackground
'
]
=
CTableProp
.
prototype
.
get_TableBackground
;
CTableProp
.
prototype
[
'
put_TableBackground
'
]
=
CTableProp
.
prototype
.
put_TableBackground
;
CTableProp
.
prototype
[
'
get_CellsBackground
'
]
=
CTableProp
.
prototype
.
get_CellsBackground
;
CTableProp
.
prototype
[
'
put_CellsBackground
'
]
=
CTableProp
.
prototype
.
put_CellsBackground
;
CTableProp
.
prototype
[
'
get_Position
'
]
=
CTableProp
.
prototype
.
get_Position
;
CTableProp
.
prototype
[
'
put_Position
'
]
=
CTableProp
.
prototype
.
put_Position
;
CTableProp
.
prototype
[
'
get_PositionH
'
]
=
CTableProp
.
prototype
.
get_PositionH
;
CTableProp
.
prototype
[
'
put_PositionH
'
]
=
CTableProp
.
prototype
.
put_PositionH
;
CTableProp
.
prototype
[
'
get_PositionV
'
]
=
CTableProp
.
prototype
.
get_PositionV
;
CTableProp
.
prototype
[
'
put_PositionV
'
]
=
CTableProp
.
prototype
.
put_PositionV
;
CTableProp
.
prototype
[
'
get_Value_X
'
]
=
CTableProp
.
prototype
.
get_Value_X
;
CTableProp
.
prototype
[
'
get_Value_Y
'
]
=
CTableProp
.
prototype
.
get_Value_Y
;
CTableProp
.
prototype
[
'
get_ForSelectedCells
'
]
=
CTableProp
.
prototype
.
get_ForSelectedCells
;
CTableProp
.
prototype
[
'
put_ForSelectedCells
'
]
=
CTableProp
.
prototype
.
put_ForSelectedCells
;
CTableProp
.
prototype
[
'
put_CellSelect
'
]
=
CTableProp
.
prototype
.
put_CellSelect
;
CTableProp
.
prototype
[
'
get_CellSelect
'
]
=
CTableProp
.
prototype
.
get_CellSelect
;
CTableProp
.
prototype
[
'
get_CanBeFlow
'
]
=
CTableProp
.
prototype
.
get_CanBeFlow
;
CTableProp
.
prototype
[
'
get_RowsInHeader
'
]
=
CTableProp
.
prototype
.
get_RowsInHeader
;
CTableProp
.
prototype
[
'
put_RowsInHeader
'
]
=
CTableProp
.
prototype
.
put_RowsInHeader
;
CTableProp
.
prototype
[
'
get_Locked
'
]
=
CTableProp
.
prototype
.
get_Locked
;
CTableProp
.
prototype
[
'
get_CellsVAlign
'
]
=
CTableProp
.
prototype
.
get_CellsVAlign
;
CTableProp
.
prototype
[
'
put_CellsVAlign
'
]
=
CTableProp
.
prototype
.
put_CellsVAlign
;
CTableProp
.
prototype
[
'
get_TableLook
'
]
=
CTableProp
.
prototype
.
get_TableLook
;
CTableProp
.
prototype
[
'
put_TableLook
'
]
=
CTableProp
.
prototype
.
put_TableLook
;
CTableProp
.
prototype
[
'
get_TableStyle
'
]
=
CTableProp
.
prototype
.
get_TableStyle
;
CTableProp
.
prototype
[
'
put_TableStyle
'
]
=
CTableProp
.
prototype
.
put_TableStyle
;
CTableProp
.
prototype
[
'
get_AllowOverlap
'
]
=
CTableProp
.
prototype
.
get_AllowOverlap
;
CTableProp
.
prototype
[
'
put_AllowOverlap
'
]
=
CTableProp
.
prototype
.
put_AllowOverlap
;
CTableProp
.
prototype
[
'
get_TableLayout
'
]
=
CTableProp
.
prototype
.
get_TableLayout
;
CTableProp
.
prototype
[
'
put_TableLayout
'
]
=
CTableProp
.
prototype
.
put_TableLayout
;
CTableProp
.
prototype
[
'
get_CellsTextDirection
'
]
=
CTableProp
.
prototype
.
get_CellsTextDirection
;
CTableProp
.
prototype
[
'
put_CellsTextDirection
'
]
=
CTableProp
.
prototype
.
put_CellsTextDirection
;
CTableProp
.
prototype
[
'
get_CellsNoWrap
'
]
=
CTableProp
.
prototype
.
get_CellsNoWrap
;
CTableProp
.
prototype
[
'
put_CellsNoWrap
'
]
=
CTableProp
.
prototype
.
put_CellsNoWrap
;
CTableProp
.
prototype
[
'
get_CellsWidth
'
]
=
CTableProp
.
prototype
.
get_CellsWidth
;
CTableProp
.
prototype
[
'
put_CellsWidth
'
]
=
CTableProp
.
prototype
.
put_CellsWidth
;
CTableProp
.
prototype
[
'
get_PercentFullWidth
'
]
=
CTableProp
.
prototype
.
get_PercentFullWidth
;
CTableProp
.
prototype
[
'
get_CellsWidthNotEqual
'
]
=
CTableProp
.
prototype
.
get_CellsWidthNotEqual
;
CTableProp
.
prototype
[
'
get_TableDescription
'
]
=
CTableProp
.
prototype
.
get_TableDescription
;
CTableProp
.
prototype
[
'
put_TableDescription
'
]
=
CTableProp
.
prototype
.
put_TableDescription
;
CTableProp
.
prototype
[
'
get_TableCaption
'
]
=
CTableProp
.
prototype
.
get_TableCaption
;
CTableProp
.
prototype
[
'
put_TableCaption
'
]
=
CTableProp
.
prototype
.
put_TableCaption
;
window
[
'
Asc
'
][
'
CBorders
'
]
=
window
[
'
Asc
'
].
CBorders
=
CBorders
;
CBorders
.
prototype
[
'
get_Left
'
]
=
CBorders
.
prototype
.
get_Left
;
CBorders
.
prototype
[
'
put_Left
'
]
=
CBorders
.
prototype
.
put_Left
;
CBorders
.
prototype
[
'
get_Top
'
]
=
CBorders
.
prototype
.
get_Top
;
CBorders
.
prototype
[
'
put_Top
'
]
=
CBorders
.
prototype
.
put_Top
;
CBorders
.
prototype
[
'
get_Right
'
]
=
CBorders
.
prototype
.
get_Right
;
CBorders
.
prototype
[
'
put_Right
'
]
=
CBorders
.
prototype
.
put_Right
;
CBorders
.
prototype
[
'
get_Bottom
'
]
=
CBorders
.
prototype
.
get_Bottom
;
CBorders
.
prototype
[
'
put_Bottom
'
]
=
CBorders
.
prototype
.
put_Bottom
;
CBorders
.
prototype
[
'
get_InsideH
'
]
=
CBorders
.
prototype
.
get_InsideH
;
CBorders
.
prototype
[
'
put_InsideH
'
]
=
CBorders
.
prototype
.
put_InsideH
;
CBorders
.
prototype
[
'
get_InsideV
'
]
=
CBorders
.
prototype
.
get_InsideV
;
CBorders
.
prototype
[
'
put_InsideV
'
]
=
CBorders
.
prototype
.
put_InsideV
;
window
[
'
Asc
'
][
'
CMargins
'
]
=
window
[
'
Asc
'
].
CMargins
=
CMargins
;
CMargins
.
prototype
[
'
get_Left
'
]
=
CMargins
.
prototype
.
get_Left
;
CMargins
.
prototype
[
'
put_Left
'
]
=
CMargins
.
prototype
.
put_Left
;
CMargins
.
prototype
[
'
get_Right
'
]
=
CMargins
.
prototype
.
get_Right
;
CMargins
.
prototype
[
'
put_Right
'
]
=
CMargins
.
prototype
.
put_Right
;
CMargins
.
prototype
[
'
get_Top
'
]
=
CMargins
.
prototype
.
get_Top
;
CMargins
.
prototype
[
'
put_Top
'
]
=
CMargins
.
prototype
.
put_Top
;
CMargins
.
prototype
[
'
get_Bottom
'
]
=
CMargins
.
prototype
.
get_Bottom
;
CMargins
.
prototype
[
'
put_Bottom
'
]
=
CMargins
.
prototype
.
put_Bottom
;
CMargins
.
prototype
[
'
get_Flag
'
]
=
CMargins
.
prototype
.
get_Flag
;
CMargins
.
prototype
[
'
put_Flag
'
]
=
CMargins
.
prototype
.
put_Flag
;
CContextMenuData
.
prototype
[
'
get_Type
'
]
=
CContextMenuData
.
prototype
.
get_Type
;
CContextMenuData
.
prototype
[
'
get_X
'
]
=
CContextMenuData
.
prototype
.
get_X
;
CContextMenuData
.
prototype
[
'
get_Y
'
]
=
CContextMenuData
.
prototype
.
get_Y
;
...
...
word/apiCommon.js
View file @
f6aff605
...
...
@@ -32,14 +32,8 @@
"
use strict
"
;
window
[
'
Asc
'
]
=
window
[
'
Asc
'
]
||
{};
// ---------------------------------------------------------------
// ---------------------------------------------------------------
function
CAscTableStyle
()
{
this
.
Id
=
""
;
...
...
@@ -49,9 +43,814 @@ function CAscTableStyle()
CAscTableStyle
.
prototype
.
get_Id
=
function
(){
return
this
.
Id
;
};
CAscTableStyle
.
prototype
.
get_Image
=
function
(){
return
this
.
Image
;
};
CAscTableStyle
.
prototype
.
get_Type
=
function
(){
return
this
.
Type
;
};
CAscTableStyle
.
prototype
[
'
get_Id
'
]
=
CAscTableStyle
.
prototype
.
get_Id
;
CAscTableStyle
.
prototype
[
'
get_Image
'
]
=
CAscTableStyle
.
prototype
.
get_Image
;
CAscTableStyle
.
prototype
[
'
get_Type
'
]
=
CAscTableStyle
.
prototype
.
get_Type
;
// ---------------------------------------------------------------
// CBackground
// Value : тип заливки(прозрачная или нет),
// Color : { r : 0, g : 0, b : 0 }
function
CBackground
(
obj
)
{
if
(
obj
)
{
if
(
obj
.
Unifill
&&
obj
.
Unifill
.
fill
&&
obj
.
Unifill
.
fill
.
type
===
window
[
'
Asc
'
].
c_oAscFill
.
FILL_TYPE_SOLID
&&
obj
.
Unifill
.
fill
.
color
)
{
this
.
Color
=
AscCommon
.
CreateAscColor
(
obj
.
Unifill
.
fill
.
color
);
}
else
{
this
.
Color
=
(
undefined
!=
obj
.
Color
&&
null
!=
obj
.
Color
)
?
AscCommon
.
CreateAscColorCustom
(
obj
.
Color
.
r
,
obj
.
Color
.
g
,
obj
.
Color
.
b
)
:
null
;
}
this
.
Value
=
(
undefined
!=
obj
.
Value
)
?
obj
.
Value
:
null
;
}
else
{
this
.
Color
=
AscCommon
.
CreateAscColorCustom
(
0
,
0
,
0
);
this
.
Value
=
1
;
}
}
CBackground
.
prototype
.
get_Color
=
function
()
{
return
this
.
Color
;
};
CBackground
.
prototype
.
put_Color
=
function
(
v
)
{
this
.
Color
=
(
v
)
?
v
:
null
;
};
CBackground
.
prototype
.
get_Value
=
function
()
{
return
this
.
Value
;
};
CBackground
.
prototype
.
put_Value
=
function
(
v
)
{
this
.
Value
=
v
;
};
window
[
'
Asc
'
][
'
CBackground
'
]
=
window
[
'
Asc
'
].
CBackground
=
CBackground
;
CBackground
.
prototype
[
'
get_Color
'
]
=
CBackground
.
prototype
.
get_Color
;
CBackground
.
prototype
[
'
put_Color
'
]
=
CBackground
.
prototype
.
put_Color
;
CBackground
.
prototype
[
'
get_Value
'
]
=
CBackground
.
prototype
.
get_Value
;
CBackground
.
prototype
[
'
put_Value
'
]
=
CBackground
.
prototype
.
put_Value
;
// ---------------------------------------------------------------
function
CTablePositionH
(
obj
)
{
if
(
obj
)
{
this
.
RelativeFrom
=
(
undefined
===
obj
.
RelativeFrom
)
?
Asc
.
c_oAscHAnchor
.
Margin
:
obj
.
RelativeFrom
;
this
.
UseAlign
=
(
undefined
===
obj
.
UseAlign
)
?
false
:
obj
.
UseAlign
;
this
.
Align
=
(
undefined
===
obj
.
Align
)
?
undefined
:
obj
.
Align
;
this
.
Value
=
(
undefined
===
obj
.
Value
)
?
0
:
obj
.
Value
;
}
else
{
this
.
RelativeFrom
=
Asc
.
c_oAscHAnchor
.
Column
;
this
.
UseAlign
=
false
;
this
.
Align
=
undefined
;
this
.
Value
=
0
;
}
}
CTablePositionH
.
prototype
.
get_RelativeFrom
=
function
()
{
return
this
.
RelativeFrom
;
};
CTablePositionH
.
prototype
.
put_RelativeFrom
=
function
(
v
)
{
this
.
RelativeFrom
=
v
;
};
CTablePositionH
.
prototype
.
get_UseAlign
=
function
()
{
return
this
.
UseAlign
;
};
CTablePositionH
.
prototype
.
put_UseAlign
=
function
(
v
)
{
this
.
UseAlign
=
v
;
};
CTablePositionH
.
prototype
.
get_Align
=
function
()
{
return
this
.
Align
;
};
CTablePositionH
.
prototype
.
put_Align
=
function
(
v
)
{
this
.
Align
=
v
;
};
CTablePositionH
.
prototype
.
get_Value
=
function
()
{
return
this
.
Value
;
};
CTablePositionH
.
prototype
.
put_Value
=
function
(
v
)
{
this
.
Value
=
v
;
};
function
CTablePositionV
(
obj
)
{
if
(
obj
)
{
this
.
RelativeFrom
=
(
undefined
===
obj
.
RelativeFrom
)
?
Asc
.
c_oAscVAnchor
.
Text
:
obj
.
RelativeFrom
;
this
.
UseAlign
=
(
undefined
===
obj
.
UseAlign
)
?
false
:
obj
.
UseAlign
;
this
.
Align
=
(
undefined
===
obj
.
Align
)
?
undefined
:
obj
.
Align
;
this
.
Value
=
(
undefined
===
obj
.
Value
)
?
0
:
obj
.
Value
;
}
else
{
this
.
RelativeFrom
=
Asc
.
c_oAscVAnchor
.
Text
;
this
.
UseAlign
=
false
;
this
.
Align
=
undefined
;
this
.
Value
=
0
;
}
}
CTablePositionV
.
prototype
.
get_RelativeFrom
=
function
()
{
return
this
.
RelativeFrom
;
};
CTablePositionV
.
prototype
.
put_RelativeFrom
=
function
(
v
)
{
this
.
RelativeFrom
=
v
;
};
CTablePositionV
.
prototype
.
get_UseAlign
=
function
()
{
return
this
.
UseAlign
;
};
CTablePositionV
.
prototype
.
put_UseAlign
=
function
(
v
)
{
this
.
UseAlign
=
v
;
};
CTablePositionV
.
prototype
.
get_Align
=
function
()
{
return
this
.
Align
;
};
CTablePositionV
.
prototype
.
put_Align
=
function
(
v
)
{
this
.
Align
=
v
;
};
CTablePositionV
.
prototype
.
get_Value
=
function
()
{
return
this
.
Value
;
};
CTablePositionV
.
prototype
.
put_Value
=
function
(
v
)
{
this
.
Value
=
v
;
};
window
[
'
Asc
'
][
'
CTablePositionH
'
]
=
CTablePositionH
;
CTablePositionH
.
prototype
[
'
get_RelativeFrom
'
]
=
CTablePositionH
.
prototype
.
get_RelativeFrom
;
CTablePositionH
.
prototype
[
'
put_RelativeFrom
'
]
=
CTablePositionH
.
prototype
.
put_RelativeFrom
;
CTablePositionH
.
prototype
[
'
get_UseAlign
'
]
=
CTablePositionH
.
prototype
.
get_UseAlign
;
CTablePositionH
.
prototype
[
'
put_UseAlign
'
]
=
CTablePositionH
.
prototype
.
put_UseAlign
;
CTablePositionH
.
prototype
[
'
get_Align
'
]
=
CTablePositionH
.
prototype
.
get_Align
;
CTablePositionH
.
prototype
[
'
put_Align
'
]
=
CTablePositionH
.
prototype
.
put_Align
;
CTablePositionH
.
prototype
[
'
get_Value
'
]
=
CTablePositionH
.
prototype
.
get_Value
;
CTablePositionH
.
prototype
[
'
put_Value
'
]
=
CTablePositionH
.
prototype
.
put_Value
;
window
[
'
Asc
'
][
'
CTablePositionV
'
]
=
CTablePositionV
;
CTablePositionV
.
prototype
[
'
get_RelativeFrom
'
]
=
CTablePositionV
.
prototype
.
get_RelativeFrom
;
CTablePositionV
.
prototype
[
'
put_RelativeFrom
'
]
=
CTablePositionV
.
prototype
.
put_RelativeFrom
;
CTablePositionV
.
prototype
[
'
get_UseAlign
'
]
=
CTablePositionV
.
prototype
.
get_UseAlign
;
CTablePositionV
.
prototype
[
'
put_UseAlign
'
]
=
CTablePositionV
.
prototype
.
put_UseAlign
;
CTablePositionV
.
prototype
[
'
get_Align
'
]
=
CTablePositionV
.
prototype
.
get_Align
;
CTablePositionV
.
prototype
[
'
put_Align
'
]
=
CTablePositionV
.
prototype
.
put_Align
;
CTablePositionV
.
prototype
[
'
get_Value
'
]
=
CTablePositionV
.
prototype
.
get_Value
;
CTablePositionV
.
prototype
[
'
put_Value
'
]
=
CTablePositionV
.
prototype
.
put_Value
;
// ---------------------------------------------------------------
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
;
};
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
;
/*
{
TableWidth : null - галочка убрана, либо заданное значение в мм
TableSpacing : null - галочка убрана, либо заданное значение в мм
TableDefaultMargins : // маргины для всей таблицы(значение по умолчанию)
{
Left : 1.9,
Right : 1.9,
Top : 0,
Bottom : 0
}
CellMargins :
{
Left : 1.9, (null - неопределенное значение)
Right : 1.9, (null - неопределенное значение)
Top : 0, (null - неопределенное значение)
Bottom : 0, (null - неопределенное значение)
Flag : 0 - У всех выделенных ячеек значение берется из TableDefaultMargins
1 - У выделенных ячеек есть ячейки с дефолтовыми значениями, и есть со своими собственными
2 - У всех ячеек свои собственные значения
}
TableAlignment : 0, 1, 2 (слева, по центру, справа)
TableIndent : значение в мм,
TableWrappingStyle : 0, 1 (inline, flow)
TablePaddings:
{
Left : 3.2,
Right : 3.2,
Top : 0,
Bottom : 0
}
TableBorders : // границы таблицы
{
Bottom :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Left :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Right :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Top :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
InsideH :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
InsideV :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
}
}
CellBorders : // границы выделенных ячеек
{
ForSelectedCells : true,
Bottom :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Left :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Right :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
Top :
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
InsideH : // данного элемента может не быть, если у выделенных ячеек
// нет горизонтальных внутренних границ
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
},
InsideV : // данного элемента может не быть, если у выделенных ячеек
// нет вертикальных внутренних границ
{
Color : { r : 0, g : 0, b : 0 },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm
Space :
}
}
TableBackground :
{
Value : тип заливки(прозрачная или нет),
Color : { r : 0, g : 0, b : 0 }
}
CellsBackground : null если заливка не определена для выделенных ячеек
{
Value : тип заливки(прозрачная или нет),
Color : { r : 0, g : 0, b : 0 }
}
Position:
{
X:0,
Y:0
}
}
*/
function
CTableProp
(
tblProp
)
{
if
(
tblProp
)
{
this
.
CanBeFlow
=
(
undefined
!=
tblProp
.
CanBeFlow
?
tblProp
.
CanBeFlow
:
false
);
this
.
CellSelect
=
(
undefined
!=
tblProp
.
CellSelect
?
tblProp
.
CellSelect
:
false
);
this
.
CellSelect
=
(
undefined
!=
tblProp
.
CellSelect
)
?
tblProp
.
CellSelect
:
false
;
this
.
TableWidth
=
(
undefined
!=
tblProp
.
TableWidth
)
?
tblProp
.
TableWidth
:
null
;
this
.
TableSpacing
=
(
undefined
!=
tblProp
.
TableSpacing
)
?
tblProp
.
TableSpacing
:
null
;
this
.
TableDefaultMargins
=
(
undefined
!=
tblProp
.
TableDefaultMargins
&&
null
!=
tblProp
.
TableDefaultMargins
)
?
new
Asc
.
asc_CPaddings
(
tblProp
.
TableDefaultMargins
)
:
null
;
this
.
CellMargins
=
(
undefined
!=
tblProp
.
CellMargins
&&
null
!=
tblProp
.
CellMargins
)
?
new
CMargins
(
tblProp
.
CellMargins
)
:
null
;
this
.
TableAlignment
=
(
undefined
!=
tblProp
.
TableAlignment
)
?
tblProp
.
TableAlignment
:
null
;
this
.
TableIndent
=
(
undefined
!=
tblProp
.
TableIndent
)
?
tblProp
.
TableIndent
:
null
;
this
.
TableWrappingStyle
=
(
undefined
!=
tblProp
.
TableWrappingStyle
)
?
tblProp
.
TableWrappingStyle
:
null
;
this
.
TablePaddings
=
(
undefined
!=
tblProp
.
TablePaddings
&&
null
!=
tblProp
.
TablePaddings
)
?
new
Asc
.
asc_CPaddings
(
tblProp
.
TablePaddings
)
:
null
;
this
.
TableBorders
=
(
undefined
!=
tblProp
.
TableBorders
&&
null
!=
tblProp
.
TableBorders
)
?
new
CBorders
(
tblProp
.
TableBorders
)
:
null
;
this
.
CellBorders
=
(
undefined
!=
tblProp
.
CellBorders
&&
null
!=
tblProp
.
CellBorders
)
?
new
CBorders
(
tblProp
.
CellBorders
)
:
null
;
this
.
TableBackground
=
(
undefined
!=
tblProp
.
TableBackground
&&
null
!=
tblProp
.
TableBackground
)
?
new
CBackground
(
tblProp
.
TableBackground
)
:
null
;
this
.
CellsBackground
=
(
undefined
!=
tblProp
.
CellsBackground
&&
null
!=
tblProp
.
CellsBackground
)
?
new
CBackground
(
tblProp
.
CellsBackground
)
:
null
;
this
.
Position
=
(
undefined
!=
tblProp
.
Position
&&
null
!=
tblProp
.
Position
)
?
new
Asc
.
CPosition
(
tblProp
.
Position
)
:
null
;
this
.
PositionH
=
(
undefined
!=
tblProp
.
PositionH
&&
null
!=
tblProp
.
PositionH
)
?
new
CTablePositionH
(
tblProp
.
PositionH
)
:
undefined
;
this
.
PositionV
=
(
undefined
!=
tblProp
.
PositionV
&&
null
!=
tblProp
.
PositionV
)
?
new
CTablePositionV
(
tblProp
.
PositionV
)
:
undefined
;
this
.
Internal_Position
=
(
undefined
!=
tblProp
.
Internal_Position
)
?
tblProp
.
Internal_Position
:
undefined
;
this
.
ForSelectedCells
=
(
undefined
!=
tblProp
.
ForSelectedCells
)
?
tblProp
.
ForSelectedCells
:
true
;
this
.
TableStyle
=
(
undefined
!=
tblProp
.
TableStyle
)
?
tblProp
.
TableStyle
:
null
;
this
.
TableLook
=
(
undefined
!=
tblProp
.
TableLook
)
?
new
CTablePropLook
(
tblProp
.
TableLook
)
:
null
;
this
.
RowsInHeader
=
(
undefined
!=
tblProp
.
RowsInHeader
)
?
tblProp
.
RowsInHeader
:
0
;
this
.
CellsVAlign
=
(
undefined
!=
tblProp
.
CellsVAlign
)
?
tblProp
.
CellsVAlign
:
c_oAscVertAlignJc
.
Top
;
this
.
AllowOverlap
=
(
undefined
!=
tblProp
.
AllowOverlap
)
?
tblProp
.
AllowOverlap
:
undefined
;
this
.
TableLayout
=
tblProp
.
TableLayout
;
this
.
CellsTextDirection
=
tblProp
.
CellsTextDirection
;
this
.
CellsNoWrap
=
tblProp
.
CellsNoWrap
;
this
.
CellsWidth
=
tblProp
.
CellsWidth
;
this
.
CellsWidthNotEqual
=
tblProp
.
CellsWidthNotEqual
;
this
.
Locked
=
(
undefined
!=
tblProp
.
Locked
)
?
tblProp
.
Locked
:
false
;
this
.
PercentFullWidth
=
tblProp
.
PercentFullWidth
;
this
.
TableDescription
=
tblProp
.
TableDescription
;
this
.
TableCaption
=
tblProp
.
TableCaption
;
}
else
{
//Все свойства класса CTableProp должны быть undefined если они не изменялись
//this.CanBeFlow = false;
this
.
CellSelect
=
false
;
//обязательное свойство
/*this.TableWidth = null;
this.TableSpacing = null;
this.TableDefaultMargins = new Asc.asc_CPaddings ();
this.CellMargins = new CMargins ();
this.TableAlignment = 0;
this.TableIndent = 0;
this.TableWrappingStyle = c_oAscWrapStyle.Inline;
this.TablePaddings = new Asc.asc_CPaddings ();
this.TableBorders = new CBorders ();
this.CellBorders = new CBorders ();
this.TableBackground = new CBackground ();
this.CellsBackground = new CBackground ();;
this.Position = new CPosition ();
this.ForSelectedCells = true;*/
this
.
Locked
=
false
;
}
}
CTableProp
.
prototype
.
get_Width
=
function
()
{
return
this
.
TableWidth
;
};
CTableProp
.
prototype
.
put_Width
=
function
(
v
)
{
this
.
TableWidth
=
v
;
};
CTableProp
.
prototype
.
get_Spacing
=
function
()
{
return
this
.
TableSpacing
;
};
CTableProp
.
prototype
.
put_Spacing
=
function
(
v
)
{
this
.
TableSpacing
=
v
;
};
CTableProp
.
prototype
.
get_DefaultMargins
=
function
()
{
return
this
.
TableDefaultMargins
;
};
CTableProp
.
prototype
.
put_DefaultMargins
=
function
(
v
)
{
this
.
TableDefaultMargins
=
v
;
};
CTableProp
.
prototype
.
get_CellMargins
=
function
()
{
return
this
.
CellMargins
;
};
CTableProp
.
prototype
.
put_CellMargins
=
function
(
v
)
{
this
.
CellMargins
=
v
;
};
CTableProp
.
prototype
.
get_TableAlignment
=
function
()
{
return
this
.
TableAlignment
;
};
CTableProp
.
prototype
.
put_TableAlignment
=
function
(
v
)
{
this
.
TableAlignment
=
v
;
};
CTableProp
.
prototype
.
get_TableIndent
=
function
()
{
return
this
.
TableIndent
;
};
CTableProp
.
prototype
.
put_TableIndent
=
function
(
v
)
{
this
.
TableIndent
=
v
;
};
CTableProp
.
prototype
.
get_TableWrap
=
function
()
{
return
this
.
TableWrappingStyle
;
};
CTableProp
.
prototype
.
put_TableWrap
=
function
(
v
)
{
this
.
TableWrappingStyle
=
v
;
};
CTableProp
.
prototype
.
get_TablePaddings
=
function
()
{
return
this
.
TablePaddings
;
};
CTableProp
.
prototype
.
put_TablePaddings
=
function
(
v
)
{
this
.
TablePaddings
=
v
;
};
CTableProp
.
prototype
.
get_TableBorders
=
function
()
{
return
this
.
TableBorders
;
};
CTableProp
.
prototype
.
put_TableBorders
=
function
(
v
)
{
this
.
TableBorders
=
v
;
};
CTableProp
.
prototype
.
get_CellBorders
=
function
()
{
return
this
.
CellBorders
;
};
CTableProp
.
prototype
.
put_CellBorders
=
function
(
v
)
{
this
.
CellBorders
=
v
;
};
CTableProp
.
prototype
.
get_TableBackground
=
function
()
{
return
this
.
TableBackground
;
};
CTableProp
.
prototype
.
put_TableBackground
=
function
(
v
)
{
this
.
TableBackground
=
v
;
};
CTableProp
.
prototype
.
get_CellsBackground
=
function
()
{
return
this
.
CellsBackground
;
};
CTableProp
.
prototype
.
put_CellsBackground
=
function
(
v
)
{
this
.
CellsBackground
=
v
;
};
CTableProp
.
prototype
.
get_Position
=
function
()
{
return
this
.
Position
;
};
CTableProp
.
prototype
.
put_Position
=
function
(
v
)
{
this
.
Position
=
v
;
};
CTableProp
.
prototype
.
get_PositionH
=
function
()
{
return
this
.
PositionH
;
};
CTableProp
.
prototype
.
put_PositionH
=
function
(
v
)
{
this
.
PositionH
=
v
;
};
CTableProp
.
prototype
.
get_PositionV
=
function
()
{
return
this
.
PositionV
;
};
CTableProp
.
prototype
.
put_PositionV
=
function
(
v
)
{
this
.
PositionV
=
v
;
};
CTableProp
.
prototype
.
get_Value_X
=
function
(
RelativeFrom
)
{
if
(
undefined
!=
this
.
Internal_Position
)
return
this
.
Internal_Position
.
Calculate_X_Value
(
RelativeFrom
);
return
0
;
};
CTableProp
.
prototype
.
get_Value_Y
=
function
(
RelativeFrom
)
{
if
(
undefined
!=
this
.
Internal_Position
)
return
this
.
Internal_Position
.
Calculate_Y_Value
(
RelativeFrom
);
return
0
;
};
CTableProp
.
prototype
.
get_ForSelectedCells
=
function
()
{
return
this
.
ForSelectedCells
;
};
CTableProp
.
prototype
.
put_ForSelectedCells
=
function
(
v
)
{
this
.
ForSelectedCells
=
v
;
};
CTableProp
.
prototype
.
put_CellSelect
=
function
(
v
)
{
this
.
CellSelect
=
v
;
};
CTableProp
.
prototype
.
get_CellSelect
=
function
()
{
return
this
.
CellSelect
};
CTableProp
.
prototype
.
get_CanBeFlow
=
function
()
{
return
this
.
CanBeFlow
;
};
CTableProp
.
prototype
.
get_RowsInHeader
=
function
()
{
return
this
.
RowsInHeader
;
};
CTableProp
.
prototype
.
put_RowsInHeader
=
function
(
v
)
{
this
.
RowsInHeader
=
v
;
};
CTableProp
.
prototype
.
get_Locked
=
function
()
{
return
this
.
Locked
;
};
CTableProp
.
prototype
.
get_CellsVAlign
=
function
()
{
return
this
.
CellsVAlign
;
};
CTableProp
.
prototype
.
put_CellsVAlign
=
function
(
v
)
{
this
.
CellsVAlign
=
v
;
};
CTableProp
.
prototype
.
get_TableLook
=
function
()
{
return
this
.
TableLook
;
};
CTableProp
.
prototype
.
put_TableLook
=
function
(
v
)
{
this
.
TableLook
=
v
;
};
CTableProp
.
prototype
.
get_TableStyle
=
function
()
{
return
this
.
TableStyle
;
};
CTableProp
.
prototype
.
put_TableStyle
=
function
(
v
)
{
this
.
TableStyle
=
v
;
};
CTableProp
.
prototype
.
get_AllowOverlap
=
function
()
{
return
this
.
AllowOverlap
;
};
CTableProp
.
prototype
.
put_AllowOverlap
=
function
(
v
)
{
this
.
AllowOverlap
=
v
;
};
CTableProp
.
prototype
.
get_TableLayout
=
function
()
{
return
this
.
TableLayout
;
};
CTableProp
.
prototype
.
put_TableLayout
=
function
(
v
)
{
this
.
TableLayout
=
v
;
};
CTableProp
.
prototype
.
get_CellsTextDirection
=
function
()
{
return
this
.
CellsTextDirection
;
};
CTableProp
.
prototype
.
put_CellsTextDirection
=
function
(
v
)
{
this
.
CellsTextDirection
=
v
;
};
CTableProp
.
prototype
.
get_CellsNoWrap
=
function
()
{
return
this
.
CellsNoWrap
;
};
CTableProp
.
prototype
.
put_CellsNoWrap
=
function
(
v
)
{
this
.
CellsNoWrap
=
v
;
};
CTableProp
.
prototype
.
get_CellsWidth
=
function
()
{
return
this
.
CellsWidth
;
};
CTableProp
.
prototype
.
put_CellsWidth
=
function
(
v
)
{
this
.
CellsWidth
=
v
;
};
CTableProp
.
prototype
.
get_PercentFullWidth
=
function
()
{
return
this
.
PercentFullWidth
;
};
CTableProp
.
prototype
.
get_CellsWidthNotEqual
=
function
()
{
return
this
.
CellsWidthNotEqual
;
};
CTableProp
.
prototype
.
get_TableDescription
=
function
()
{
return
this
.
TableDescription
;
};
CTableProp
.
prototype
.
put_TableDescription
=
function
(
v
)
{
this
.
TableDescription
=
v
;
};
CTableProp
.
prototype
.
get_TableCaption
=
function
()
{
return
this
.
TableCaption
;
};
CTableProp
.
prototype
.
put_TableCaption
=
function
(
v
)
{
this
.
TableCaption
=
v
;
};
window
[
'
Asc
'
][
'
CTableProp
'
]
=
window
[
'
Asc
'
].
CTableProp
=
CTableProp
;
CTableProp
.
prototype
[
'
get_Width
'
]
=
CTableProp
.
prototype
.
get_Width
;
CTableProp
.
prototype
[
'
put_Width
'
]
=
CTableProp
.
prototype
.
put_Width
;
CTableProp
.
prototype
[
'
get_Spacing
'
]
=
CTableProp
.
prototype
.
get_Spacing
;
CTableProp
.
prototype
[
'
put_Spacing
'
]
=
CTableProp
.
prototype
.
put_Spacing
;
CTableProp
.
prototype
[
'
get_DefaultMargins
'
]
=
CTableProp
.
prototype
.
get_DefaultMargins
;
CTableProp
.
prototype
[
'
put_DefaultMargins
'
]
=
CTableProp
.
prototype
.
put_DefaultMargins
;
CTableProp
.
prototype
[
'
get_CellMargins
'
]
=
CTableProp
.
prototype
.
get_CellMargins
;
CTableProp
.
prototype
[
'
put_CellMargins
'
]
=
CTableProp
.
prototype
.
put_CellMargins
;
CTableProp
.
prototype
[
'
get_TableAlignment
'
]
=
CTableProp
.
prototype
.
get_TableAlignment
;
CTableProp
.
prototype
[
'
put_TableAlignment
'
]
=
CTableProp
.
prototype
.
put_TableAlignment
;
CTableProp
.
prototype
[
'
get_TableIndent
'
]
=
CTableProp
.
prototype
.
get_TableIndent
;
CTableProp
.
prototype
[
'
put_TableIndent
'
]
=
CTableProp
.
prototype
.
put_TableIndent
;
CTableProp
.
prototype
[
'
get_TableWrap
'
]
=
CTableProp
.
prototype
.
get_TableWrap
;
CTableProp
.
prototype
[
'
put_TableWrap
'
]
=
CTableProp
.
prototype
.
put_TableWrap
;
CTableProp
.
prototype
[
'
get_TablePaddings
'
]
=
CTableProp
.
prototype
.
get_TablePaddings
;
CTableProp
.
prototype
[
'
put_TablePaddings
'
]
=
CTableProp
.
prototype
.
put_TablePaddings
;
CTableProp
.
prototype
[
'
get_TableBorders
'
]
=
CTableProp
.
prototype
.
get_TableBorders
;
CTableProp
.
prototype
[
'
put_TableBorders
'
]
=
CTableProp
.
prototype
.
put_TableBorders
;
CTableProp
.
prototype
[
'
get_CellBorders
'
]
=
CTableProp
.
prototype
.
get_CellBorders
;
CTableProp
.
prototype
[
'
put_CellBorders
'
]
=
CTableProp
.
prototype
.
put_CellBorders
;
CTableProp
.
prototype
[
'
get_TableBackground
'
]
=
CTableProp
.
prototype
.
get_TableBackground
;
CTableProp
.
prototype
[
'
put_TableBackground
'
]
=
CTableProp
.
prototype
.
put_TableBackground
;
CTableProp
.
prototype
[
'
get_CellsBackground
'
]
=
CTableProp
.
prototype
.
get_CellsBackground
;
CTableProp
.
prototype
[
'
put_CellsBackground
'
]
=
CTableProp
.
prototype
.
put_CellsBackground
;
CTableProp
.
prototype
[
'
get_Position
'
]
=
CTableProp
.
prototype
.
get_Position
;
CTableProp
.
prototype
[
'
put_Position
'
]
=
CTableProp
.
prototype
.
put_Position
;
CTableProp
.
prototype
[
'
get_PositionH
'
]
=
CTableProp
.
prototype
.
get_PositionH
;
CTableProp
.
prototype
[
'
put_PositionH
'
]
=
CTableProp
.
prototype
.
put_PositionH
;
CTableProp
.
prototype
[
'
get_PositionV
'
]
=
CTableProp
.
prototype
.
get_PositionV
;
CTableProp
.
prototype
[
'
put_PositionV
'
]
=
CTableProp
.
prototype
.
put_PositionV
;
CTableProp
.
prototype
[
'
get_Value_X
'
]
=
CTableProp
.
prototype
.
get_Value_X
;
CTableProp
.
prototype
[
'
get_Value_Y
'
]
=
CTableProp
.
prototype
.
get_Value_Y
;
CTableProp
.
prototype
[
'
get_ForSelectedCells
'
]
=
CTableProp
.
prototype
.
get_ForSelectedCells
;
CTableProp
.
prototype
[
'
put_ForSelectedCells
'
]
=
CTableProp
.
prototype
.
put_ForSelectedCells
;
CTableProp
.
prototype
[
'
put_CellSelect
'
]
=
CTableProp
.
prototype
.
put_CellSelect
;
CTableProp
.
prototype
[
'
get_CellSelect
'
]
=
CTableProp
.
prototype
.
get_CellSelect
;
CTableProp
.
prototype
[
'
get_CanBeFlow
'
]
=
CTableProp
.
prototype
.
get_CanBeFlow
;
CTableProp
.
prototype
[
'
get_RowsInHeader
'
]
=
CTableProp
.
prototype
.
get_RowsInHeader
;
CTableProp
.
prototype
[
'
put_RowsInHeader
'
]
=
CTableProp
.
prototype
.
put_RowsInHeader
;
CTableProp
.
prototype
[
'
get_Locked
'
]
=
CTableProp
.
prototype
.
get_Locked
;
CTableProp
.
prototype
[
'
get_CellsVAlign
'
]
=
CTableProp
.
prototype
.
get_CellsVAlign
;
CTableProp
.
prototype
[
'
put_CellsVAlign
'
]
=
CTableProp
.
prototype
.
put_CellsVAlign
;
CTableProp
.
prototype
[
'
get_TableLook
'
]
=
CTableProp
.
prototype
.
get_TableLook
;
CTableProp
.
prototype
[
'
put_TableLook
'
]
=
CTableProp
.
prototype
.
put_TableLook
;
CTableProp
.
prototype
[
'
get_TableStyle
'
]
=
CTableProp
.
prototype
.
get_TableStyle
;
CTableProp
.
prototype
[
'
put_TableStyle
'
]
=
CTableProp
.
prototype
.
put_TableStyle
;
CTableProp
.
prototype
[
'
get_AllowOverlap
'
]
=
CTableProp
.
prototype
.
get_AllowOverlap
;
CTableProp
.
prototype
[
'
put_AllowOverlap
'
]
=
CTableProp
.
prototype
.
put_AllowOverlap
;
CTableProp
.
prototype
[
'
get_TableLayout
'
]
=
CTableProp
.
prototype
.
get_TableLayout
;
CTableProp
.
prototype
[
'
put_TableLayout
'
]
=
CTableProp
.
prototype
.
put_TableLayout
;
CTableProp
.
prototype
[
'
get_CellsTextDirection
'
]
=
CTableProp
.
prototype
.
get_CellsTextDirection
;
CTableProp
.
prototype
[
'
put_CellsTextDirection
'
]
=
CTableProp
.
prototype
.
put_CellsTextDirection
;
CTableProp
.
prototype
[
'
get_CellsNoWrap
'
]
=
CTableProp
.
prototype
.
get_CellsNoWrap
;
CTableProp
.
prototype
[
'
put_CellsNoWrap
'
]
=
CTableProp
.
prototype
.
put_CellsNoWrap
;
CTableProp
.
prototype
[
'
get_CellsWidth
'
]
=
CTableProp
.
prototype
.
get_CellsWidth
;
CTableProp
.
prototype
[
'
put_CellsWidth
'
]
=
CTableProp
.
prototype
.
put_CellsWidth
;
CTableProp
.
prototype
[
'
get_PercentFullWidth
'
]
=
CTableProp
.
prototype
.
get_PercentFullWidth
;
CTableProp
.
prototype
[
'
get_CellsWidthNotEqual
'
]
=
CTableProp
.
prototype
.
get_CellsWidthNotEqual
;
CTableProp
.
prototype
[
'
get_TableDescription
'
]
=
CTableProp
.
prototype
.
get_TableDescription
;
CTableProp
.
prototype
[
'
put_TableDescription
'
]
=
CTableProp
.
prototype
.
put_TableDescription
;
CTableProp
.
prototype
[
'
get_TableCaption
'
]
=
CTableProp
.
prototype
.
get_TableCaption
;
CTableProp
.
prototype
[
'
put_TableCaption
'
]
=
CTableProp
.
prototype
.
put_TableCaption
;
// ---------------------------------------------------------------
function
CBorders
(
obj
)
{
if
(
obj
)
{
this
.
Left
=
(
undefined
!=
obj
.
Left
&&
null
!=
obj
.
Left
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Left
)
:
null
;
this
.
Top
=
(
undefined
!=
obj
.
Top
&&
null
!=
obj
.
Top
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Top
)
:
null
;
this
.
Right
=
(
undefined
!=
obj
.
Right
&&
null
!=
obj
.
Right
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Right
)
:
null
;
this
.
Bottom
=
(
undefined
!=
obj
.
Bottom
&&
null
!=
obj
.
Bottom
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
Bottom
)
:
null
;
this
.
InsideH
=
(
undefined
!=
obj
.
InsideH
&&
null
!=
obj
.
InsideH
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
InsideH
)
:
null
;
this
.
InsideV
=
(
undefined
!=
obj
.
InsideV
&&
null
!=
obj
.
InsideV
)
?
new
Asc
.
asc_CTextBorder
(
obj
.
InsideV
)
:
null
;
}
//Все свойства класса CBorders должны быть undefined если они не изменялись
/*else
{
this.Left = null;
this.Top = null;
this.Right = null;
this.Bottom = null;
this.InsideH = null;
this.InsideV = null;
}*/
}
CBorders
.
prototype
.
get_Left
=
function
()
{
return
this
.
Left
;
};
CBorders
.
prototype
.
put_Left
=
function
(
v
)
{
this
.
Left
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
};
CBorders
.
prototype
.
get_Top
=
function
()
{
return
this
.
Top
;
};
CBorders
.
prototype
.
put_Top
=
function
(
v
)
{
this
.
Top
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
};
CBorders
.
prototype
.
get_Right
=
function
()
{
return
this
.
Right
;
};
CBorders
.
prototype
.
put_Right
=
function
(
v
)
{
this
.
Right
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
};
CBorders
.
prototype
.
get_Bottom
=
function
()
{
return
this
.
Bottom
;
};
CBorders
.
prototype
.
put_Bottom
=
function
(
v
)
{
this
.
Bottom
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
};
CBorders
.
prototype
.
get_InsideH
=
function
()
{
return
this
.
InsideH
;
};
CBorders
.
prototype
.
put_InsideH
=
function
(
v
)
{
this
.
InsideH
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
};
CBorders
.
prototype
.
get_InsideV
=
function
()
{
return
this
.
InsideV
;
};
CBorders
.
prototype
.
put_InsideV
=
function
(
v
)
{
this
.
InsideV
=
(
v
)
?
new
Asc
.
asc_CTextBorder
(
v
)
:
null
;
};
function
CMargins
(
obj
)
{
if
(
obj
)
{
this
.
Left
=
(
undefined
!=
obj
.
Left
)
?
obj
.
Left
:
null
;
this
.
Right
=
(
undefined
!=
obj
.
Right
)
?
obj
.
Right
:
null
;
this
.
Top
=
(
undefined
!=
obj
.
Top
)
?
obj
.
Top
:
null
;
this
.
Bottom
=
(
undefined
!=
obj
.
Bottom
)
?
obj
.
Bottom
:
null
;
this
.
Flag
=
(
undefined
!=
obj
.
Flag
)
?
obj
.
Flag
:
null
;
}
else
{
this
.
Left
=
null
;
this
.
Right
=
null
;
this
.
Top
=
null
;
this
.
Bottom
=
null
;
this
.
Flag
=
null
;
}
}
CMargins
.
prototype
.
get_Left
=
function
()
{
return
this
.
Left
;
};
CMargins
.
prototype
.
put_Left
=
function
(
v
)
{
this
.
Left
=
v
;
};
CMargins
.
prototype
.
get_Right
=
function
()
{
return
this
.
Right
;
};
CMargins
.
prototype
.
put_Right
=
function
(
v
)
{
this
.
Right
=
v
;
};
CMargins
.
prototype
.
get_Top
=
function
()
{
return
this
.
Top
;
};
CMargins
.
prototype
.
put_Top
=
function
(
v
)
{
this
.
Top
=
v
;
};
CMargins
.
prototype
.
get_Bottom
=
function
()
{
return
this
.
Bottom
;
};
CMargins
.
prototype
.
put_Bottom
=
function
(
v
)
{
this
.
Bottom
=
v
;
};
CMargins
.
prototype
.
get_Flag
=
function
()
{
return
this
.
Flag
;
};
CMargins
.
prototype
.
put_Flag
=
function
(
v
)
{
this
.
Flag
=
v
;
};
window
[
'
Asc
'
][
'
CBorders
'
]
=
window
[
'
Asc
'
].
CBorders
=
CBorders
;
CBorders
.
prototype
[
'
get_Left
'
]
=
CBorders
.
prototype
.
get_Left
;
CBorders
.
prototype
[
'
put_Left
'
]
=
CBorders
.
prototype
.
put_Left
;
CBorders
.
prototype
[
'
get_Top
'
]
=
CBorders
.
prototype
.
get_Top
;
CBorders
.
prototype
[
'
put_Top
'
]
=
CBorders
.
prototype
.
put_Top
;
CBorders
.
prototype
[
'
get_Right
'
]
=
CBorders
.
prototype
.
get_Right
;
CBorders
.
prototype
[
'
put_Right
'
]
=
CBorders
.
prototype
.
put_Right
;
CBorders
.
prototype
[
'
get_Bottom
'
]
=
CBorders
.
prototype
.
get_Bottom
;
CBorders
.
prototype
[
'
put_Bottom
'
]
=
CBorders
.
prototype
.
put_Bottom
;
CBorders
.
prototype
[
'
get_InsideH
'
]
=
CBorders
.
prototype
.
get_InsideH
;
CBorders
.
prototype
[
'
put_InsideH
'
]
=
CBorders
.
prototype
.
put_InsideH
;
CBorders
.
prototype
[
'
get_InsideV
'
]
=
CBorders
.
prototype
.
get_InsideV
;
CBorders
.
prototype
[
'
put_InsideV
'
]
=
CBorders
.
prototype
.
put_InsideV
;
window
[
'
Asc
'
][
'
CMargins
'
]
=
window
[
'
Asc
'
].
CMargins
=
CMargins
;
CMargins
.
prototype
[
'
get_Left
'
]
=
CMargins
.
prototype
.
get_Left
;
CMargins
.
prototype
[
'
put_Left
'
]
=
CMargins
.
prototype
.
put_Left
;
CMargins
.
prototype
[
'
get_Right
'
]
=
CMargins
.
prototype
.
get_Right
;
CMargins
.
prototype
[
'
put_Right
'
]
=
CMargins
.
prototype
.
put_Right
;
CMargins
.
prototype
[
'
get_Top
'
]
=
CMargins
.
prototype
.
get_Top
;
CMargins
.
prototype
[
'
put_Top
'
]
=
CMargins
.
prototype
.
put_Top
;
CMargins
.
prototype
[
'
get_Bottom
'
]
=
CMargins
.
prototype
.
get_Bottom
;
CMargins
.
prototype
[
'
put_Bottom
'
]
=
CMargins
.
prototype
.
put_Bottom
;
CMargins
.
prototype
[
'
get_Flag
'
]
=
CMargins
.
prototype
.
get_Flag
;
CMargins
.
prototype
[
'
put_Flag
'
]
=
CMargins
.
prototype
.
put_Flag
;
// ---------------------------------------------------------------
function
CParagraphPropEx
(
obj
)
{
if
(
obj
)
{
this
.
ContextualSpacing
=
(
undefined
!=
obj
.
ContextualSpacing
)
?
obj
.
ContextualSpacing
:
null
;
this
.
Ind
=
(
undefined
!=
obj
.
Ind
&&
null
!=
obj
.
Ind
)
?
new
Asc
.
asc_CParagraphInd
(
obj
.
Ind
)
:
null
;
this
.
Jc
=
(
undefined
!=
obj
.
Jc
)
?
obj
.
Jc
:
null
;
this
.
KeepLines
=
(
undefined
!=
obj
.
KeepLines
)
?
obj
.
KeepLines
:
null
;
this
.
KeepNext
=
(
undefined
!=
obj
.
KeepNext
)
?
obj
.
KeepNext
:
null
;
this
.
PageBreakBefore
=
(
undefined
!=
obj
.
PageBreakBefore
)
?
obj
.
PageBreakBefore
:
null
;
this
.
Spacing
=
(
undefined
!=
obj
.
Spacing
&&
null
!=
obj
.
Spacing
)
?
new
AscCommon
.
asc_CParagraphSpacing
(
obj
.
Spacing
)
:
null
;
this
.
Shd
=
(
undefined
!=
obj
.
Shd
&&
null
!=
obj
.
Shd
)
?
new
Asc
.
asc_CParagraphShd
(
obj
.
Shd
)
:
null
;
this
.
WidowControl
=
(
undefined
!=
obj
.
WidowControl
)
?
obj
.
WidowControl
:
null
;
// Запрет висячих строк
this
.
Tabs
=
obj
.
Tabs
;
}
else
{
//ContextualSpacing : false, // Удалять ли интервал между параграфами одинакового стиля
//
// Ind :
// {
// Left : 0, // Левый отступ
// Right : 0, // Правый отступ
// FirstLine : 0 // Первая строка
// },
//
// Jc : align_Left, // Прилегание параграфа
//
// KeepLines : false, // переносить параграф на новую страницу,
// // если на текущей он целиком не убирается
// KeepNext : false, // переносить параграф вместе со следующим параграфом
//
// PageBreakBefore : false, // начинать параграф с новой страницы
// Spacing :
// {
// Line : 1.15, // Расстояние между строками внутри абзаца
// LineRule : linerule_Auto, // Тип расстрояния между строками
// Before : 0, // Дополнительное расстояние до абзаца
// After : 10 * g_dKoef_pt_to_mm // Дополнительное расстояние после абзаца
// },
//
// Shd :
// {
// Value : shd_Nil,
// Color :
// {
// r : 255,
// g : 255,
// b : 255
// }
// },
//
// WidowControl : true, // Запрет висячих строк
//
// Tabs : []
this
.
ContextualSpacing
=
false
;
this
.
Ind
=
new
Asc
.
asc_CParagraphInd
();
this
.
Jc
=
AscCommon
.
align_Left
;
this
.
KeepLines
=
false
;
this
.
KeepNext
=
false
;
this
.
PageBreakBefore
=
false
;
this
.
Spacing
=
new
AscCommon
.
asc_CParagraphSpacing
();
this
.
Shd
=
new
Asc
.
asc_CParagraphShd
();
this
.
WidowControl
=
true
;
// Запрет висячих строк
this
.
Tabs
=
null
;
}
}
CParagraphPropEx
.
prototype
.
get_ContextualSpacing
=
function
()
{
return
this
.
ContextualSpacing
;
};
CParagraphPropEx
.
prototype
.
get_Ind
=
function
()
{
return
this
.
Ind
;
};
CParagraphPropEx
.
prototype
.
get_Jc
=
function
()
{
return
this
.
Jc
;
};
CParagraphPropEx
.
prototype
.
get_KeepLines
=
function
()
{
return
this
.
KeepLines
;
};
CParagraphPropEx
.
prototype
.
get_KeepNext
=
function
()
{
return
this
.
KeepNext
;
};
CParagraphPropEx
.
prototype
.
get_PageBreakBefore
=
function
()
{
return
this
.
PageBreakBefore
;
};
CParagraphPropEx
.
prototype
.
get_Spacing
=
function
()
{
return
this
.
Spacing
;
};
CParagraphPropEx
.
prototype
.
get_Shd
=
function
()
{
return
this
.
Shd
;
};
CParagraphPropEx
.
prototype
.
get_WidowControl
=
function
()
{
return
this
.
WidowControl
;
};
CParagraphPropEx
.
prototype
.
get_Tabs
=
function
()
{
return
this
.
Tabs
;
};
function
CTextProp
(
obj
)
{
if
(
obj
)
{
this
.
Bold
=
(
undefined
!=
obj
.
Bold
)
?
obj
.
Bold
:
null
;
this
.
Italic
=
(
undefined
!=
obj
.
Italic
)
?
obj
.
Italic
:
null
;
this
.
Underline
=
(
undefined
!=
obj
.
Underline
)
?
obj
.
Underline
:
null
;
this
.
Strikeout
=
(
undefined
!=
obj
.
Strikeout
)
?
obj
.
Strikeout
:
null
;
this
.
FontFamily
=
(
undefined
!=
obj
.
FontFamily
&&
null
!=
obj
.
FontFamily
)
?
new
AscCommon
.
asc_CTextFontFamily
(
obj
.
FontFamily
)
:
null
;
this
.
FontSize
=
(
undefined
!=
obj
.
FontSize
)
?
obj
.
FontSize
:
null
;
this
.
Color
=
(
undefined
!=
obj
.
Color
&&
null
!=
obj
.
Color
)
?
AscCommon
.
CreateAscColorCustom
(
obj
.
Color
.
r
,
obj
.
Color
.
g
,
obj
.
Color
.
b
)
:
null
;
this
.
VertAlign
=
(
undefined
!=
obj
.
VertAlign
)
?
obj
.
VertAlign
:
null
;
this
.
HighLight
=
(
undefined
!=
obj
.
HighLight
)
?
obj
.
HighLight
==
AscCommonWord
.
highlight_None
?
obj
.
HighLight
:
new
AscCommon
.
CColor
(
obj
.
HighLight
.
r
,
obj
.
HighLight
.
g
,
obj
.
HighLight
.
b
)
:
null
;
this
.
DStrikeout
=
(
undefined
!=
obj
.
DStrikeout
)
?
obj
.
DStrikeout
:
null
;
this
.
Spacing
=
(
undefined
!=
obj
.
Spacing
)
?
obj
.
Spacing
:
null
;
this
.
Caps
=
(
undefined
!=
obj
.
Caps
)
?
obj
.
Caps
:
null
;
this
.
SmallCaps
=
(
undefined
!=
obj
.
SmallCaps
)
?
obj
.
SmallCaps
:
null
;
}
else
{
// Bold : false,
// Italic : false,
// Underline : false,
// Strikeout : false,
// FontFamily :
// {
// Name : "Times New Roman",
// Index : -1
// },
// FontSize : 12,
// Color :
// {
// r : 0,
// g : 0,
// b : 0
// },
// VertAlign : vertalign_Baseline,
// HighLight : highlight_None
this
.
Bold
=
false
;
this
.
Italic
=
false
;
this
.
Underline
=
false
;
this
.
Strikeout
=
false
;
this
.
FontFamily
=
new
asc_CTextFontFamily
();
this
.
FontSize
=
12
;
this
.
Color
=
AscCommon
.
CreateAscColorCustom
(
0
,
0
,
0
);
this
.
VertAlign
=
AscCommon
.
vertalign_Baseline
;
this
.
HighLight
=
AscCommonWord
.
highlight_None
;
this
.
DStrikeout
=
false
;
this
.
Spacing
=
0
;
this
.
Caps
=
false
;
this
.
SmallCaps
=
false
;
}
}
CTextProp
.
prototype
.
get_Bold
=
function
()
{
return
this
.
Bold
;
};
CTextProp
.
prototype
.
get_Italic
=
function
()
{
return
this
.
Italic
;
};
CTextProp
.
prototype
.
get_Underline
=
function
()
{
return
this
.
Underline
;
};
CTextProp
.
prototype
.
get_Strikeout
=
function
()
{
return
this
.
Strikeout
;
};
CTextProp
.
prototype
.
get_FontFamily
=
function
()
{
return
this
.
FontFamily
;
};
CTextProp
.
prototype
.
get_FontSize
=
function
()
{
return
this
.
FontSize
;
};
CTextProp
.
prototype
.
get_Color
=
function
()
{
return
this
.
Color
;
};
CTextProp
.
prototype
.
get_VertAlign
=
function
()
{
return
this
.
VertAlign
;
};
CTextProp
.
prototype
.
get_HighLight
=
function
()
{
return
this
.
HighLight
;
};
CTextProp
.
prototype
.
get_Spacing
=
function
()
{
return
this
.
Spacing
;
};
CTextProp
.
prototype
.
get_DStrikeout
=
function
()
{
return
this
.
DStrikeout
;
};
CTextProp
.
prototype
.
get_Caps
=
function
()
{
return
this
.
Caps
;
};
CTextProp
.
prototype
.
get_SmallCaps
=
function
()
{
return
this
.
SmallCaps
;
};
CParagraphPropEx
.
prototype
[
'
get_ContextualSpacing
'
]
=
CParagraphPropEx
.
prototype
.
get_ContextualSpacing
;
CParagraphPropEx
.
prototype
[
'
get_Ind
'
]
=
CParagraphPropEx
.
prototype
.
get_Ind
;
CParagraphPropEx
.
prototype
[
'
get_Jc
'
]
=
CParagraphPropEx
.
prototype
.
get_Jc
;
CParagraphPropEx
.
prototype
[
'
get_KeepLines
'
]
=
CParagraphPropEx
.
prototype
.
get_KeepLines
;
CParagraphPropEx
.
prototype
[
'
get_KeepNext
'
]
=
CParagraphPropEx
.
prototype
.
get_KeepNext
;
CParagraphPropEx
.
prototype
[
'
get_PageBreakBefore
'
]
=
CParagraphPropEx
.
prototype
.
get_PageBreakBefore
;
CParagraphPropEx
.
prototype
[
'
get_Spacing
'
]
=
CParagraphPropEx
.
prototype
.
get_Spacing
;
CParagraphPropEx
.
prototype
[
'
get_Shd
'
]
=
CParagraphPropEx
.
prototype
.
get_Shd
;
CParagraphPropEx
.
prototype
[
'
get_WidowControl
'
]
=
CParagraphPropEx
.
prototype
.
get_WidowControl
;
CParagraphPropEx
.
prototype
[
'
get_Tabs
'
]
=
CParagraphPropEx
.
prototype
.
get_Tabs
;
CTextProp
.
prototype
[
'
get_Bold
'
]
=
CTextProp
.
prototype
.
get_Bold
;
CTextProp
.
prototype
[
'
get_Italic
'
]
=
CTextProp
.
prototype
.
get_Italic
;
CTextProp
.
prototype
[
'
get_Underline
'
]
=
CTextProp
.
prototype
.
get_Underline
;
CTextProp
.
prototype
[
'
get_Strikeout
'
]
=
CTextProp
.
prototype
.
get_Strikeout
;
CTextProp
.
prototype
[
'
get_FontFamily
'
]
=
CTextProp
.
prototype
.
get_FontFamily
;
CTextProp
.
prototype
[
'
get_FontSize
'
]
=
CTextProp
.
prototype
.
get_FontSize
;
CTextProp
.
prototype
[
'
get_Color
'
]
=
CTextProp
.
prototype
.
get_Color
;
CTextProp
.
prototype
[
'
get_VertAlign
'
]
=
CTextProp
.
prototype
.
get_VertAlign
;
CTextProp
.
prototype
[
'
get_HighLight
'
]
=
CTextProp
.
prototype
.
get_HighLight
;
CTextProp
.
prototype
[
'
get_Spacing
'
]
=
CTextProp
.
prototype
.
get_Spacing
;
CTextProp
.
prototype
[
'
get_DStrikeout
'
]
=
CTextProp
.
prototype
.
get_DStrikeout
;
CTextProp
.
prototype
[
'
get_Caps
'
]
=
CTextProp
.
prototype
.
get_Caps
;
CTextProp
.
prototype
[
'
get_SmallCaps
'
]
=
CTextProp
.
prototype
.
get_SmallCaps
;
// paragraph and text properties objects container
function
CParagraphAndTextProp
(
paragraphProp
,
textProp
)
{
this
.
ParaPr
=
(
undefined
!=
paragraphProp
&&
null
!=
paragraphProp
)
?
new
CParagraphPropEx
(
paragraphProp
)
:
null
;
this
.
TextPr
=
(
undefined
!=
textProp
&&
null
!=
textProp
)
?
new
CTextProp
(
textProp
)
:
null
;
}
CParagraphAndTextProp
.
prototype
.
get_ParaPr
=
function
()
{
return
this
.
ParaPr
;
};
CParagraphAndTextProp
.
prototype
.
get_TextPr
=
function
()
{
return
this
.
TextPr
;
};
window
[
'
Asc
'
][
'
CParagraphAndTextProp
'
]
=
window
[
'
Asc
'
].
CParagraphAndTextProp
=
CParagraphAndTextProp
;
CParagraphAndTextProp
.
prototype
[
'
get_ParaPr
'
]
=
CParagraphAndTextProp
.
prototype
.
get_ParaPr
;
CParagraphAndTextProp
.
prototype
[
'
get_TextPr
'
]
=
CParagraphAndTextProp
.
prototype
.
get_TextPr
;
// ---------------------------------------------------------------
function
GenerateTableStyles
(
drawingDoc
,
logicDoc
,
tableLook
)
{
var
_dst_styles
=
[];
...
...
@@ -143,7 +942,74 @@ g_oDocumentDefaultTableCellPr.Init_Default();
g_oDocumentDefaultTableRowPr
.
Init_Default
();
g_oDocumentDefaultTableStylePr
.
Init_Default
();
//------------------------------------------------------------export----------------------------------------------------
CAscTableStyle
.
prototype
[
'
get_Id
'
]
=
CAscTableStyle
.
prototype
.
get_Id
;
CAscTableStyle
.
prototype
[
'
get_Image
'
]
=
CAscTableStyle
.
prototype
.
get_Image
;
CAscTableStyle
.
prototype
[
'
get_Type
'
]
=
CAscTableStyle
.
prototype
.
get_Type
;
// ----------------------------------------------------------------
/*
структура заголовков, предварительно, выглядит так
{
headerText: "Header1",//заголовок
pageNumber: 0, //содержит номер страницы, где находится искомая последовательность
X: 0,//координаты по OX начала последовательности на данной страницы
Y: 0,//координаты по OY начала последовательности на данной страницы
level: 0//уровень заголовка
}
заголовки приходят либо в списке, либо последовательно.
*/
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
;
};
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
;
/*
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})
];
*/
\ No newline at end of file
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