From a0e865ee6b4d601f2bba2bf26a4cc2bd2b17b0f0 Mon Sep 17 00:00:00 2001 From: "Anna.Pavlova" <Anna.Pavlova@OnlyOffice.com> Date: Fri, 17 Oct 2014 13:15:04 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B0=D0=BB=D0=B0=20break=20=3D>=20=D0=BA=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D1=81=20CMathBreak=20=D1=81=D0=BE=20=D1=81=D0=B2=D0=BE=D0=B9?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=BE=D0=BC=20AlnAt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58996 954022d7-b5bf-4e40-9824-e11837661b57 --- Word/Math/borderBox.js | 27 +++++++++++++++++++-------- Word/Math/mathContent.js | 32 +++----------------------------- 2 files changed, 22 insertions(+), 37 deletions(-) diff --git a/Word/Math/borderBox.js b/Word/Math/borderBox.js index 759152ab0..0713794d3 100644 --- a/Word/Math/borderBox.js +++ b/Word/Math/borderBox.js @@ -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; }; diff --git a/Word/Math/mathContent.js b/Word/Math/mathContent.js index a580cd600..d59f64a8e 100644 --- a/Word/Math/mathContent.js +++ b/Word/Math/mathContent.js @@ -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; }, -- 2.30.9