Commit 924eac72 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

Поправлен баг: после удаления 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 d1afbac5
......@@ -5656,38 +5656,40 @@ CChangesMathBarLinePos.prototype.Load_Changes = function(Reader, Class)
this.Redo(Class);
};
function CChangesMathBoxForcedBreak(NewBreak, OldBreak)
function CChangesMathBoxForcedBreak(NewBreak, OldBreak, OldAlnAt)
{
this.New = NewBreak;
this.Old = OldBreak;
this.NewBreak = NewBreak;
this.OldBreak = OldBreak;
this.OldAlnAt = OldAlnAt;
}
CChangesMathBoxForcedBreak.prototype.Type = historyitem_Math_BoxForcedBreak;
CChangesMathBoxForcedBreak.prototype.Undo = function(Class)
{
Class.raw_ForcedBreak(this.Old);
Class.raw_ForcedBreak(this.OldBreak, this.OldAlnAt);
};
CChangesMathBoxForcedBreak.prototype.Redo = function(Class)
{
Class.raw_ForcedBreak(this.New);
Class.raw_ForcedBreak(this.NewBreak);
};
CChangesMathBoxForcedBreak.prototype.Save_Changes = function(Writer)
{
if ( undefined === this.New )
if ( undefined === this.NewBreak )
{
Writer.WriteBool( true );
}
else
{
Writer.WriteBool( false );
Writer.WriteBool( this.New );
Writer.WriteBool( this.NewBreak );
}
};
CChangesMathBoxForcedBreak.prototype.Load_Changes = function(Reader, Class)
{
if (true === Reader.GetBool())
this.New = undefined;
this.NewBreak = undefined;
else
this.New = Reader.GetBool();
this.NewBreak = Reader.GetBool();
this.Redo(Class);
};
......
......@@ -834,7 +834,8 @@ CBox.prototype.Apply_MenuProps = function(Props)
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);
}
};
......@@ -850,11 +851,12 @@ CBox.prototype.Can_DeleteForcedBreak = function()
{
return this.IsForcedBreak();
};
CBox.prototype.raw_ForcedBreak = function(InsertBreak)
CBox.prototype.raw_ForcedBreak = function(InsertBreak, AlnAt)
{
if(InsertBreak)
{
this.Pr.Insert_ForcedBreak();
this.Pr.Apply_AlnAt(AlnAt);
}
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