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
cdcc0209
Commit
cdcc0209
authored
Sep 21, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new class CFootnotePr.
parent
699eb1bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
476 additions
and
40 deletions
+476
-40
common/Drawings/Format/Constants.js
common/Drawings/Format/Constants.js
+35
-27
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+155
-7
word/Editor/Sections.js
word/Editor/Sections.js
+286
-6
No files found.
common/Drawings/Format/Constants.js
View file @
cdcc0209
...
...
@@ -2204,33 +2204,37 @@
window
[
'
AscDFH
'
].
historyitem_Styles_ChangeDefaultParaPr
=
4
;
// Изменяем настройки параграфа по умолчанию
// Тип изменений в классе CSectionPr
window
[
'
AscDFH
'
].
historyitem_Section_PageSize_Orient
=
1
;
// Меняем ориентацию страницы
window
[
'
AscDFH
'
].
historyitem_Section_PageSize_Size
=
2
;
// Меняем размер страницы
window
[
'
AscDFH
'
].
historyitem_Section_PageMargins
=
3
;
// Меняем отступы страницы
window
[
'
AscDFH
'
].
historyitem_Section_Type
=
4
;
// Меняем тип секции
window
[
'
AscDFH
'
].
historyitem_Section_Borders_Left
=
5
;
// Меняем левую границу
window
[
'
AscDFH
'
].
historyitem_Section_Borders_Top
=
6
;
// Меняем верхнюю границу
window
[
'
AscDFH
'
].
historyitem_Section_Borders_Right
=
7
;
// Меняем правую границу
window
[
'
AscDFH
'
].
historyitem_Section_Borders_Bottom
=
8
;
// Меняем нижнюю границу
window
[
'
AscDFH
'
].
historyitem_Section_Borders_Display
=
9
;
// Меняем тип страниц, на которых рисуются границы
window
[
'
AscDFH
'
].
historyitem_Section_Borders_OffsetFrom
=
10
;
// Меняем тип отступа границ
window
[
'
AscDFH
'
].
historyitem_Section_Borders_ZOrder
=
11
;
// Меняем Z-index границ
window
[
'
AscDFH
'
].
historyitem_Section_Header_First
=
12
;
// Меняем верхний колонтитул первой страницы
window
[
'
AscDFH
'
].
historyitem_Section_Header_Even
=
13
;
// Меняем верхний колонтитул четных страниц
window
[
'
AscDFH
'
].
historyitem_Section_Header_Default
=
14
;
// Меняем верхний колонтитул по умолчанию
window
[
'
AscDFH
'
].
historyitem_Section_Footer_First
=
15
;
// Меняем нижний колонтитул первой страницы
window
[
'
AscDFH
'
].
historyitem_Section_Footer_Even
=
16
;
// Меняем нижний колонтитул четных страниц
window
[
'
AscDFH
'
].
historyitem_Section_Footer_Default
=
17
;
// Меняем нижний колонтитул по умолчанию
window
[
'
AscDFH
'
].
historyitem_Section_TitlePage
=
18
;
// Меняем настройку наличия специального колонтитула для первой страницы
window
[
'
AscDFH
'
].
historyitem_Section_PageMargins_Header
=
19
;
// Меняем расстояние от верха страницы до верхнего колонтитула
window
[
'
AscDFH
'
].
historyitem_Section_PageMargins_Footer
=
20
;
// Меняем расстояние от низа страницы до нижнего колонтитула
window
[
'
AscDFH
'
].
historyitem_Section_PageNumType_Start
=
21
;
// Изменяем начальное значение для нумерации страниц
window
[
'
AscDFH
'
].
historyitem_Section_Columns_EqualWidth
=
22
;
window
[
'
AscDFH
'
].
historyitem_Section_Columns_Space
=
23
;
window
[
'
AscDFH
'
].
historyitem_Section_Columns_Num
=
24
;
window
[
'
AscDFH
'
].
historyitem_Section_Columns_Sep
=
25
;
window
[
'
AscDFH
'
].
historyitem_Section_Columns_Col
=
26
;
window
[
'
AscDFH
'
].
historyitem_Section_Columns_SetCols
=
27
;
window
[
'
AscDFH
'
].
historyitem_Section_PageSize_Orient
=
1
;
// Меняем ориентацию страницы
window
[
'
AscDFH
'
].
historyitem_Section_PageSize_Size
=
2
;
// Меняем размер страницы
window
[
'
AscDFH
'
].
historyitem_Section_PageMargins
=
3
;
// Меняем отступы страницы
window
[
'
AscDFH
'
].
historyitem_Section_Type
=
4
;
// Меняем тип секции
window
[
'
AscDFH
'
].
historyitem_Section_Borders_Left
=
5
;
// Меняем левую границу
window
[
'
AscDFH
'
].
historyitem_Section_Borders_Top
=
6
;
// Меняем верхнюю границу
window
[
'
AscDFH
'
].
historyitem_Section_Borders_Right
=
7
;
// Меняем правую границу
window
[
'
AscDFH
'
].
historyitem_Section_Borders_Bottom
=
8
;
// Меняем нижнюю границу
window
[
'
AscDFH
'
].
historyitem_Section_Borders_Display
=
9
;
// Меняем тип страниц, на которых рисуются границы
window
[
'
AscDFH
'
].
historyitem_Section_Borders_OffsetFrom
=
10
;
// Меняем тип отступа границ
window
[
'
AscDFH
'
].
historyitem_Section_Borders_ZOrder
=
11
;
// Меняем Z-index границ
window
[
'
AscDFH
'
].
historyitem_Section_Header_First
=
12
;
// Меняем верхний колонтитул первой страницы
window
[
'
AscDFH
'
].
historyitem_Section_Header_Even
=
13
;
// Меняем верхний колонтитул четных страниц
window
[
'
AscDFH
'
].
historyitem_Section_Header_Default
=
14
;
// Меняем верхний колонтитул по умолчанию
window
[
'
AscDFH
'
].
historyitem_Section_Footer_First
=
15
;
// Меняем нижний колонтитул первой страницы
window
[
'
AscDFH
'
].
historyitem_Section_Footer_Even
=
16
;
// Меняем нижний колонтитул четных страниц
window
[
'
AscDFH
'
].
historyitem_Section_Footer_Default
=
17
;
// Меняем нижний колонтитул по умолчанию
window
[
'
AscDFH
'
].
historyitem_Section_TitlePage
=
18
;
// Меняем настройку наличия специального колонтитула для первой страницы
window
[
'
AscDFH
'
].
historyitem_Section_PageMargins_Header
=
19
;
// Меняем расстояние от верха страницы до верхнего колонтитула
window
[
'
AscDFH
'
].
historyitem_Section_PageMargins_Footer
=
20
;
// Меняем расстояние от низа страницы до нижнего колонтитула
window
[
'
AscDFH
'
].
historyitem_Section_PageNumType_Start
=
21
;
// Изменяем начальное значение для нумерации страниц
window
[
'
AscDFH
'
].
historyitem_Section_Columns_EqualWidth
=
22
;
window
[
'
AscDFH
'
].
historyitem_Section_Columns_Space
=
23
;
window
[
'
AscDFH
'
].
historyitem_Section_Columns_Num
=
24
;
window
[
'
AscDFH
'
].
historyitem_Section_Columns_Sep
=
25
;
window
[
'
AscDFH
'
].
historyitem_Section_Columns_Col
=
26
;
window
[
'
AscDFH
'
].
historyitem_Section_Columns_SetCols
=
27
;
window
[
'
AscDFH
'
].
historyitem_Section_Footnote_Pos
=
28
;
window
[
'
AscDFH
'
].
historyitem_Section_Footnote_NumStart
=
29
;
window
[
'
AscDFH
'
].
historyitem_Section_Footnote_NumRestart
=
30
;
window
[
'
AscDFH
'
].
historyitem_Section_Footnote_NumFormat
=
31
;
// Тип класса, к которому относится данный элемент истории
window
[
'
AscDFH
'
].
historyitem_State_Unknown
=
0
;
...
...
@@ -2366,6 +2370,10 @@
window
[
'
AscDFH
'
].
historyitem_Footnotes_SetSeparator
=
2
;
window
[
'
AscDFH
'
].
historyitem_Footnotes_SetContinuationSeparator
=
3
;
window
[
'
AscDFH
'
].
historyitem_Footnotes_SetContinuationNotice
=
4
;
window
[
'
AscDFH
'
].
historyitem_Footnotes_SetFootnotePrPos
=
5
;
window
[
'
AscDFH
'
].
historyitem_Footnotes_SetFootnotePrNumStart
=
6
;
window
[
'
AscDFH
'
].
historyitem_Footnotes_SetFootnotePrNumRestart
=
7
;
window
[
'
AscDFH
'
].
historyitem_Footnotes_SetFootnotePrNumFormat
=
8
;
window
[
'
AscDFH
'
].
historydescription_Cut
=
0x0001
;
window
[
'
AscDFH
'
].
historydescription_PasteButtonIE
=
0x0002
;
...
...
word/Editor/Footnotes.js
View file @
cdcc0209
...
...
@@ -44,6 +44,9 @@ function CFootnotesController(LogicDocument)
this
.
Id
=
LogicDocument
.
Get_IdCounter
().
Get_NewId
();
this
.
FootnotePr
=
new
CFootnotePr
();
// Глобальные настройки для сносок
this
.
FootnotePr
.
InitDefault
();
this
.
Footnote
=
{};
// Список всех сносок с ключом - Id.
this
.
Pages
=
[];
...
...
@@ -112,9 +115,12 @@ CFootnotesController.prototype.CreateFootnote = function()
{
var
NewFootnote
=
new
CFootEndnote
(
this
);
this
.
Footnote
[
NewFootnote
.
Get_Id
()]
=
NewFootnote
;
var
oHistory
=
this
.
LogicDocument
.
Get_History
();
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_AddFootnote
,
Id
:
NewFootnote
.
Get_Id
()});
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_AddFootnote
,
Id
:
NewFootnote
.
Get_Id
()
});
return
NewFootnote
;
};
...
...
@@ -125,8 +131,11 @@ CFootnotesController.prototype.CreateFootnote = function()
CFootnotesController
.
prototype
.
AddFootnote
=
function
(
oFootnote
)
{
this
.
Footnote
[
oFootnote
.
Get_Id
()]
=
oFootnote
;
var
oHistory
=
this
.
LogicDocument
.
Get_History
();
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_AddFootnote
,
Id
:
oFootnote
.
Get_Id
()});
var
oHistory
=
this
.
LogicDocument
.
Get_History
();
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_AddFootnote
,
Id
:
oFootnote
.
Get_Id
()
});
};
CFootnotesController
.
prototype
.
SetSeparator
=
function
(
oFootnote
)
{
...
...
@@ -134,7 +143,11 @@ CFootnotesController.prototype.SetSeparator = function(oFootnote)
var
oOldValue
=
this
.
SeparatorFootnote
?
this
.
SeparatorFootnote
:
null
;
var
oHistory
=
this
.
LogicDocument
.
Get_History
();
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_SetSeparator
,
New
:
oNewValue
,
Old
:
oOldValue
});
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_SetSeparator
,
New
:
oNewValue
,
Old
:
oOldValue
});
this
.
SeparatorFootnote
=
oNewValue
;
};
...
...
@@ -144,7 +157,11 @@ CFootnotesController.prototype.SetContinuationSeparator = function(oFootnote)
var
oOldValue
=
this
.
ContinuationSeparatorFootnote
?
this
.
ContinuationSeparatorFootnote
:
null
;
var
oHistory
=
this
.
LogicDocument
.
Get_History
();
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_SetContinuationSeparator
,
New
:
oNewValue
,
Old
:
oOldValue
});
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_SetContinuationSeparator
,
New
:
oNewValue
,
Old
:
oOldValue
});
this
.
ContinuationSeparatorFootnote
=
oNewValue
;
};
...
...
@@ -154,10 +171,66 @@ CFootnotesController.prototype.SetContinuationNotice = function(oFootnote)
var
oOldValue
=
this
.
ContinuationNoticeFootnote
?
this
.
ContinuationNoticeFootnote
:
null
;
var
oHistory
=
this
.
LogicDocument
.
Get_History
();
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_SetContinuationNotice
,
New
:
oNewValue
,
Old
:
oOldValue
});
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_SetContinuationNotice
,
New
:
oNewValue
,
Old
:
oOldValue
});
this
.
ContinuationNoticeFootnote
=
oNewValue
;
};
CFootnotesController
.
prototype
.
SetFootnotePrNumFormat
=
function
(
nFormatType
)
{
if
(
undefined
!==
nFormatType
&&
this
.
FootnotePr
.
NumFormat
!==
nFormatType
)
{
var
oHistory
=
this
.
LogicDocument
.
Get_History
();
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumFormat
,
New
:
nFormatType
,
Old
:
this
.
FootnotePr
.
NumFormat
});
this
.
FootnotePr
.
NumFormat
=
nFormatType
;
}
};
CFootnotesController
.
prototype
.
SetFootnotePrPos
=
function
(
nPos
)
{
if
(
undefined
!==
nPos
&&
this
.
FootnotePr
.
Pos
!==
nPos
)
{
var
oHistory
=
this
.
LogicDocument
.
Get_History
();
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_SetFootnotePrPos
,
New
:
nPos
,
Old
:
this
.
FootnotePr
.
Pos
});
this
.
FootnotePr
.
Pos
=
nPos
;
}
};
CFootnotesController
.
prototype
.
SetFootnotePrNumStart
=
function
(
nStart
)
{
if
(
undefined
!==
nStart
&&
this
.
FootnotePr
.
NumStart
!==
nStart
)
{
var
oHistory
=
this
.
LogicDocument
.
Get_History
();
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumStart
,
New
:
nStart
,
Old
:
this
.
FootnotePr
.
NumStart
});
this
.
FootnotePr
.
NumStart
=
nStart
;
}
};
CFootnotesController
.
prototype
.
SetFootnotePrNumRestart
=
function
(
nRestartType
)
{
if
(
undefined
!==
nRestartType
&&
this
.
FootnotePr
.
NumRestart
!==
nRestartType
)
{
var
oHistory
=
this
.
LogicDocument
.
Get_History
();
oHistory
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumRestart
,
New
:
nRestartType
,
Old
:
this
.
FootnotePr
.
NumRestart
});
this
.
FootnotePr
.
NumRestart
=
nRestartType
;
}
};
/**
* Сбрасываем рассчетные данный для заданной страницы.
* @param {number} nPageIndex
...
...
@@ -849,6 +922,26 @@ CFootnotesController.prototype.Undo = function(Data)
this
.
ContinuationNoticeFootnote
=
Data
.
Old
;
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrPos
:
{
this
.
FootnotePr
.
Pos
=
Data
.
Old
;
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumStart
:
{
this
.
FootnotePr
.
NumStart
=
Data
.
Old
;
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumRestart
:
{
this
.
FootnotePr
.
NumRestart
=
Data
.
Old
;
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumFormat
:
{
this
.
FootnotePr
.
NumFormat
=
Data
.
Old
;
break
;
}
}
};
CFootnotesController
.
prototype
.
Redo
=
function
(
Data
)
...
...
@@ -877,6 +970,26 @@ CFootnotesController.prototype.Redo = function(Data)
this
.
ContinuationNoticeFootnote
=
Data
.
New
;
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrPos
:
{
this
.
FootnotePr
.
Pos
=
Data
.
New
;
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumStart
:
{
this
.
FootnotePr
.
NumStart
=
Data
.
New
;
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumRestart
:
{
this
.
FootnotePr
.
NumRestart
=
Data
.
New
;
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumFormat
:
{
this
.
FootnotePr
.
NumFormat
=
Data
.
New
;
break
;
}
}
};
CFootnotesController
.
prototype
.
Save_Changes
=
function
(
Data
,
Writer
)
...
...
@@ -915,6 +1028,16 @@ CFootnotesController.prototype.Save_Changes = function(Data, Writer)
}
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrPos
:
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumStart
:
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumRestart
:
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumFormat
:
{
// Long : value
Writer
.
WriteLong
(
Data
.
New
);
break
;
}
}
return
Writer
;
...
...
@@ -982,6 +1105,31 @@ CFootnotesController.prototype.Load_Changes = function(Reader, Reader2)
}
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrPos
:
{
// Long : value
this
.
FootnotePr
.
Pos
=
Reader
.
GetLong
();
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumStart
:
{
// Long : value
this
.
FootnotePr
.
NumStart
=
Reader
.
GetLong
();
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumRestart
:
{
// Long : value
this
.
FootnotePr
.
NumRestart
=
Reader
.
GetLong
();
break
;
}
case
AscDFH
.
historyitem_Footnotes_SetFootnotePrNumFormat
:
{
// Long : value
this
.
FootnotePr
.
NumFormat
=
Reader
.
GetLong
();
break
;
}
}
return
true
;
...
...
word/Editor/Sections.js
View file @
cdcc0209
...
...
@@ -53,6 +53,15 @@ var section_borders_OffsetFromText = 0x01;
var
section_borders_ZOrderBack
=
0x00
;
var
section_borders_ZOrderFront
=
0x01
;
var
section_footnote_RestartContinious
=
0x00
;
var
section_footnote_RestartEachSect
=
0x01
;
var
section_footnote_RestartEachPage
=
0x02
;
var
section_footnote_PosBeneathText
=
0x00
;
var
section_footnote_PosDocEnd
=
0x01
;
var
section_footnote_PosPageBottom
=
0x02
;
var
section_footnote_PosSectEnd
=
0x03
;
function
CSectionPr
(
LogicDocument
)
{
this
.
Id
=
AscCommon
.
g_oIdCounter
.
Get_NewId
();
...
...
@@ -65,19 +74,19 @@ function CSectionPr(LogicDocument)
this
.
Borders
=
new
CSectionBorders
();
this
.
PageNumType
=
new
CSectionPageNumType
();
this
.
FooterFirst
=
null
;
this
.
FooterEven
=
null
;
this
.
FooterDefault
=
null
;
this
.
HeaderFirst
=
null
;
this
.
HeaderEven
=
null
;
this
.
HeaderDefault
=
null
;
this
.
TitlePage
=
false
;
this
.
Columns
=
new
CSectionColumns
(
this
);
this
.
FootnotePr
=
new
CFootnotePr
();
// Добавляем данный класс в таблицу Id (обязательно в конце конструктора)
g_oTableId
.
Add
(
this
,
this
.
Id
);
...
...
@@ -963,6 +972,27 @@ CSectionPr.prototype =
this
.
Columns
.
Cols
=
Data
.
Old
;
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_Pos
:
{
this
.
FootnotePr
.
Pos
=
Data
.
Old
;
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_NumStart
:
{
this
.
FootnotePr
.
NumStart
=
Data
.
Old
;
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_NumRestart
:
{
this
.
FootnotePr
.
NumRestart
=
Data
.
Old
;
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_NumFormat
:
{
this
.
FootnotePr
.
NumFormat
=
Data
.
Old
;
break
;
}
}
},
...
...
@@ -1141,6 +1171,27 @@ CSectionPr.prototype =
this
.
Columns
.
Cols
=
Data
.
New
;
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_Pos
:
{
this
.
FootnotePr
.
Pos
=
Data
.
New
;
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_NumStart
:
{
this
.
FootnotePr
.
NumStart
=
Data
.
New
;
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_NumRestart
:
{
this
.
FootnotePr
.
NumRestart
=
Data
.
New
;
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_NumFormat
:
{
this
.
FootnotePr
.
NumFormat
=
Data
.
New
;
break
;
}
}
},
...
...
@@ -1391,8 +1442,25 @@ CSectionPr.prototype =
}
break
;
}
}
case
AscDFH
.
historyitem_Section_Footnote_Pos
:
case
AscDFH
.
historyitem_Section_Footnote_NumStart
:
case
AscDFH
.
historyitem_Section_Footnote_NumRestart
:
case
AscDFH
.
historyitem_Section_Footnote_NumFormat
:
{
// Bool : undefined ?
// false -> Long : value
if
(
undefined
===
Data
.
New
)
Writer
.
WriteBool
(
true
);
else
{
Writer
.
WriteBool
(
false
);
Writer
.
WriteLong
(
Data
.
New
);
}
break
;
}
}
},
Load_Changes
:
function
(
Reader
)
...
...
@@ -1681,6 +1749,55 @@ CSectionPr.prototype =
}
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_Pos
:
{
// Bool : undefined ?
// false -> Long : value
if
(
true
===
Reader
.
GetBool
())
this
.
FootnotePr
.
Pos
=
undefined
;
else
this
.
FootnotePr
.
Pos
=
Reader
.
GetLong
();
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_NumStart
:
{
// Bool : undefined ?
// false -> Long : value
if
(
true
===
Reader
.
GetBool
())
this
.
FootnotePr
.
NumStart
=
undefined
;
else
this
.
FootnotePr
.
NumStart
=
Reader
.
GetLong
();
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_NumRestart
:
{
// Bool : undefined ?
// false -> Long : value
if
(
true
===
Reader
.
GetBool
())
this
.
FootnotePr
.
NumRestart
=
undefined
;
else
this
.
FootnotePr
.
NumRestart
=
Reader
.
GetLong
();
break
;
}
case
AscDFH
.
historyitem_Section_Footnote_NumFormat
:
{
// Bool : undefined ?
// false -> Long : value
if
(
true
===
Reader
.
GetBool
())
this
.
FootnotePr
.
NumFormat
=
undefined
;
else
this
.
FootnotePr
.
NumFormat
=
Reader
.
GetLong
();
break
;
}
}
},
...
...
@@ -1697,6 +1814,7 @@ CSectionPr.prototype =
// Колонтитулы не пишем в бинарник, при созданиии класса они всегда null, а TitlePage = false
// Variable : PageNumType
// Variable : CSectionColumns
// Variable : CFootnotePr
Writer
.
WriteString2
(
""
+
this
.
Id
);
Writer
.
WriteString2
(
""
+
this
.
LogicDocument
.
Get_Id
()
);
...
...
@@ -1706,6 +1824,7 @@ CSectionPr.prototype =
this
.
Borders
.
Write_ToBinary
(
Writer
);
this
.
PageNumType
.
Write_ToBinary
(
Writer
);
this
.
Columns
.
Write_ToBinary
(
Writer
);
this
.
FootnotePr
.
WriteToBinary
(
Writer
);
},
Read_FromBinary2
:
function
(
Reader
)
...
...
@@ -1719,6 +1838,7 @@ CSectionPr.prototype =
// Колонтитулы не пишем в бинарник, при созданиии класса они всегда null, а TitlePage = false
// Variable : PageNumType
// Variable : CSectionColumns
// Variable : CFootnotePr
this
.
Id
=
Reader
.
GetString2
();
this
.
LogicDocument
=
g_oTableId
.
Get_ById
(
Reader
.
GetString2
()
);
...
...
@@ -1728,8 +1848,93 @@ CSectionPr.prototype =
this
.
Borders
.
Read_FromBinary
(
Reader
);
this
.
PageNumType
.
Read_FromBinary
(
Reader
);
this
.
Columns
.
Read_FromBinary
(
Reader
);
this
.
FootnotePr
.
ReadFromBinary
(
Reader
);
}
};
CSectionPr
.
prototype
.
SetFootnotePos
=
function
(
nPos
)
{
if
(
this
.
FootnotePr
.
Pos
!==
nPos
)
{
History
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Section_Footnote_Pos
,
Old
:
this
.
FootnotePr
.
Pos
,
New
:
nPos
});
this
.
FootnotePr
.
Pos
=
nPos
;
}
};
CSectionPr
.
prototype
.
GetFootnotePos
=
function
()
{
if
(
undefined
===
this
.
FootnotePr
.
Pos
)
return
this
.
private_GetDocumentWideFootnotePr
().
Pos
;
return
this
.
FootnotePr
.
Pos
;
};
CSectionPr
.
prototype
.
SetFootnoteNumStart
=
function
(
nStart
)
{
if
(
this
.
FootnotePr
.
NumStart
!==
nStart
)
{
History
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Section_Footnote_NumStart
,
Old
:
this
.
FootnotePr
.
NumStart
,
New
:
nStart
});
this
.
FootnotePr
.
NumStart
=
nStart
;
}
};
CSectionPr
.
prototype
.
GetFootnoteNumStart
=
function
()
{
if
(
undefined
===
this
.
FootnotePr
.
NumStart
)
return
this
.
private_GetDocumentWideFootnotePr
().
NumStart
;
return
this
.
FootnotePr
.
NumStart
;
};
CSectionPr
.
prototype
.
SetFootnoteNumRestart
=
function
(
nRestartType
)
{
if
(
this
.
FootnotePr
.
NumRestart
!==
nRestartType
)
{
History
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Section_Footnote_NumRestart
,
Old
:
this
.
FootnotePr
.
NumRestart
,
New
:
nRestartType
});
this
.
FootnotePr
.
NumRestart
=
nRestartType
;
}
};
CSectionPr
.
prototype
.
GetFootnoteNumRestart
=
function
()
{
if
(
undefined
===
this
.
FootnotePr
.
NumRestart
)
return
this
.
private_GetDocumentWideFootnotePr
().
NumRestart
;
return
this
.
FootnotePr
.
NumRestart
;
};
CSectionPr
.
prototype
.
SetFootnoteNumFormat
=
function
(
nFormatType
)
{
if
(
this
.
FootnotePr
.
NumFormat
!==
nFormatType
)
{
History
.
Add
(
this
,
{
Type
:
AscDFH
.
historyitem_Section_Footnote_NumFormat
,
Old
:
this
.
FootnotePr
.
NumRestart
,
New
:
nRestartType
});
this
.
FootnotePr
.
NumFormat
=
nFormatType
;
}
};
CSectionPr
.
prototype
.
GetFootnoteNumFormat
=
function
()
{
if
(
undefined
===
this
.
FootnotePr
.
NumFormat
)
return
this
.
private_GetDocumentWideFootnotePr
().
NumFormat
;
return
this
.
FootnotePr
.
NumFormat
;
};
CSectionPr
.
prototype
.
private_GetDocumentWideFootnotePr
=
function
()
{
return
this
.
LogicDocument
.
Footnotes
.
FootnotePr
;
};
function
CSectionPageSize
()
{
...
...
@@ -2062,6 +2267,81 @@ function CSectionLayoutInfo(X, Y, XLimit, YLimit)
this
.
Columns
=
[];
}
function
CFootnotePr
()
{
this
.
NumRestart
=
undefined
;
this
.
NumFormat
=
undefined
;
this
.
NumStart
=
undefined
;
this
.
Pos
=
undefined
;
}
CFootnotePr
.
prototype
.
InitDefault
=
function
()
{
this
.
NumFormat
=
numbering_numfmt_Decimal
;
this
.
NumRestart
=
section_footnote_RestartContinious
;
this
.
NumStart
=
1
;
this
.
Pos
=
section_footnote_PosPageBottom
;
};
CFootnotePr
.
prototype
.
WriteToBinary
=
function
(
Writer
)
{
var
StartPos
=
Writer
.
GetCurPosition
();
Writer
.
Skip
(
4
);
var
Flags
=
0
;
if
(
undefined
!==
this
.
NumFormat
)
{
Writer
.
WriteLong
(
this
.
NumFormat
);
Flags
|=
1
;
}
if
(
undefined
!==
this
.
NumRestart
)
{
Writer
.
WriteLong
(
this
.
NumRestart
);
Flags
|=
2
;
}
if
(
undefined
!==
this
.
NumStart
)
{
Writer
.
WriteLong
(
this
.
NumStart
);
Flags
|=
4
;
}
if
(
undefined
!==
this
.
Pos
)
{
Writer
.
WriteLong
(
this
.
Pos
);
Flags
|=
8
;
}
var
EndPos
=
Writer
.
GetCurPosition
();
Writer
.
Seek
(
StartPos
);
Writer
.
WriteLong
(
Flags
);
Writer
.
Seek
(
EndPos
);
};
CFootnotePr
.
prototype
.
ReadFromBinary
=
function
(
Reader
)
{
var
Flags
=
Reader
.
GetLong
();
if
(
Flags
&
1
)
this
.
NumFormat
=
Reader
.
GetLong
();
else
this
.
NumFormat
=
undefined
;
if
(
Flags
&
2
)
this
.
NumRestart
=
Reader
.
GetLong
();
else
this
.
NumRestart
=
undefined
;
if
(
Flags
&
4
)
this
.
NumStart
=
Reader
.
GetLong
();
else
this
.
NumStart
=
undefined
;
if
(
Flags
&
8
)
this
.
Pos
=
Reader
.
GetLong
();
else
this
.
Pos
=
undefined
;
};
//--------------------------------------------------------export----------------------------------------------------
window
[
'
AscCommonWord
'
]
=
window
[
'
AscCommonWord
'
]
||
{};
window
[
'
AscCommonWord
'
].
CSectionPr
=
CSectionPr
;
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