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

поправила баги предыдущей заливки

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54663 954022d7-b5bf-4e40-9824-e11837661b57
parent aaa1a1cf
...@@ -7771,7 +7771,7 @@ ParaMath.prototype = ...@@ -7771,7 +7771,7 @@ ParaMath.prototype =
this.Math.AddLetter( 0x0020 ); this.Math.AddLetter( 0x0020 );
else if ( para_Math === Type ) else if ( para_Math === Type )
{ {
var rPr = this.Math.GetCurrentRPrp(); var rPr = this.Math.GetCurrentRunPrp();
Item.Math.Root.setRPrp(rPr); Item.Math.Root.setRPrp(rPr);
this.Math.AddToComposition(Item.Math.Root); this.Math.AddToComposition(Item.Math.Root);
} }
...@@ -7803,19 +7803,18 @@ ParaMath.prototype = ...@@ -7803,19 +7803,18 @@ ParaMath.prototype =
} }
} }
}, },
CreateElem : function (oElem, oParent, props)
{
var ctrPrp = new CTextPr();
oElem.setCtrPrp(ctrPrp);
if (oParent) CreateElem : function (oElem, oParent, props)
oParent.addElementToContent(oElem); {
/*var ctrPrp = new CTextPr();
oElem.setCtrPrp(ctrPrp);*/
oElem.relate(oParent);
oElem.init(props);
oElem.init(props); // прокидываем свойства после добавления в формулу, т.к. дефолтные настройки(общие для всей формулы, к-ые передаются из settings) хранятся в Composition if (oParent)
oElem.setArgSize(oParent.argSize); oParent.addElementToContent(oElem);
}, },
CreateFraction : function (oFraction,oParentElem,props,sNumText,sDenText) CreateFraction : function (oFraction,oParentElem,props,sNumText,sDenText)
{ {
...@@ -7923,13 +7922,13 @@ ParaMath.prototype = ...@@ -7923,13 +7922,13 @@ ParaMath.prototype =
Selection_IsEmpty : function() Selection_IsEmpty : function()
{ {
console.log("Selection_IsEmpty " + this.Math.Selection_IsEmpty()); //console.log("Selection_IsEmpty " + this.Math.Selection_IsEmpty());
return this.Math.Selection_IsEmpty(); return this.Math.Selection_IsEmpty();
}, },
Selection_IsUse : function() Selection_IsUse : function()
{ {
console.log("Selection_IsUse " + ( true === this.Math.Selection_IsEmpty() ? false : true )); //console.log("Selection_IsUse " + ( true === this.Math.Selection_IsEmpty() ? false : true ));
return ( true === this.Math.Selection_IsEmpty() ? false : true ); return ( true === this.Math.Selection_IsEmpty() ? false : true );
}, },
......
...@@ -314,8 +314,8 @@ CMPrp.prototype = ...@@ -314,8 +314,8 @@ CMPrp.prototype =
{ {
var textPrp = new CTextPr(); var textPrp = new CTextPr();
textPrp.italic = this.mathPrp.italic; textPrp.italic = this.italic;
textPrp.bold = this.mathPrp.bold; textPrp.bold = this.bold;
if(this.typeText == TXT_ROMAN) if(this.typeText == TXT_ROMAN)
textPrp.Italic = false; textPrp.Italic = false;
...@@ -4736,7 +4736,8 @@ CMathContent.prototype = ...@@ -4736,7 +4736,8 @@ CMathContent.prototype =
for(var i = 0; i < this.content.length; i++) for(var i = 0; i < this.content.length; i++)
{ {
var type = this.content[i].value.typeObj; var obj = this.content[i].value,
type = obj.typeObj;
if(type == MATH_TEXT) if(type == MATH_TEXT)
{ {
...@@ -4753,13 +4754,13 @@ CMathContent.prototype = ...@@ -4753,13 +4754,13 @@ CMathContent.prototype =
} }
else if(type == MATH_RUN_PRP) else if(type == MATH_RUN_PRP)
{ {
var mergedWPrp = this.content[i].value.getMergedWPrp(); var mergedWPrp = obj.getMergedWPrp();
var oWPrp = new CTextPr(); var oWPrp = new CTextPr();
oWPrp.Merge(mergedWPrp); oWPrp.Merge(mergedWPrp);
this.applyArgSize(oWPrp); // здесь мержим с DEFAULT_RUN_PRP this.applyArgSize(oWPrp); // здесь мержим с DEFAULT_RUN_PRP
typeTxt = oWPrp.getTypeText(); typeTxt = obj.getTypeText();
/*if(typeTxt == TXT_ROMAN) // MATH TEXT, наклон не меняем, если italic /*if(typeTxt == TXT_ROMAN) // MATH TEXT, наклон не меняем, если italic
oWPrp.Italic = false;*/ oWPrp.Italic = false;*/
......
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