Commit 1ac06964 authored by Anna.Pavlova's avatar Anna.Pavlova

Поправлен баг: после удаления Forced Break для Border Box в изменениях не...

Поправлен баг: после удаления Forced Break для Border Box в изменениях не запоминался AlnAt. В связи с этим неправильно работали Undo/Redo после выбора "Delete manual break" в контекстном меню

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68356 954022d7-b5bf-4e40-9824-e11837661b57
parent 8d9ec686
...@@ -5656,38 +5656,40 @@ CChangesMathBarLinePos.prototype.Load_Changes = function(Reader, Class) ...@@ -5656,38 +5656,40 @@ CChangesMathBarLinePos.prototype.Load_Changes = function(Reader, Class)
this.Redo(Class); this.Redo(Class);
}; };
function CChangesMathBoxForcedBreak(NewBreak, OldBreak) function CChangesMathBoxForcedBreak(NewBreak, OldBreak, OldAlnAt)
{ {
this.New = NewBreak; this.NewBreak = NewBreak;
this.Old = OldBreak;
this.OldBreak = OldBreak;
this.OldAlnAt = OldAlnAt;
} }
CChangesMathBoxForcedBreak.prototype.Type = historyitem_Math_BoxForcedBreak; CChangesMathBoxForcedBreak.prototype.Type = historyitem_Math_BoxForcedBreak;
CChangesMathBoxForcedBreak.prototype.Undo = function(Class) CChangesMathBoxForcedBreak.prototype.Undo = function(Class)
{ {
Class.raw_ForcedBreak(this.Old); Class.raw_ForcedBreak(this.OldBreak, this.OldAlnAt);
}; };
CChangesMathBoxForcedBreak.prototype.Redo = function(Class) CChangesMathBoxForcedBreak.prototype.Redo = function(Class)
{ {
Class.raw_ForcedBreak(this.New); Class.raw_ForcedBreak(this.NewBreak);
}; };
CChangesMathBoxForcedBreak.prototype.Save_Changes = function(Writer) CChangesMathBoxForcedBreak.prototype.Save_Changes = function(Writer)
{ {
if ( undefined === this.New ) if ( undefined === this.NewBreak )
{ {
Writer.WriteBool( true ); Writer.WriteBool( true );
} }
else else
{ {
Writer.WriteBool( false ); Writer.WriteBool( false );
Writer.WriteBool( this.New ); Writer.WriteBool( this.NewBreak );
} }
}; };
CChangesMathBoxForcedBreak.prototype.Load_Changes = function(Reader, Class) CChangesMathBoxForcedBreak.prototype.Load_Changes = function(Reader, Class)
{ {
if (true === Reader.GetBool()) if (true === Reader.GetBool())
this.New = undefined; this.NewBreak = undefined;
else else
this.New = Reader.GetBool(); this.NewBreak = Reader.GetBool();
this.Redo(Class); this.Redo(Class);
}; };
......
...@@ -834,7 +834,8 @@ CBox.prototype.Apply_MenuProps = function(Props) ...@@ -834,7 +834,8 @@ CBox.prototype.Apply_MenuProps = function(Props)
if(Props.Action & c_oMathMenuAction.DeleteForcedBreak && true == this.Can_DeleteForcedBreak()) if(Props.Action & c_oMathMenuAction.DeleteForcedBreak && true == this.Can_DeleteForcedBreak())
{ {
History.Add(this, new CChangesMathBoxForcedBreak(false, true)); var AlnAt = this.Get_AlignBrk();
History.Add(this, new CChangesMathBoxForcedBreak(false, true, AlnAt));
this.raw_ForcedBreak(false); this.raw_ForcedBreak(false);
} }
}; };
...@@ -850,11 +851,12 @@ CBox.prototype.Can_DeleteForcedBreak = function() ...@@ -850,11 +851,12 @@ CBox.prototype.Can_DeleteForcedBreak = function()
{ {
return this.IsForcedBreak(); return this.IsForcedBreak();
}; };
CBox.prototype.raw_ForcedBreak = function(InsertBreak) CBox.prototype.raw_ForcedBreak = function(InsertBreak, AlnAt)
{ {
if(InsertBreak) if(InsertBreak)
{ {
this.Pr.Insert_ForcedBreak(); this.Pr.Insert_ForcedBreak();
this.Pr.Apply_AlnAt(AlnAt);
} }
else else
{ {
......
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