Commit ac47c98e authored by Ilya Kirillov's avatar Ilya Kirillov

Styles "No Spacing", "Title", "Subtitle", "Quote", "Intense quote" were added to the default list.

parent 2262e238
......@@ -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
//------------------------------------------------------------------------------------------------------------------
......
......@@ -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)
......
This diff is collapsed.
......@@ -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
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment