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