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
ac47c98e
Commit
ac47c98e
authored
Jun 23, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Styles "No Spacing", "Title", "Subtitle", "Quote", "Intense quote" were added to the default list.
parent
2262e238
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
346 additions
and
120 deletions
+346
-120
common/HistoryCommon.js
common/HistoryCommon.js
+5
-0
word/Editor/Serialize2.js
word/Editor/Serialize2.js
+11
-0
word/Editor/Styles.js
word/Editor/Styles.js
+189
-119
word/Editor/StylesChanges.js
word/Editor/StylesChanges.js
+85
-0
word/Private/StyleManager.js
word/Private/StyleManager.js
+56
-1
No files found.
common/HistoryCommon.js
View file @
ac47c98e
...
...
@@ -1505,6 +1505,11 @@
window
[
'
AscDFH
'
].
historyitem_Styles_ChangeDefaultFootnoteTextId
=
window
[
'
AscDFH
'
].
historyitem_type_Styles
|
15
;
window
[
'
AscDFH
'
].
historyitem_Styles_ChangeDefaultFootnoteTextCharId
=
window
[
'
AscDFH
'
].
historyitem_type_Styles
|
16
;
window
[
'
AscDFH
'
].
historyitem_Styles_ChangeDefaultFootnoteReferenceId
=
window
[
'
AscDFH
'
].
historyitem_type_Styles
|
17
;
window
[
'
AscDFH
'
].
historyitem_Styles_ChangeDefaultNoSpacingId
=
window
[
'
AscDFH
'
].
historyitem_type_Styles
|
18
;
window
[
'
AscDFH
'
].
historyitem_Styles_ChangeDefaultTitleId
=
window
[
'
AscDFH
'
].
historyitem_type_Styles
|
19
;
window
[
'
AscDFH
'
].
historyitem_Styles_ChangeDefaultSubtitleId
=
window
[
'
AscDFH
'
].
historyitem_type_Styles
|
20
;
window
[
'
AscDFH
'
].
historyitem_Styles_ChangeDefaultQuoteId
=
window
[
'
AscDFH
'
].
historyitem_type_Styles
|
21
;
window
[
'
AscDFH
'
].
historyitem_Styles_ChangeDefaultIntenseQuoteId
=
window
[
'
AscDFH
'
].
historyitem_type_Styles
|
22
;
//------------------------------------------------------------------------------------------------------------------
// Типы изменений в классе ParaMath
//------------------------------------------------------------------------------------------------------------------
...
...
word/Editor/Serialize2.js
View file @
ac47c98e
...
...
@@ -6283,6 +6283,17 @@ function BinaryFileReader(doc, openParams)
stDefault
.
FootnoteTextChar
=
oNewId
.
id
;
if
(
stDefault
.
FootnoteReference
==
stId
||
"
footnotereference
"
==
sNewStyleName
)
stDefault
.
FootnoteReference
=
oNewId
.
id
;
if
(
stDefault
.
NoSpacing
==
stId
)
stDefault
.
NoSpacing
=
oNewId
.
id
;
if
(
stDefault
.
Title
==
stId
)
stDefault
.
Title
=
oNewId
.
id
;
if
(
stDefault
.
Subtitle
==
stId
)
stDefault
.
Subtitle
=
oNewId
.
id
;
if
(
stDefault
.
Quote
==
stId
)
stDefault
.
Quote
=
oNewId
.
id
;
if
(
stDefault
.
IntenseQuote
==
stId
)
stDefault
.
IntenseQuote
=
oNewId
.
id
;
if
(
true
==
oNewId
.
def
)
{
switch
(
oNewId
.
type
)
...
...
word/Editor/Styles.js
View file @
ac47c98e
...
...
@@ -3194,7 +3194,12 @@ function CStyles(bCreateDefault)
Hyperlink
:
null
,
FootnoteText
:
null
,
FootnoteTextChar
:
null
,
FootnoteReference
:
null
FootnoteReference
:
null
,
NoSpacing
:
null
,
Title
:
null
,
Subtitle
:
null
,
Quote
:
null
,
IntenseQuote
:
null
};
// Заполняем значения по умолчанию
...
...
@@ -3208,115 +3213,115 @@ function CStyles(bCreateDefault)
// Создадим стандартные стили
// Дефолтовый стиль для параграфа
var
Style_Para_Def
=
new
CStyle
(
"
Normal
"
,
null
,
null
,
styletype_Paragraph
);
Style_Para_Def
.
Create_Default_Paragraph
();
this
.
Default
.
Paragraph
=
this
.
Add
(
Style_Para_Def
);
// Дефолтовый стиль для текста
var
Style_Char_Def
=
new
CStyle
(
"
Default Paragraph Font
"
,
null
,
null
,
styletype_Character
);
Style_Char_Def
.
Create_Default_Character
();
this
.
Default
.
Character
=
this
.
Add
(
Style_Char_Def
);
// Дефолтовый стиль для нумерации в списках
var
Style_Num_Def
=
new
CStyle
(
"
No List
"
,
null
,
null
,
styletype_Numbering
);
Style_Num_Def
.
Create_Default_Numbering
();
this
.
Default
.
Numbering
=
this
.
Add
(
Style_Num_Def
);
// Создаем стандартные стили для заголовков
var
Style_H1
=
new
CStyle
(
"
Heading 1
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H1
.
Create_Heading1
();
this
.
Default
.
Headings
[
0
]
=
this
.
Add
(
Style_H1
);
// Создаем стандартные стили для заголовков
var
Style_H2
=
new
CStyle
(
"
Heading 2
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H2
.
Create_Heading2
();
this
.
Default
.
Headings
[
1
]
=
this
.
Add
(
Style_H2
);
// Создаем стандартные стили для заголовков
var
Style_H3
=
new
CStyle
(
"
Heading 3
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H3
.
Create_Heading3
();
this
.
Default
.
Headings
[
2
]
=
this
.
Add
(
Style_H3
);
// Создаем стандартные стили для заголовков
var
Style_H4
=
new
CStyle
(
"
Heading 4
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H4
.
Create_Heading4
();
this
.
Default
.
Headings
[
3
]
=
this
.
Add
(
Style_H4
);
// Создаем стандартные стили для заголовков
var
Style_H5
=
new
CStyle
(
"
Heading 5
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H5
.
Create_Heading5
();
this
.
Default
.
Headings
[
4
]
=
this
.
Add
(
Style_H5
);
// Создаем стандартные стили для заголовков
var
Style_H6
=
new
CStyle
(
"
Heading 6
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H6
.
Create_Heading6
();
this
.
Default
.
Headings
[
5
]
=
this
.
Add
(
Style_H6
);
// Создаем стандартные стили для заголовков
var
Style_H7
=
new
CStyle
(
"
Heading 7
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H7
.
Create_Heading7
();
this
.
Default
.
Headings
[
6
]
=
this
.
Add
(
Style_H7
);
// Создаем стандартные стили для заголовков
var
Style_H8
=
new
CStyle
(
"
Heading 8
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H8
.
Create_Heading8
();
this
.
Default
.
Headings
[
7
]
=
this
.
Add
(
Style_H8
);
// Создаем стандартные стили для заголовков
var
Style_H9
=
new
CStyle
(
"
Heading 9
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H9
.
Create_Heading9
();
this
.
Default
.
Headings
[
8
]
=
this
.
Add
(
Style_H9
);
// Создаем стандартный стиль для нумерованных параграфов
var
Style_Para_List
=
new
CStyle
(
"
List Paragraph
"
,
this
.
Default
.
Paragraph
,
null
,
styletype_Paragraph
);
Style_Para_List
.
Create_ListParagraph
();
this
.
Default
.
ParaList
=
this
.
Add
(
Style_Para_List
);
// Создаем стандартный стиль для таблиц
var
Style_Table
=
new
CStyle
(
"
Normal Table
"
,
null
,
null
,
styletype_Table
);
Style_Table
.
Create_NormalTable
();
this
.
Default
.
Table
=
this
.
Add
(
Style_Table
);
// Создаем стиль "Без интервала"
var
Style_NoSpacing
=
new
CStyle
(
"
No Spacing
"
,
this
.
Default
.
Paragraph
,
null
,
styletype_Paragraph
);
Style_NoSpacing
.
Create_NoSpacing
();
this
.
Add
(
Style_NoSpacing
);
// Создаем стиль "Заголовок"
var
Style_Title
=
new
CStyle
(
"
Title
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_Title
.
Create_Title
();
this
.
Add
(
Style_Title
);
// Создаем стиль "Подзаголовок"
var
Style_Subtitle
=
new
CStyle
(
"
Subtitle
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_Subtitle
.
Create_Subtitle
();
this
.
Add
(
Style_Subtitle
);
// Создаем стиль "Цитата"
var
Style_Quote
=
new
CStyle
(
"
Quote
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_Quote
.
Create_Quote
();
this
.
Add
(
Style_Quote
);
// Создаем стиль "Выделенная цитата"
var
Style_IntenseQuote
=
new
CStyle
(
"
Intense Quote
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_IntenseQuote
.
Create_IntenseQuote
();
this
.
Add
(
Style_IntenseQuote
);
// Создаем стандартный стиль верхнего колонтитула
var
Style_Header
=
new
CStyle
(
"
Header
"
,
this
.
Default
.
Paragraph
,
null
,
styletype_Paragraph
);
Style_Header
.
Create_Header
();
this
.
Default
.
Header
=
this
.
Add
(
Style_Header
);
// Создаем стандартный стиль нижнего колонтитула
var
Style_Footer
=
new
CStyle
(
"
Footer
"
,
this
.
Default
.
Paragraph
,
null
,
styletype_Paragraph
);
Style_Footer
.
Create_Footer
();
this
.
Default
.
Footer
=
this
.
Add
(
Style_Footer
);
// Создаем стиль для таблиц, который будет применяться к новым таблицам
var
Style_TableGrid
=
new
CStyle
(
"
Table Grid
"
,
this
.
Default
.
Table
,
null
,
styletype_Table
);
Style_TableGrid
.
Create_TableGrid
();
this
.
Default
.
TableGrid
=
this
.
Add
(
Style_TableGrid
);
// Дефолтовый стиль для параграфа
var
Style_Para_Def
=
new
CStyle
(
"
Normal
"
,
null
,
null
,
styletype_Paragraph
);
Style_Para_Def
.
Create_Default_Paragraph
();
this
.
Default
.
Paragraph
=
this
.
Add
(
Style_Para_Def
);
// Дефолтовый стиль для текста
var
Style_Char_Def
=
new
CStyle
(
"
Default Paragraph Font
"
,
null
,
null
,
styletype_Character
);
Style_Char_Def
.
Create_Default_Character
();
this
.
Default
.
Character
=
this
.
Add
(
Style_Char_Def
);
// Дефолтовый стиль для нумерации в списках
var
Style_Num_Def
=
new
CStyle
(
"
No List
"
,
null
,
null
,
styletype_Numbering
);
Style_Num_Def
.
Create_Default_Numbering
();
this
.
Default
.
Numbering
=
this
.
Add
(
Style_Num_Def
);
// Создаем стандартные стили для заголовков
var
Style_H1
=
new
CStyle
(
"
Heading 1
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H1
.
Create_Heading1
();
this
.
Default
.
Headings
[
0
]
=
this
.
Add
(
Style_H1
);
// Создаем стандартные стили для заголовков
var
Style_H2
=
new
CStyle
(
"
Heading 2
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H2
.
Create_Heading2
();
this
.
Default
.
Headings
[
1
]
=
this
.
Add
(
Style_H2
);
// Создаем стандартные стили для заголовков
var
Style_H3
=
new
CStyle
(
"
Heading 3
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H3
.
Create_Heading3
();
this
.
Default
.
Headings
[
2
]
=
this
.
Add
(
Style_H3
);
// Создаем стандартные стили для заголовков
var
Style_H4
=
new
CStyle
(
"
Heading 4
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H4
.
Create_Heading4
();
this
.
Default
.
Headings
[
3
]
=
this
.
Add
(
Style_H4
);
// Создаем стандартные стили для заголовков
var
Style_H5
=
new
CStyle
(
"
Heading 5
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H5
.
Create_Heading5
();
this
.
Default
.
Headings
[
4
]
=
this
.
Add
(
Style_H5
);
// Создаем стандартные стили для заголовков
var
Style_H6
=
new
CStyle
(
"
Heading 6
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H6
.
Create_Heading6
();
this
.
Default
.
Headings
[
5
]
=
this
.
Add
(
Style_H6
);
// Создаем стандартные стили для заголовков
var
Style_H7
=
new
CStyle
(
"
Heading 7
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H7
.
Create_Heading7
();
this
.
Default
.
Headings
[
6
]
=
this
.
Add
(
Style_H7
);
// Создаем стандартные стили для заголовков
var
Style_H8
=
new
CStyle
(
"
Heading 8
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H8
.
Create_Heading8
();
this
.
Default
.
Headings
[
7
]
=
this
.
Add
(
Style_H8
);
// Создаем стандартные стили для заголовков
var
Style_H9
=
new
CStyle
(
"
Heading 9
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_H9
.
Create_Heading9
();
this
.
Default
.
Headings
[
8
]
=
this
.
Add
(
Style_H9
);
// Создаем стандартный стиль для нумерованных параграфов
var
Style_Para_List
=
new
CStyle
(
"
List Paragraph
"
,
this
.
Default
.
Paragraph
,
null
,
styletype_Paragraph
);
Style_Para_List
.
Create_ListParagraph
();
this
.
Default
.
ParaList
=
this
.
Add
(
Style_Para_List
);
// Создаем стандартный стиль для таблиц
var
Style_Table
=
new
CStyle
(
"
Normal Table
"
,
null
,
null
,
styletype_Table
);
Style_Table
.
Create_NormalTable
();
this
.
Default
.
Table
=
this
.
Add
(
Style_Table
);
// Создаем стиль "Без интервала"
var
Style_NoSpacing
=
new
CStyle
(
"
No Spacing
"
,
this
.
Default
.
Paragraph
,
null
,
styletype_Paragraph
);
Style_NoSpacing
.
Create_NoSpacing
();
this
.
Default
.
NoSpacing
=
this
.
Add
(
Style_NoSpacing
);
// Создаем стиль "Заголовок"
var
Style_Title
=
new
CStyle
(
"
Title
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_Title
.
Create_Title
();
this
.
Default
.
Title
=
this
.
Add
(
Style_Title
);
// Создаем стиль "Подзаголовок"
var
Style_Subtitle
=
new
CStyle
(
"
Subtitle
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_Subtitle
.
Create_Subtitle
();
this
.
Default
.
Subtitle
=
this
.
Add
(
Style_Subtitle
);
// Создаем стиль "Цитата"
var
Style_Quote
=
new
CStyle
(
"
Quote
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_Quote
.
Create_Quote
();
this
.
Default
.
Quote
=
this
.
Add
(
Style_Quote
);
// Создаем стиль "Выделенная цитата"
var
Style_IntenseQuote
=
new
CStyle
(
"
Intense Quote
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style_IntenseQuote
.
Create_IntenseQuote
();
this
.
Default
.
IntenseQuote
=
this
.
Add
(
Style_IntenseQuote
);
// Создаем стандартный стиль верхнего колонтитула
var
Style_Header
=
new
CStyle
(
"
Header
"
,
this
.
Default
.
Paragraph
,
null
,
styletype_Paragraph
);
Style_Header
.
Create_Header
();
this
.
Default
.
Header
=
this
.
Add
(
Style_Header
);
// Создаем стандартный стиль нижнего колонтитула
var
Style_Footer
=
new
CStyle
(
"
Footer
"
,
this
.
Default
.
Paragraph
,
null
,
styletype_Paragraph
);
Style_Footer
.
Create_Footer
();
this
.
Default
.
Footer
=
this
.
Add
(
Style_Footer
);
// Создаем стиль для таблиц, который будет применяться к новым таблицам
var
Style_TableGrid
=
new
CStyle
(
"
Table Grid
"
,
this
.
Default
.
Table
,
null
,
styletype_Table
);
Style_TableGrid
.
Create_TableGrid
();
this
.
Default
.
TableGrid
=
this
.
Add
(
Style_TableGrid
);
/*
// Создаем стандартный стиль для таблиц
...
...
@@ -3626,6 +3631,51 @@ CStyles.prototype =
}
},
SetDefaultNoSpacing
:
function
(
Id
)
{
if
(
Id
!==
this
.
Default
.
NoSpacing
)
{
History
.
Add
(
new
CChangesStylesChangeDefaultNoSpacingId
(
this
,
this
.
Default
.
NoSpacing
,
Id
));
this
.
Default
.
NoSpacing
=
Id
;
}
},
SetDefaultTitle
:
function
(
Id
)
{
if
(
Id
!==
this
.
Default
.
Title
)
{
History
.
Add
(
new
CChangesStylesChangeDefaultTitleId
(
this
,
this
.
Default
.
Title
,
Id
));
this
.
Default
.
Title
=
Id
;
}
},
SetDefaultSubtitle
:
function
(
Id
)
{
if
(
Id
!==
this
.
Default
.
Subtitle
)
{
History
.
Add
(
new
CChangesStylesChangeDefaultSubtitleId
(
this
,
this
.
Default
.
Subtitle
,
Id
));
this
.
Default
.
Subtitle
=
Id
;
}
},
SetDefaultQuote
:
function
(
Id
)
{
if
(
Id
!==
this
.
Default
.
Quote
)
{
History
.
Add
(
new
CChangesStylesChangeDefaultQuoteId
(
this
,
this
.
Default
.
Quote
,
Id
));
this
.
Default
.
Quote
=
Id
;
}
},
SetDefaultIntenseQuote
:
function
(
Id
)
{
if
(
Id
!==
this
.
Default
.
IntenseQuote
)
{
History
.
Add
(
new
CChangesStylesChangeDefaultIntenseQuoteId
(
this
,
this
.
Default
.
IntenseQuote
,
Id
));
this
.
Default
.
IntenseQuote
=
Id
;
}
},
RemapIdReferences
:
function
(
OldId
,
NewId
)
{
if
(
OldId
===
this
.
Default
.
Paragraph
)
...
...
@@ -3670,6 +3720,21 @@ CStyles.prototype =
this
.
SetDefaultHeading
(
NewId
,
nIndex
);
}
if
(
OldId
===
this
.
Default
.
NoSpacing
)
this
.
SetDefaultNoSpacing
(
NewId
);
if
(
OldId
===
this
.
Default
.
Title
)
this
.
SetDefaultTitle
(
NewId
);
if
(
OldId
===
this
.
Default
.
Subtitle
)
this
.
SetDefaultSubtitle
(
NewId
);
if
(
OldId
===
this
.
Default
.
Quote
)
this
.
SetDefaultQuote
(
NewId
);
if
(
OldId
===
this
.
Default
.
IntenseQuote
)
this
.
SetDefaultIntenseQuote
(
NewId
);
for
(
var
Id
in
this
.
Style
)
{
this
.
Style
[
Id
].
RemapIdReferences
(
OldId
,
NewId
);
...
...
@@ -3687,15 +3752,20 @@ CStyles.prototype =
Styles
.
Default
.
TableCellPr
=
this
.
Default
.
TableCellPr
.
Copy
();
// Тут можно копировать напрямую, т.к. это либо null, либо StyleId, который мы повторяем
Styles
.
Default
.
Paragraph
=
this
.
Default
.
Paragraph
;
Styles
.
Default
.
Character
=
this
.
Default
.
Character
;
Styles
.
Default
.
Numbering
=
this
.
Default
.
Numbering
;
Styles
.
Default
.
Table
=
this
.
Default
.
Table
;
Styles
.
Default
.
TableGrid
=
this
.
Default
.
TableGrid
;
Styles
.
Default
.
ParaList
=
this
.
Default
.
ParaList
;
Styles
.
Default
.
Header
=
this
.
Default
.
Header
;
Styles
.
Default
.
Footer
=
this
.
Default
.
Footer
;
Styles
.
Default
.
Hyperlink
=
this
.
Default
.
Hyperlink
;
Styles
.
Default
.
Paragraph
=
this
.
Default
.
Paragraph
;
Styles
.
Default
.
Character
=
this
.
Default
.
Character
;
Styles
.
Default
.
Numbering
=
this
.
Default
.
Numbering
;
Styles
.
Default
.
Table
=
this
.
Default
.
Table
;
Styles
.
Default
.
TableGrid
=
this
.
Default
.
TableGrid
;
Styles
.
Default
.
ParaList
=
this
.
Default
.
ParaList
;
Styles
.
Default
.
Header
=
this
.
Default
.
Header
;
Styles
.
Default
.
Footer
=
this
.
Default
.
Footer
;
Styles
.
Default
.
Hyperlink
=
this
.
Default
.
Hyperlink
;
Styles
.
Default
.
NoSpacing
=
this
.
Default
.
NoSpacing
;
Styles
.
Default
.
Title
=
this
.
Default
.
Title
;
Styles
.
Default
.
Subtitle
=
this
.
Default
.
Subtitle
;
Styles
.
Default
.
Quote
=
this
.
Default
.
Quote
;
Styles
.
Default
.
IntenseQuote
=
this
.
Default
.
IntenseQuote
;
for
(
var
Index
=
0
,
Count
=
this
.
Default
.
Headings
.
length
;
Index
<
Count
;
Index
++
)
{
...
...
word/Editor/StylesChanges.js
View file @
ac47c98e
...
...
@@ -83,6 +83,11 @@ AscDFH.changesFactory[AscDFH.historyitem_Styles_ChangeDefaultHyperlinkId]
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_Styles_ChangeDefaultFootnoteTextId
]
=
CChangesStylesChangeDefaultFootnoteTextId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_Styles_ChangeDefaultFootnoteTextCharId
]
=
CChangesStylesChangeDefaultFootnoteTextCharId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_Styles_ChangeDefaultFootnoteReferenceId
]
=
CChangesStylesChangeDefaultFootnoteReferenceId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_Styles_ChangeDefaultNoSpacingId
]
=
CChangesStylesChangeDefaultNoSpacingId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_Styles_ChangeDefaultTitleId
]
=
CChangesStylesChangeDefaultTitleId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_Styles_ChangeDefaultSubtitleId
]
=
CChangesStylesChangeDefaultSubtitleId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_Styles_ChangeDefaultQuoteId
]
=
CChangesStylesChangeDefaultQuoteId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_Styles_ChangeDefaultIntenseQuoteId
]
=
CChangesStylesChangeDefaultIntenseQuoteId
;
//----------------------------------------------------------------------------------------------------------------------
// Карта зависимости изменений
...
...
@@ -139,6 +144,11 @@ AscDFH.changesRelationMap[AscDFH.historyitem_Styles_ChangeDefaultHyperlinkId]
AscDFH
.
changesRelationMap
[
AscDFH
.
historyitem_Styles_ChangeDefaultFootnoteTextId
]
=
[
AscDFH
.
historyitem_Styles_ChangeDefaultFootnoteTextId
];
AscDFH
.
changesRelationMap
[
AscDFH
.
historyitem_Styles_ChangeDefaultFootnoteTextCharId
]
=
[
AscDFH
.
historyitem_Styles_ChangeDefaultFootnoteTextCharId
];
AscDFH
.
changesRelationMap
[
AscDFH
.
historyitem_Styles_ChangeDefaultFootnoteReferenceId
]
=
[
AscDFH
.
historyitem_Styles_ChangeDefaultFootnoteReferenceId
];
AscDFH
.
changesRelationMap
[
AscDFH
.
historyitem_Styles_ChangeDefaultNoSpacingId
]
=
[
AscDFH
.
historyitem_Styles_ChangeDefaultNoSpacingId
];
AscDFH
.
changesRelationMap
[
AscDFH
.
historyitem_Styles_ChangeDefaultTitleId
]
=
[
AscDFH
.
historyitem_Styles_ChangeDefaultTitleId
];
AscDFH
.
changesRelationMap
[
AscDFH
.
historyitem_Styles_ChangeDefaultSubtitleId
]
=
[
AscDFH
.
historyitem_Styles_ChangeDefaultSubtitleId
];
AscDFH
.
changesRelationMap
[
AscDFH
.
historyitem_Styles_ChangeDefaultQuoteId
]
=
[
AscDFH
.
historyitem_Styles_ChangeDefaultQuoteId
];
AscDFH
.
changesRelationMap
[
AscDFH
.
historyitem_Styles_ChangeDefaultIntenseQuoteId
]
=
[
AscDFH
.
historyitem_Styles_ChangeDefaultIntenseQuoteId
];
//----------------------------------------------------------------------------------------------------------------------
...
...
@@ -1277,4 +1287,79 @@ CChangesStylesChangeDefaultFootnoteReferenceId.prototype.Type = AscDFH.historyit
CChangesStylesChangeDefaultFootnoteReferenceId
.
prototype
.
private_SetValue
=
function
(
Value
)
{
this
.
Class
.
Default
.
FootnoteReference
=
Value
;
};
/**
* @constructor
* @extends {CChangesStyleBaseStringProperty}
*/
function
CChangesStylesChangeDefaultNoSpacingId
(
Class
,
Old
,
New
)
{
CChangesStyleBaseStringProperty
.
call
(
this
,
Class
,
Old
,
New
);
}
CChangesStylesChangeDefaultNoSpacingId
.
prototype
=
Object
.
create
(
CChangesStyleBaseStringProperty
.
prototype
);
CChangesStylesChangeDefaultNoSpacingId
.
prototype
.
constructor
=
CChangesStylesChangeDefaultNoSpacingId
;
CChangesStylesChangeDefaultNoSpacingId
.
prototype
.
Type
=
AscDFH
.
historyitem_Styles_ChangeDefaultNoSpacingId
;
CChangesStylesChangeDefaultNoSpacingId
.
prototype
.
private_SetValue
=
function
(
Value
)
{
this
.
Class
.
Default
.
NoSpacing
=
Value
;
};
/**
* @constructor
* @extends {CChangesStyleBaseStringProperty}
*/
function
CChangesStylesChangeDefaultTitleId
(
Class
,
Old
,
New
)
{
CChangesStyleBaseStringProperty
.
call
(
this
,
Class
,
Old
,
New
);
}
CChangesStylesChangeDefaultTitleId
.
prototype
=
Object
.
create
(
CChangesStyleBaseStringProperty
.
prototype
);
CChangesStylesChangeDefaultTitleId
.
prototype
.
constructor
=
CChangesStylesChangeDefaultTitleId
;
CChangesStylesChangeDefaultTitleId
.
prototype
.
Type
=
AscDFH
.
historyitem_Styles_ChangeDefaultTitleId
;
CChangesStylesChangeDefaultTitleId
.
prototype
.
private_SetValue
=
function
(
Value
)
{
this
.
Class
.
Default
.
Title
=
Value
;
};
/**
* @constructor
* @extends {CChangesStyleBaseStringProperty}
*/
function
CChangesStylesChangeDefaultSubtitleId
(
Class
,
Old
,
New
)
{
CChangesStyleBaseStringProperty
.
call
(
this
,
Class
,
Old
,
New
);
}
CChangesStylesChangeDefaultSubtitleId
.
prototype
=
Object
.
create
(
CChangesStyleBaseStringProperty
.
prototype
);
CChangesStylesChangeDefaultSubtitleId
.
prototype
.
constructor
=
CChangesStylesChangeDefaultSubtitleId
;
CChangesStylesChangeDefaultSubtitleId
.
prototype
.
Type
=
AscDFH
.
historyitem_Styles_ChangeDefaultSubtitleId
;
CChangesStylesChangeDefaultSubtitleId
.
prototype
.
private_SetValue
=
function
(
Value
)
{
this
.
Class
.
Default
.
Subtitle
=
Value
;
};
/**
* @constructor
* @extends {CChangesStyleBaseStringProperty}
*/
function
CChangesStylesChangeDefaultQuoteId
(
Class
,
Old
,
New
)
{
CChangesStyleBaseStringProperty
.
call
(
this
,
Class
,
Old
,
New
);
}
CChangesStylesChangeDefaultQuoteId
.
prototype
=
Object
.
create
(
CChangesStyleBaseStringProperty
.
prototype
);
CChangesStylesChangeDefaultQuoteId
.
prototype
.
constructor
=
CChangesStylesChangeDefaultQuoteId
;
CChangesStylesChangeDefaultQuoteId
.
prototype
.
Type
=
AscDFH
.
historyitem_Styles_ChangeDefaultQuoteId
;
CChangesStylesChangeDefaultQuoteId
.
prototype
.
private_SetValue
=
function
(
Value
)
{
this
.
Class
.
Default
.
Quote
=
Value
;
};
/**
* @constructor
* @extends {CChangesStyleBaseStringProperty}
*/
function
CChangesStylesChangeDefaultIntenseQuoteId
(
Class
,
Old
,
New
)
{
CChangesStyleBaseStringProperty
.
call
(
this
,
Class
,
Old
,
New
);
}
CChangesStylesChangeDefaultIntenseQuoteId
.
prototype
=
Object
.
create
(
CChangesStyleBaseStringProperty
.
prototype
);
CChangesStylesChangeDefaultIntenseQuoteId
.
prototype
.
constructor
=
CChangesStylesChangeDefaultIntenseQuoteId
;
CChangesStylesChangeDefaultIntenseQuoteId
.
prototype
.
Type
=
AscDFH
.
historyitem_Styles_ChangeDefaultIntenseQuoteId
;
CChangesStylesChangeDefaultIntenseQuoteId
.
prototype
.
private_SetValue
=
function
(
Value
)
{
this
.
Class
.
Default
.
IntenseQuote
=
Value
;
};
\ No newline at end of file
word/Private/StyleManager.js
View file @
ac47c98e
...
...
@@ -335,6 +335,31 @@ CStyles.prototype.Remove_StyleFromInterface = function(StyleId)
Style
.
Clear
(
"
Hyperlink
"
,
null
,
null
,
styletype_Character
);
Style
.
Create_Character_Hyperlink
();
}
else
if
(
StyleId
==
this
.
Default
.
NoSpacing
)
{
Style
.
Clear
(
"
No Spacing
"
,
this
.
Default
.
Paragraph
,
null
,
styletype_Paragraph
);
Style
.
Create_NoSpacing
();
}
else
if
(
StyleId
===
this
.
Default
.
Title
)
{
Style
.
Clear
(
"
Title
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style
.
Create_Title
();
}
else
if
(
StyleId
===
this
.
Default
.
Subtitle
)
{
Style
.
Clear
(
"
Subtitle
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style
.
Create_Subtitle
();
}
else
if
(
StyleId
===
this
.
Default
.
Quote
)
{
Style
.
Clear
(
"
Quote
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style
.
Create_Quote
();
}
else
if
(
StyleId
===
this
.
Default
.
IntenseQuote
)
{
Style
.
Clear
(
"
Intense Quote
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style
.
Create_IntenseQuote
();
}
else
{
this
.
Remove
(
StyleId
);
...
...
@@ -386,7 +411,12 @@ CStyles.prototype.Is_StyleDefault = function(sStyleName)
||
StyleId
==
this
.
Default
.
ParaList
||
StyleId
==
this
.
Default
.
Header
||
StyleId
==
this
.
Default
.
Footer
||
StyleId
==
this
.
Default
.
Hyperlink
)
||
StyleId
==
this
.
Default
.
Hyperlink
||
StyleId
==
this
.
Default
.
NoSpacing
||
StyleId
==
this
.
Default
.
Title
||
StyleId
==
this
.
Default
.
Subtitle
||
StyleId
==
this
.
Default
.
Quote
||
StyleId
==
this
.
Default
.
IntenseQuote
)
{
return
true
;
}
...
...
@@ -496,6 +526,31 @@ CStyles.prototype.Is_DefaultStyleChanged = function(sStyleName)
Style
.
Clear
(
"
Hyperlink
"
,
null
,
null
,
styletype_Character
);
Style
.
Create_Character_Hyperlink
();
}
else
if
(
StyleId
==
this
.
Default
.
NoSpacing
)
{
Style
.
Clear
(
"
No Spacing
"
,
this
.
Default
.
Paragraph
,
null
,
styletype_Paragraph
);
Style
.
Create_NoSpacing
();
}
else
if
(
StyleId
===
this
.
Default
.
Title
)
{
Style
.
Clear
(
"
Title
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style
.
Create_Title
();
}
else
if
(
StyleId
===
this
.
Default
.
Subtitle
)
{
Style
.
Clear
(
"
Subtitle
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style
.
Create_Subtitle
();
}
else
if
(
StyleId
===
this
.
Default
.
Quote
)
{
Style
.
Clear
(
"
Quote
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style
.
Create_Quote
();
}
else
if
(
StyleId
===
this
.
Default
.
IntenseQuote
)
{
Style
.
Clear
(
"
Intense Quote
"
,
this
.
Default
.
Paragraph
,
this
.
Default
.
Paragraph
,
styletype_Paragraph
);
Style
.
Create_IntenseQuote
();
}
this
.
LogicDocument
.
TurnOnHistory
();
...
...
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