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

1. Поправила выравнивание итератора для CLimit

2. Bыравнивание по baseline текста в Groupcharacter (для случая, когда vertJustification и position совпадают, 
то есть для случая когда argSize берется -1)
3. Проверила AgSize +1, +2 : результат совпадает с Word

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58471 954022d7-b5bf-4e40-9824-e11837661b57
parent 5f62daaf
......@@ -501,7 +501,15 @@ CNumerator.prototype.recalculateSize = function()
var gapNum = 7.832769097222222 * mgCtrPrp.FontSize/36,
minGap = mgCtrPrp.FontSize* 25.4/96 * 0.16;
// var delta = 0.65*gap - Descent;
g_oTextMeasurer.SetFont(mgCtrPrp);
var Height = g_oTextMeasurer.GetHeight();
if(this.Parent.kind == MATH_LIMIT || this.Parent.kind == MATH_GROUP_CHARACTER)
{
gapNum = Height/2.4;
minGap = Height/10;
}
var delta = 0.8076354679802956*gapNum - Descent;
this.gap = delta > minGap ? delta - 0.95*minGap: minGap;
......@@ -524,10 +532,6 @@ CNumerator.prototype.fillMathComposition = function(content)
{
this.elements[0][0] = content;
}
/*CNumerator.prototype.Get_CompiledCtrPrp = function()
{
return this.Parent.Get_CompiledCtrPrp();
}*/
CNumerator.prototype.getPropsForWrite = function()
{
var props = {};
......@@ -535,10 +539,9 @@ CNumerator.prototype.getPropsForWrite = function()
return props;
}
function CDenominator(bLimit)
function CDenominator()
{
this.gap = 0;
this.bLimit = bLimit == true;
CMathBase.call(this, true);
......@@ -571,10 +574,14 @@ CDenominator.prototype.recalculateSize = function()
Ascent = arg.ascent - 4.938888888888888*mgCtrPrp.FontSize/36,
minGap = gapDen/3;
if(this.bLimit)
g_oTextMeasurer.SetFont(mgCtrPrp);
var Height = g_oTextMeasurer.GetHeight();
if(this.Parent.kind == MATH_LIMIT || this.Parent.kind == MATH_GROUP_CHARACTER)
{
gapDen /= 1.5;
minGap /= 1.5;
gapDen = Height/2.6;
minGap = Height/10;
}
var delta = gapDen - Ascent;
......@@ -584,6 +591,7 @@ CDenominator.prototype.recalculateSize = function()
var height = arg.height + this.gap;
var ascent = arg.ascent + this.gap;
this.size = {width : width, height: height, ascent: ascent};
}
CDenominator.prototype.setPosition = function(pos, PosInfo)
......@@ -603,10 +611,6 @@ CDenominator.prototype.fillMathComposition = function(content)
{
this.elements[0][0] = content;
}
/*CDenominator.prototype.Get_CompiledCtrPrp = function()
{
return this.Parent.Get_CompiledCtrPrp();
}*/
CDenominator.prototype.getPropsForWrite = function()
{
var props = {};
......
......@@ -103,7 +103,7 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
this.FName = this.ContentFName;
//this.elements[1][0] = this.Iterator;
this.Iterator = new CDenominator(true);
this.Iterator = new CDenominator();
this.Iterator.fillMathComposition(this.ContentIterator);
this.elements[0][0] = this.FName;
......
This diff is collapsed.
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