Commit 406417e5 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

Переделала break => класс CMathBreak со свойством AlnAt

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58996 954022d7-b5bf-4e40-9824-e11837661b57
parent 29cad3d6
......@@ -4,14 +4,21 @@ function CMathBreak()
{
this.AlnAt = undefined;
}
CMathBreak.prototype.Set_FromObj = function(Obj)
CMathBreak.prototype.Set_FromObject = function(Obj)
{
if(Obj.AlnAt !== undefined && Obj.AlnAt !== null && Obj.AlnAt - 0 == 0)
{
if(Obj.AlnAt >= 0 && Obj.AlnAt <= 255)
if(Obj.AlnAt >= 1 && Obj.AlnAt <= 255)
this.AlnAt = Obj.AlnAt;
}
}
CMathBreak.prototype.Copy = function()
{
var NewMBreak = new CMathBreak();
NewMBreak.AlnAt = this.AlnAt;
return NewMBreak;
}
function CMathBorderBoxPr()
{
......@@ -354,8 +361,8 @@ CBorderBox.prototype.setPosition = function(pos, PosInfo)
function CMathBoxPr()
{
this.brk = undefined;
this.aln = false;
this.brk = false;
this.diff = false;
this.noBreak = false;
this.opEmu = false;
......@@ -368,10 +375,11 @@ CMathBoxPr.prototype.Set_FromObject = function(Obj)
else
this.aln = false;
if(true === Obj.brk || 1 === Obj.brk)
this.brk = true;
else
this.brk = false;
if(Obj.brk !== null && Obj.brk !== undefined)
{
this.brk = new CMathBreak();
this.brk.Set_FromObject(Obj);
}
if(true === Obj.diff || 1 === Obj.diff)
this.diff = true;
......@@ -394,11 +402,14 @@ CMathBoxPr.prototype.Copy = function()
var NewPr = new CMathBoxPr();
NewPr.aln = this.aln ;
NewPr.brk = this.brk ;
NewPr.diff = this.diff ;
NewPr.noBreak = this.noBreak;
NewPr.opEmu = this.opEmu ;
if(this.brk !== undefined)
NewPr.brk = this.brk.Copy();
return NewPr;
};
......
......@@ -570,34 +570,6 @@ function CMPrp()
}
CMPrp.prototype =
{
setMathProps: function(props)
{
if(props.aln === true || props.aln == false)
this.aln = props.aln;
if(props.brk === true || props.brk == false)
this.brk = props.brk;
if(props.lit === true || props.lit == false)
this.lit = props.lit;
if(props.nor === true || props.nor == false)
this.nor = props.nor;
if(props.sty !== null && props.sty !== undefined)
this.sty = props.sty;
// TXT_DOUBLE_STRUCK U+1D538 - U+1D56B
// TXT_MONOSPACE U+1D670 - U+1D6A3
// TXT_FRAKTUR U+1D504 - U+1D537
// TXT_SANS_SERIF U+1D608 - U+1D63B
// TXT_SCRIPT U+1D49C - U+1D4CF
if(props.scr !== null && props.scr !== undefined)
this.scr = props.scr;
},
getPropsForWrite: function()
{
var props =
......@@ -635,11 +607,13 @@ CMPrp.prototype =
var NewMPrp = new CMPrp();
NewMPrp.aln = this.aln;
NewMPrp.brk = this.brk;
NewMPrp.lit = this.lit;
NewMPrp.nor = this.nor;
NewMPrp.sty = this.sty;
NewMPrp.scr = this.scr;
if(this.brk !== undefined)
NewPr.brk = this.brk.Copy();
return NewMPrp;
},
......
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