Commit 77241ba3 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг с выставлением заливки параграфа (баг 20531).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50424 954022d7-b5bf-4e40-9824-e11837661b57
parent a5c8c67a
...@@ -49,6 +49,7 @@ var historyitem_Paragraph_Pr = 31; // Изменяем с ...@@ -49,6 +49,7 @@ var historyitem_Paragraph_Pr = 31; // Изменяем с
var historyitem_Paragraph_PresentationPr_Bullet = 32; // Изменяем свойства нумерации у параграфа в презентации var historyitem_Paragraph_PresentationPr_Bullet = 32; // Изменяем свойства нумерации у параграфа в презентации
var historyitem_Paragraph_PresentationPr_Level = 33; // Изменяем уровень параграфа в презентациях var historyitem_Paragraph_PresentationPr_Level = 33; // Изменяем уровень параграфа в презентациях
var historyitem_Paragraph_FramePr = 34; // Изменяем настройки рамки var historyitem_Paragraph_FramePr = 34; // Изменяем настройки рамки
var historyitem_Paragraph_Shd = 35; // Изменяем настройки заливки целиком
// Типы изменений в классе ParaTextPr // Типы изменений в классе ParaTextPr
var historyitem_TextPr_Change = 1; // Изменяем настройку var historyitem_TextPr_Change = 1; // Изменяем настройку
......
...@@ -9346,7 +9346,7 @@ Paragraph.prototype = ...@@ -9346,7 +9346,7 @@ Paragraph.prototype =
this.Set_KeepNext( undefined ); this.Set_KeepNext( undefined );
this.Set_PageBreakBefore( undefined ); this.Set_PageBreakBefore( undefined );
this.Set_Spacing( new CParaSpacing(), true ); this.Set_Spacing( new CParaSpacing(), true );
this.Set_Shd( new CDocumentShd(), true ); this.Set_Shd( undefined, true );
this.Set_WidowControl( undefined ); this.Set_WidowControl( undefined );
this.Set_Tabs( new CParaTabs() ); this.Set_Tabs( new CParaTabs() );
this.Set_Border( undefined, historyitem_Paragraph_Borders_Between ); this.Set_Border( undefined, historyitem_Paragraph_Borders_Between );
...@@ -9560,6 +9560,16 @@ Paragraph.prototype = ...@@ -9560,6 +9560,16 @@ Paragraph.prototype =
}, },
Set_Shd : function(_Shd, bDeleteUndefined) Set_Shd : function(_Shd, bDeleteUndefined)
{
if ( undefined === _Shd )
{
if ( undefined != this.Pr.Shd )
{
History.Add( this, { Type : historyitem_Paragraph_Shd, New : undefined, Old : this.Pr.Shd } );
this.Pr.Shd = undefined;
}
}
else
{ {
var Shd = new CDocumentShd(); var Shd = new CDocumentShd();
Shd.Set_FromObject( _Shd ); Shd.Set_FromObject( _Shd );
...@@ -9578,6 +9588,7 @@ Paragraph.prototype = ...@@ -9578,6 +9588,7 @@ Paragraph.prototype =
History.Add( this, { Type : historyitem_Paragraph_Shd_Color, New : Shd.Color, Old : ( undefined != this.Pr.Shd.Color ? this.Pr.Shd.Color : undefined ) } ); History.Add( this, { Type : historyitem_Paragraph_Shd_Color, New : Shd.Color, Old : ( undefined != this.Pr.Shd.Color ? this.Pr.Shd.Color : undefined ) } );
this.Pr.Shd.Color = Shd.Color; this.Pr.Shd.Color = Shd.Color;
} }
}
// Надо пересчитать конечный стиль // Надо пересчитать конечный стиль
this.CompiledPr.NeedRecalc = true; this.CompiledPr.NeedRecalc = true;
...@@ -11627,6 +11638,15 @@ Paragraph.prototype = ...@@ -11627,6 +11638,15 @@ Paragraph.prototype =
break; break;
} }
case historyitem_Paragraph_Shd:
{
this.Pr.Shd = Data.Old;
this.CompiledPr.NeedRecalc = true;
break;
}
case historyitem_Paragraph_WidowControl: case historyitem_Paragraph_WidowControl:
{ {
this.Pr.WidowControl = Data.Old; this.Pr.WidowControl = Data.Old;
...@@ -11979,6 +11999,16 @@ Paragraph.prototype = ...@@ -11979,6 +11999,16 @@ Paragraph.prototype =
break; break;
} }
case historyitem_Paragraph_Shd:
{
this.Pr.Shd = Data.New;
this.CompiledPr.NeedRecalc = true;
break;
}
case historyitem_Paragraph_WidowControl: case historyitem_Paragraph_WidowControl:
{ {
this.Pr.WidowControl = Data.New; this.Pr.WidowControl = Data.New;
...@@ -12239,6 +12269,7 @@ Paragraph.prototype = ...@@ -12239,6 +12269,7 @@ Paragraph.prototype =
} }
case historyitem_Paragraph_Shd_Value: case historyitem_Paragraph_Shd_Value:
case historyitem_Paragraph_Shd_Color: case historyitem_Paragraph_Shd_Color:
case historyitem_Paragraph_Shd:
case historyitem_Paragraph_DocNext: case historyitem_Paragraph_DocNext:
case historyitem_Paragraph_DocPrev: case historyitem_Paragraph_DocPrev:
{ {
...@@ -12583,6 +12614,26 @@ Paragraph.prototype = ...@@ -12583,6 +12614,26 @@ Paragraph.prototype =
break; break;
} }
case historyitem_Paragraph_Shd:
{
// Bool : IsUndefined
// Если false
// Variable : Shd (CDocumentShd)
var New = Data.New;
if ( undefined != New )
{
Writer.WriteBool( false );
Data.New.Write_ToBinary(Writer);
}
else
Writer.WriteBool( true );
break;
}
case historyitem_Paragraph_Tabs: case historyitem_Paragraph_Tabs:
{ {
// Bool : IsUndefined // Bool : IsUndefined
...@@ -13113,6 +13164,25 @@ Paragraph.prototype = ...@@ -13113,6 +13164,25 @@ Paragraph.prototype =
break; break;
} }
case historyitem_Paragraph_Shd:
{
// Bool : IsUndefined
// Если false
// Byte : Value
if ( false === Reader.GetBool() )
{
this.Pr.Shd = new CDocumentShd();
this.Pr.Shd.Read_FromBinary( Reader );
}
else
this.Pr.Shd = undefined;
this.CompiledPr.NeedRecalc = true;
break;
}
case historyitem_Paragraph_WidowControl: case historyitem_Paragraph_WidowControl:
{ {
// Bool : IsUndefined // Bool : IsUndefined
......
...@@ -4539,8 +4539,10 @@ CDocumentShd.prototype = ...@@ -4539,8 +4539,10 @@ CDocumentShd.prototype =
Set_FromObject : function(Shd) Set_FromObject : function(Shd)
{ {
this.Value = Shd.Value; this.Value = Shd.Value;
if ( shd_Nil != Shd.Value ) if ( shd_Nil != Shd.Value && undefined != Shd.Color )
this.Color.Set( Shd.Color.r, Shd.Color.g, Shd.Color.b ); this.Color.Set( Shd.Color.r, Shd.Color.g, Shd.Color.b );
else if ( undefined === Shd.Color )
this.Color = undefined;
}, },
Write_ToBinary : function(Writer) Write_ToBinary : function(Writer)
......
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