Commit 5f8e28cb authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Сделано, чтобы в поле Value для изменения настроек теста и настроек параграфа...

Сделано, чтобы в поле Value для изменения настроек теста и настроек параграфа в рецензировании шли объекты CTextPr и CParaPr соответственно. У последних двух классов добавлены функции в экспорт для работы с ними в интерфейсе.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66207 954022d7-b5bf-4e40-9824-e11837661b57
parent 38b1dba7
...@@ -13255,7 +13255,7 @@ Paragraph.prototype.Check_RevisionsChanges = function(RevisionsManager) ...@@ -13255,7 +13255,7 @@ Paragraph.prototype.Check_RevisionsChanges = function(RevisionsManager)
Change.put_StartPos(StartPos); Change.put_StartPos(StartPos);
Change.put_EndPos(EndPos); Change.put_EndPos(EndPos);
Change.put_Type(c_oAscRevisionsChangeType.ParaPr); Change.put_Type(c_oAscRevisionsChangeType.ParaPr);
Change.put_Value("Change paragraph properties."); Change.put_Value(this.Pr.Get_DiffPrChange());
Change.put_UserId(this.Pr.ReviewInfo.Get_UserId()); Change.put_UserId(this.Pr.ReviewInfo.Get_UserId());
Change.put_UserName(this.Pr.ReviewInfo.Get_UserName()); Change.put_UserName(this.Pr.ReviewInfo.Get_UserName());
Change.put_DateTime(this.Pr.ReviewInfo.Get_DateTime()); Change.put_DateTime(this.Pr.ReviewInfo.Get_DateTime());
...@@ -13288,7 +13288,6 @@ Paragraph.prototype.Check_RevisionsChanges = function(RevisionsManager) ...@@ -13288,7 +13288,6 @@ Paragraph.prototype.Check_RevisionsChanges = function(RevisionsManager)
Change.put_StartPos(StartPos); Change.put_StartPos(StartPos);
Change.put_EndPos(EndPos); Change.put_EndPos(EndPos);
Change.put_Type(c_oAscRevisionsChangeType.ParaAdd); Change.put_Type(c_oAscRevisionsChangeType.ParaAdd);
Change.put_Value("Add paragraph.");
Change.put_UserId(ReviewInfo.Get_UserId()); Change.put_UserId(ReviewInfo.Get_UserId());
Change.put_UserName(ReviewInfo.Get_UserName()); Change.put_UserName(ReviewInfo.Get_UserName());
Change.put_DateTime(ReviewInfo.Get_DateTime()); Change.put_DateTime(ReviewInfo.Get_DateTime());
...@@ -13299,13 +13298,11 @@ Paragraph.prototype.Check_RevisionsChanges = function(RevisionsManager) ...@@ -13299,13 +13298,11 @@ Paragraph.prototype.Check_RevisionsChanges = function(RevisionsManager)
StartPos = this.Get_EndPos(false); StartPos = this.Get_EndPos(false);
EndPos = this.Get_EndPos(true); EndPos = this.Get_EndPos(true);
Change = new CRevisionsChange(); Change = new CRevisionsChange();
Change.put_Paragraph(this); Change.put_Paragraph(this);
Change.put_StartPos(StartPos); Change.put_StartPos(StartPos);
Change.put_EndPos(EndPos); Change.put_EndPos(EndPos);
Change.put_Type(c_oAscRevisionsChangeType.ParaRem); Change.put_Type(c_oAscRevisionsChangeType.ParaRem);
Change.put_Value("Delete paragraph.");
Change.put_UserId(ReviewInfo.Get_UserId()); Change.put_UserId(ReviewInfo.Get_UserId());
Change.put_UserName(ReviewInfo.Get_UserName()); Change.put_UserName(ReviewInfo.Get_UserName());
Change.put_DateTime(ReviewInfo.Get_DateTime()); Change.put_DateTime(ReviewInfo.Get_DateTime());
...@@ -14799,10 +14796,7 @@ CParagraphRevisionsChangesChecker.prototype.Flush_TextPrChange = function() ...@@ -14799,10 +14796,7 @@ CParagraphRevisionsChangesChecker.prototype.Flush_TextPrChange = function()
{ {
var Change = new CRevisionsChange(); var Change = new CRevisionsChange();
Change.put_Type(c_oAscRevisionsChangeType.TextPr); Change.put_Type(c_oAscRevisionsChangeType.TextPr);
Change.put_Value(TextPr.Pr.Get_DiffPrChange());
// TODO: Доделать put_Value
Change.put_Value(TextPr.Pr.Get_Description());
Change.put_Paragraph(this.Paragraph); Change.put_Paragraph(this.Paragraph);
Change.put_StartPos(TextPr.StartPos); Change.put_StartPos(TextPr.StartPos);
Change.put_EndPos(TextPr.EndPos); Change.put_EndPos(TextPr.EndPos);
......
...@@ -8432,6 +8432,8 @@ CTextPr.prototype = ...@@ -8432,6 +8432,8 @@ CTextPr.prototype =
if (this.Vanish !== PrChange.Vanish) if (this.Vanish !== PrChange.Vanish)
TextPr.Vanish = this.Vanish; TextPr.Vanish = this.Vanish;
// TODO: Shd
return TextPr; return TextPr;
}, },
...@@ -8522,6 +8524,96 @@ CTextPr.prototype = ...@@ -8522,6 +8524,96 @@ CTextPr.prototype =
return Description; return Description;
} }
}; };
CTextPr.prototype.Get_Bold = function()
{
return this.Bold;
};
CTextPr.prototype.Get_Italic = function()
{
return this.Italic;
};
CTextPr.prototype.Get_Strikeout = function()
{
return this.Strikeout;
};
CTextPr.prototype.Get_Underline = function()
{
return this.Underline;
};
CTextPr.prototype.Get_Color = function()
{
return this.Color;
};
CTextPr.prototype.Get_VertAlign = function()
{
return this.VertAlign;
};
CTextPr.prototype.Get_Highlight = function()
{
return this.HighLight;
};
CTextPr.prototype.Get_Spacing = function()
{
return this.Spacing;
};
CTextPr.prototype.Get_DStrikeout = function()
{
return this.DStrikeout;
};
CTextPr.prototype.Get_Caps = function()
{
return this.Caps;
};
CTextPr.prototype.Get_SmallCaps = function()
{
return this.SmallCaps;
};
CTextPr.prototype.Get_Position = function()
{
return this.Position;
};
CTextPr.prototype.Get_FontFamily = function()
{
if (this.RFonts && this.RFonts.Ascii && this.RFonts.Ascii.Name)
return this.RFonts.Ascii.Name;
return undefined;
};
CTextPr.prototype.Get_FontSize = function()
{
return this.FontSize;
};
CTextPr.prototype.Get_Lang = function()
{
if (this.Lang)
return this.Lang.Val;
return undefined;
};
CTextPr.prototype.Get_Shd = function()
{
return this.Shd;
};
//----------------------------------------------------------------------------------------------------------------------
// CTextPr Export
//----------------------------------------------------------------------------------------------------------------------
CTextPr.prototype['Get_Bold'] = CTextPr.prototype.Get_Bold;
CTextPr.prototype['Get_Italic'] = CTextPr.prototype.Get_Italic;
CTextPr.prototype['Get_Strikeout'] = CTextPr.prototype.Get_Strikeout;
CTextPr.prototype['Get_Underline'] = CTextPr.prototype.Get_Underline;
CTextPr.prototype['Get_Color'] = CTextPr.prototype.Get_Color;
CTextPr.prototype['Get_VertAlign'] = CTextPr.prototype.Get_VertAlign;
CTextPr.prototype['Get_Highlight'] = CTextPr.prototype.Get_Highlight;
CTextPr.prototype['Get_Spacing'] = CTextPr.prototype.Get_Spacing;
CTextPr.prototype['Get_DStrikeout'] = CTextPr.prototype.Get_DStrikeout;
CTextPr.prototype['Get_Caps'] = CTextPr.prototype.Get_Caps;
CTextPr.prototype['Get_SmallCaps'] = CTextPr.prototype.Get_SmallCaps;
CTextPr.prototype['Get_Position'] = CTextPr.prototype.Get_Position;
CTextPr.prototype['Get_FontFamily'] = CTextPr.prototype.Get_FontFamily;
CTextPr.prototype['Get_FontSize'] = CTextPr.prototype.Get_FontSize;
CTextPr.prototype['Get_Lang'] = CTextPr.prototype.Get_Lang;
CTextPr.prototype['Get_Shd'] = CTextPr.prototype.Get_Shd;
//----------------------------------------------------------------------------------------------------------------------
function CParaTab(Value, Pos) function CParaTab(Value, Pos)
{ {
...@@ -8805,6 +8897,21 @@ CParaInd.prototype = ...@@ -8805,6 +8897,21 @@ CParaInd.prototype =
this.FirstLine = Reader.GetDouble(); this.FirstLine = Reader.GetDouble();
} }
}; };
CParaInd.prototype.Get_Diff = function(Ind)
{
var DiffInd = new CParaInd();
if (this.Left !== Ind.Left)
DiffInd.Left = this.Left;
if (this.Left !== Ind.Right)
DiffInd.Right = this.Right;
if (this.FirstLine !== Ind.FirstLine)
DiffInd.FirstLine = this.FirstLine;
return DiffInd;
};
function CParaSpacing() function CParaSpacing()
{ {
...@@ -8945,6 +9052,30 @@ CParaSpacing.prototype = ...@@ -8945,6 +9052,30 @@ CParaSpacing.prototype =
this.BeforeAutoSpacing = Reader.GetBool(); this.BeforeAutoSpacing = Reader.GetBool();
} }
}; };
CParaSpacing.prototype.Get_Diff = function(Spacing)
{
var DiffSpacing = new CParaSpacing();
if (this.Line !== Spacing.Line)
DiffSpacing.Line = this.Line;
if (this.LineRule !== Spacing.LineRule)
DiffSpacing.LineRule = this.LineRule;
if (this.Before !== Spacing.Before)
DiffSpacing.Before = this.Before;
if (this.BeforeAutoSpacing !== Spacing.BeforeAutoSpacing)
DiffSpacing.BeforeAutoSpacing = this.BeforeAutoSpacing;
if (this.After !== Spacing.After)
DiffSpacing.After = this.After;
if (this.AfterAutoSpacing !== Spacing.AfterAutoSpacing)
DiffSpacing.AfterAutoSpacing = this.AfterAutoSpacing;
return DiffSpacing;
};
function CNumPr() function CNumPr()
{ {
...@@ -10141,6 +10272,145 @@ CParaPr.prototype = ...@@ -10141,6 +10272,145 @@ CParaPr.prototype =
delete this.ReviewInfo; delete this.ReviewInfo;
} }
}; };
CParaPr.prototype.Get_DiffPrChange = function()
{
var ParaPr = new CParaPr();
if (false === this.Have_PrChange())
return ParaPr;
var PrChange = this.PrChange;
if (this.ContextualSpacing !== PrChange.ContextualSpacing)
ParaPr.ContextualSpacing = this.ContextualSpacing;
ParaPr.Ind = this.Ind.Get_Diff(PrChange.Ind);
if (this.Jc !== PrChange.Jc)
ParaPr.Jc = this.Jc;
if (this.KeepLines !== PrChange.KeepLines)
ParaPr.KeepLines = this.KeepLines;
if (this.KeepNext !== PrChange.KeepNext)
ParaPr.KeepNext = this.KeepNext;
if (this.PageBreakBefore !== PrChange.PageBreakBefore)
ParaPr.PageBreakBefore = this.PageBreakBefore;
ParaPr.Spacing = this.Spacing.Get_Diff(PrChange.Spacing);
// TODO: Shd
// TODO: Brd
if (this.WidowControl !== PrChange.WidowControl)
ParaPr.WidowControl = this.WidowControl;
if (this.Tabs !== PrChange.Tabs)
ParaPr.Tabs = this.Tabs;
if (this.NumPr !== PrChange.NumPr)
ParaPr.NumPr = this.NumPr;
if (this.PStyle !== PrChange.PStyle)
ParaPr.PStyle = this.PStyle;
return ParaPr;
};
CParaPr.prototype.Get_ContextualSpacing = function()
{
return this.ContextualSpacing;
};
CParaPr.prototype.Get_IndLeft = function()
{
return this.Ind.Left;
};
CParaPr.prototype.Get_IndRight = function()
{
return this.Ind.Right;
};
CParaPr.prototype.Get_IndFirstLine = function()
{
return this.Ind.FirstLine;
};
CParaPr.prototype.Get_Jc = function()
{
return this.Jc;
};
CParaPr.prototype.Get_KeepLines = function()
{
return this.KeepLines;
};
CParaPr.prototype.Get_KeepNext = function()
{
return this.KeepNext;
};
CParaPr.prototype.Get_PageBreakBefore = function()
{
return this.PageBreakBefore;
};
CParaPr.prototype.Get_SpacingLine = function()
{
return this.Spacing.Line;
};
CParaPr.prototype.Get_SpacingLineRule = function()
{
return this.Spacing.LineRule;
};
CParaPr.prototype.Get_SpacingBefore = function()
{
return this.Spacing.Before;
};
CParaPr.prototype.Get_SpacingBeforeAutoSpacing = function()
{
return this.Spacing.BeforeAutoSpacing;
};
CParaPr.prototype.Get_SpacingAfter = function()
{
return this.Spacing.After;
};
CParaPr.prototype.Get_SpacingAfterAutoSpacing = function()
{
return this.Spacing.AfterAutoSpacing;
};
CParaPr.prototype.Get_WidowControl = function()
{
return this.WidowControl;
};
CParaPr.prototype.Get_Tabs = function()
{
return this.Tabs;
};
CParaPr.prototype.Get_NumPr = function()
{
return this.NumPr;
};
CParaPr.prototype.Get_PStyle = function()
{
return this.PStyle;
};
//----------------------------------------------------------------------------------------------------------------------
// CParaPr Export
//----------------------------------------------------------------------------------------------------------------------
CParaPr.prototype['Get_ContextualSpacing'] = CParaPr.prototype.Get_ContextualSpacing;
CParaPr.prototype['Get_IndLeft'] = CParaPr.prototype.Get_IndLeft;
CParaPr.prototype['Get_IndRight'] = CParaPr.prototype.Get_IndRight;
CParaPr.prototype['Get_IndFirstLine'] = CParaPr.prototype.Get_IndFirstLine;
CParaPr.prototype['Get_Jc'] = CParaPr.prototype.Get_Jc;
CParaPr.prototype['Get_KeepLines'] = CParaPr.prototype.Get_KeepLines;
CParaPr.prototype['Get_KeepNext'] = CParaPr.prototype.Get_KeepNext;
CParaPr.prototype['Get_PageBreakBefore'] = CParaPr.prototype.Get_PageBreakBefore;
CParaPr.prototype['Get_SpacingLine'] = CParaPr.prototype.Get_SpacingLine;
CParaPr.prototype['Get_SpacingLineRule'] = CParaPr.prototype.Get_SpacingLineRule;
CParaPr.prototype['Get_SpacingBefore'] = CParaPr.prototype.Get_SpacingBefore;
CParaPr.prototype['Get_SpacingBeforeAutoSpacing'] = CParaPr.prototype.Get_SpacingBeforeAutoSpacing;
CParaPr.prototype['Get_SpacingAfter'] = CParaPr.prototype.Get_SpacingAfter;
CParaPr.prototype['Get_SpacingAfterAutoSpacing'] = CParaPr.prototype.Get_SpacingAfterAutoSpacing;
CParaPr.prototype['Get_WidowControl'] = CParaPr.prototype.Get_WidowControl;
CParaPr.prototype['Get_Tabs'] = CParaPr.prototype.Get_Tabs;
CParaPr.prototype['Get_NumPr'] = CParaPr.prototype.Get_NumPr;
CParaPr.prototype['Get_PStyle'] = CParaPr.prototype.Get_PStyle;
//----------------------------------------------------------------------------------------------------------------------
function Copy_Bounds(Bounds) function Copy_Bounds(Bounds)
{ {
......
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