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

get text properties

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48444 954022d7-b5bf-4e40-9824-e11837661b57
parent af26bb0f
......@@ -398,7 +398,7 @@ CControlComposition.prototype =
},
GetTxtPrp: function()
{
var txtPrp = this.Content[this.CurPos].GetPrpSelectContent();
return this.Content[this.CurPos].GetPrpSelectContent();
}
}
var MathControl = new CControlComposition();
......
......@@ -88,7 +88,7 @@ CMathBase.prototype =
},
getOwnTPrp: function()
{
return this.txtPrp();
return this.textPrp;
},
/*getTxtPrp_2: function()
{
......
......@@ -170,11 +170,21 @@ CMathContent.prototype =
return runPrp;
},
getSelectTPrp: function()
getSelectTPrp: function(bSelect)
{
var start, end;
if(bSelect)
{
start = this.selection.startPos;
end = this.selection.endPos;
}
else
{
start = 0;
end = this.content.length;
}
if( this.selection.startPos != this.selection.endPos )
{
......@@ -185,7 +195,7 @@ CMathContent.prototype =
end = tmp;
}
}
var TComp;
var TComp = new CMathTextPrp();
if(start !== end)
{
......@@ -218,7 +228,9 @@ CMathContent.prototype =
txtPrp.FontFamily = -1;
}
}
TComp = this.getTxtPrp();
TComp.Merge( this.textPrp );
TComp.Merge(this.Composition.TxtPrp);
TComp.Merge(txtPrp);
if(TComp.FontSize == -1)
......@@ -236,8 +248,8 @@ CMathContent.prototype =
}
else
{
TComp = this.getRunPrp(start);
TComp.Merge(this.getTxtPrp());
TComp.Merge( this.getRunPrp(start) );
TComp.Merge(this.Composition.TxtPrp);
}
......@@ -3993,7 +4005,7 @@ CMathComposition.prototype =
},
GetPrpSelectContent: function()
{
return this.SelectContent.getSelectTPrp();
return this.SelectContent.getSelectTPrp(true);
},
//// test function ////
......@@ -4830,6 +4842,7 @@ function CEmpty()
this.IsHighElement = function() { return false; };
this.setTxtPrp = function(txtPrp) { this.textPrp.Merge(txtPrp); };
this.getRunPrp = function() {return this.textPrp;};
this.getOwnTPrp = function() {return this.textPrp;}
}
......
......@@ -155,7 +155,7 @@ CMathText.prototype =
},
getOwnTPrp: function()
{
return this.txtPrp();
return this.textPrp;
},
// ascent = Symbol.Ascent // = Placeholder.Ascent (= Placeholder.Height)
// descent = FontAscent - Placeholder.Height (FontAscent = FontHeight - FontDescent)
......
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