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

Поправила баг для justDraw элементов для ф-ии getCode

(стоит заглушка для placeholder и justDraw элементов)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55627 954022d7-b5bf-4e40-9824-e11837661b57
parent 4be45c3f
...@@ -98,14 +98,14 @@ ParaMath.prototype = ...@@ -98,14 +98,14 @@ ParaMath.prototype =
if ( para_Text === Type) if ( para_Text === Type)
{ {
var oText = new CMathText(); var oText = new CMathText(false);
oText.addTxt(Item.Value); oText.addTxt(Item.Value);
oStartContent.Add(oText); oStartContent.Add(oText);
} }
else if ( para_Space === Type ) else if ( para_Space === Type )
{ {
//var oSpace = new ParaSpace(1); //var oSpace = new ParaSpace(1);
var oText = new CMathText(); var oText = new CMathText(false);
oText.addTxt(" "); oText.addTxt(" ");
oStartContent.Add(oText); oStartContent.Add(oText);
} }
...@@ -151,7 +151,7 @@ ParaMath.prototype = ...@@ -151,7 +151,7 @@ ParaMath.prototype =
var items = new Array(); var items = new Array();
for (var Pos=0; Pos < sText.length; Pos++) for (var Pos=0; Pos < sText.length; Pos++)
{ {
var oText = new CMathText(); var oText = new CMathText(false);
oText.addTxt(sText[Pos]); oText.addTxt(sText[Pos]);
MathRun.Content.splice( Pos, 0, oText ); MathRun.Content.splice( Pos, 0, oText );
items.push(oText); items.push(oText);
......
...@@ -8535,7 +8535,7 @@ function Binary_oMathReader(stream) ...@@ -8535,7 +8535,7 @@ function Binary_oMathReader(stream)
{ {
var text = this.ReadMathText(length); var text = this.ReadMathText(length);
//var text = this.stream.GetString2LE(length); //var text = this.stream.GetString2LE(length);
var oText = new CMathText(); var oText = new CMathText(false);
oText.addTxt(text); oText.addTxt(text);
oElem.addElementToContent(oText); oElem.addElementToContent(oText);
} }
...@@ -10207,7 +10207,7 @@ function Binary_oMathReader(stream) ...@@ -10207,7 +10207,7 @@ function Binary_oMathReader(stream)
//управляющие символы //управляющие символы
if (0x001F < text[i].charCodeAt(0)) if (0x001F < text[i].charCodeAt(0))
{ {
var oText = new CMathText(); var oText = new CMathText(false);
oText.addTxt(text[i]); oText.addTxt(text[i]);
oMRun.Content.splice( i, 0, oText ); oMRun.Content.splice( i, 0, oText );
} }
......
...@@ -522,7 +522,7 @@ CBreve.prototype.relate = function(parent) ...@@ -522,7 +522,7 @@ CBreve.prototype.relate = function(parent)
function CSign() function CSign()
{ {
this.sign = new CMathText(); this.sign = new CMathText(true);
this.typeOper = null; this.typeOper = null;
this.Parent = null; this.Parent = null;
} }
...@@ -587,20 +587,6 @@ CSign.prototype.setPosition = function(pos) ...@@ -587,20 +587,6 @@ CSign.prototype.setPosition = function(pos)
}; };
this.sign.setPosition(position); this.sign.setPosition(position);
} }
CSign.prototype.old_fixSize = function(bIncline)
{
this.sign.recalculateSize();
this.dH = 0.7*this.Parent.getCtrPrp().FontSize/36;
var height = this.sign.size.height + this.dH,
width = this.sign.size.widthG;
if(bIncline)
width += 0.1 * this.sign.size.height; // incline
this.size = {width: width, height: height};
}
CSign.prototype.fixSize = function(oMeasure, stretch, bIncline) CSign.prototype.fixSize = function(oMeasure, stretch, bIncline)
{ {
var ctrPrp = this.Parent.getCtrPrp(); var ctrPrp = this.Parent.getCtrPrp();
......
...@@ -1072,7 +1072,7 @@ CMathContent.prototype = ...@@ -1072,7 +1072,7 @@ CMathContent.prototype =
code = 0x1D6A5; code = 0x1D6A5;
} }
var symb = new CMathText(); var symb = new CMathText(false);
symb.add(code); symb.add(code);
this.addToContent(symb); this.addToContent(symb);
...@@ -4325,7 +4325,7 @@ CMathContent.prototype = ...@@ -4325,7 +4325,7 @@ CMathContent.prototype =
}, },
fillPlaceholders: function() fillPlaceholders: function()
{ {
var placeholder = new CMathText(); var placeholder = new CMathText(false);
placeholder.relate(this); placeholder.relate(this);
placeholder.fillPlaceholders(); placeholder.fillPlaceholders();
...@@ -7730,12 +7730,14 @@ CMathContent.prototype = ...@@ -7730,12 +7730,14 @@ CMathContent.prototype =
this.content[pos].Get_TextPr(ContentPos, Depth); this.content[pos].Get_TextPr(ContentPos, Depth);
} }
}, },
Get_Default_TPrp: function() Get_Default_TPrp: function()
{ {
return this.Composition.Parent.Get_Default_TPrp(); return this.Composition.Parent.Get_Default_TPrp();
},
Get_LeftPos: function()
{
}, },
////////////////////////// //////////////////////////
......
...@@ -50,7 +50,7 @@ CMathTextPrp.prototype = ...@@ -50,7 +50,7 @@ CMathTextPrp.prototype =
} }
} }
function CMathText() function CMathText(bJDraw)
{ {
this.typeObj = MATH_TEXT; this.typeObj = MATH_TEXT;
...@@ -59,6 +59,10 @@ function CMathText() ...@@ -59,6 +59,10 @@ function CMathText()
this.value = null; this.value = null;
this.bJDraw = false; this.bJDraw = false;
if(bJDraw === false || bJDraw === true)
this.bJDraw = bJDraw;
this.type = TXT_ROMAN; this.type = TXT_ROMAN;
this.GapLeft = 0; this.GapLeft = 0;
...@@ -100,7 +104,7 @@ CMathText.prototype = ...@@ -100,7 +104,7 @@ CMathText.prototype =
{ {
var code = this.value; var code = this.value;
if(this.typeObj === MATH_PLACEHOLDER) if(this.typeObj === MATH_PLACEHOLDER || this.bJDraw)
return code; return code;
var bCapitale = (code > 0x0040 && code < 0x005B), var bCapitale = (code > 0x0040 && code < 0x005B),
...@@ -108,6 +112,7 @@ CMathText.prototype = ...@@ -108,6 +112,7 @@ CMathText.prototype =
var Type = this.Parent.Math_GetTypeText(); var Type = this.Parent.Math_GetTypeText();
if(Type == TXT_ROMAN ) if(Type == TXT_ROMAN )
{ {
var bDigit = (code > 0x002F && code < 0x003A), var bDigit = (code > 0x002F && code < 0x003A),
......
...@@ -142,7 +142,7 @@ CNary.prototype.init = function(props) ...@@ -142,7 +142,7 @@ CNary.prototype.init = function(props)
{ {
this.code = signCode; this.code = signCode;
this.type = NARY_TEXT_OPER; this.type = NARY_TEXT_OPER;
sign = new CMathText(); sign = new CMathText(true);
sign.add(signCode); sign.add(signCode);
} }
......
...@@ -2828,7 +2828,7 @@ COperator.prototype.init = function(properties, defaultProps) // props (c ...@@ -2828,7 +2828,7 @@ COperator.prototype.init = function(properties, defaultProps) // props (c
codeChr = code; codeChr = code;
typeOper = OPERATOR_TEXT; typeOper = OPERATOR_TEXT;
operator = new CMathText(); operator = new CMathText(true);
operator.add(code); operator.add(code);
operator.setJustDraw(true); operator.setJustDraw(true);
} }
......
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