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
Expand all
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
This diff is collapsed.
Click to expand it.
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