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

При отрисовки strikeout/doubleStrikeout для плейсхолдера ориентируемся на...

При отрисовки strikeout/doubleStrikeout для плейсхолдера ориентируемся на ctrPrp, а не на прямые настройки данного Run, при этом на вводе подхватываются прямые настройки данного Run (то есть если в текст. настройках плейсхолдера был выставлен strikeout/doublestrikeout, то для введенного текста будет применен strikeout/doublestrikeout)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59738 954022d7-b5bf-4e40-9824-e11837661b57
parent b1b28249
......@@ -3532,6 +3532,7 @@ ParaRun.prototype.Draw_Lines = function(PDSL)
var CurTextPr = this.Get_CompiledPr( false );
var StrikeoutY = Y - this.YOffset;
switch(CurTextPr.VertAlign)
......@@ -3616,7 +3617,6 @@ ParaRun.prototype.Draw_Lines = function(PDSL)
case para_NewLine:
{
X += ItemWidthVisible;
break;
}
......@@ -3666,7 +3666,6 @@ ParaRun.prototype.Draw_Lines = function(PDSL)
}
case para_Math_Text:
case para_Math_Ampersand:
case para_Math_Placeholder:
{
if ( true === CurTextPr.DStrikeout )
aDStrikeout.Add( StrikeoutY, StrikeoutY, X, X + ItemWidthVisible, LineW, CurColor.r, CurColor.g, CurColor.b );
......@@ -3674,6 +3673,17 @@ ParaRun.prototype.Draw_Lines = function(PDSL)
aStrikeout.Add( StrikeoutY, StrikeoutY, X, X + ItemWidthVisible, LineW, CurColor.r, CurColor.g, CurColor.b );
X += ItemWidthVisible;
break;
}
case para_Math_Placeholder:
{
var ctrPrp = this.Parent.GetCtrPrp();
if(true === ctrPrp.DStrikeout)
aDStrikeout.Add( StrikeoutY, StrikeoutY, X, X + ItemWidthVisible, LineW, CurColor.r, CurColor.g, CurColor.b );
else if(true === ctrPrp.Strikeout)
aStrikeout.Add( StrikeoutY, StrikeoutY, X, X + ItemWidthVisible, LineW, CurColor.r, CurColor.g, CurColor.b );
X += ItemWidthVisible;
break;
}
......@@ -7804,10 +7814,6 @@ ParaRun.prototype.Math_Draw = function(x, y, pGraphics)
{
Font.Italic = false;
Font.Bold = false;
//var defaultTxtPrp = this.Parent.ParaMath.Get_Default_TPrp();
//Font.FontFamily.Name = defaultTxtPrp.FontFamily.Name;
//Font.FontFamily.Index = defaultTxtPrp.FontFamily.Index;
}
pGraphics.SetFont(Font);
......@@ -7858,10 +7864,6 @@ ParaRun.prototype.Math_Recalculate = function(oMeasure, RPI, WidthPoints)
{
Font.Italic = false;
Font.Bold = false;
//var defaultTxtPrp = this.Parent.ParaMath.Get_Default_TPrp();
//Font.FontFamily.Name = defaultTxtPrp.FontFamily.Name;
//Font.FontFamily.Index = defaultTxtPrp.FontFamily.Index;
}
g_oTextMeasurer.SetFont(Font);
......@@ -7921,31 +7923,6 @@ ParaRun.prototype.Math_Recalculate = function(oMeasure, RPI, WidthPoints)
if (RPI.PRS.LineTextDescent < this.TextDescent)
RPI.PRS.LineTextDescent = this.TextDescent;
}
ParaRun.prototype.Math_Update_Cursor = function(X, Y, CurPage, UpdateTarget)
{
// TODO
// поставить заглушку на плейсхолдер, когда при перемещении всегда будет отрисовываться селект на плейсхолдере
var runPrp = this.Get_CompiledPr(false);
//this.Parent.ParaMath.ApplyArgSize(runPrp, this.Parent.argSize);
var sizeCursor = runPrp.FontSize*g_dKoef_pt_to_mm;
Y -= sizeCursor*0.8;
for(var i = 0; i < this.State.ContentPos; i++)
X += this.Content[i].size.width;
if ( null !== this.Paragraph && undefined !== this.Paragraph && UpdateTarget == true)
{
this.Paragraph.DrawingDocument.SetTargetSize(sizeCursor);
//Para.DrawingDocument.UpdateTargetFromPaint = true;
this.Paragraph.DrawingDocument.UpdateTarget(X, Y, this.Paragraph.Get_StartPage_Absolute() + CurPage );
//Para.DrawingDocument.UpdateTargetFromPaint = false;
}
return {X: X, Y: Y, Height: sizeCursor};
}
ParaRun.prototype.Math_Apply_Style = function(Value)
{
if(Value !== this.MathPrp.sty)
......@@ -7977,26 +7954,6 @@ ParaRun.prototype.getPropsForWrite = function()
return {wRPrp: wRPrp, mathRPrp: mathRPrp};
}
ParaRun.prototype.Math_SetGaps = function(GapsInfo)
{
this.Parent = GapsInfo.Parent;
this.Paragraph = GapsInfo.ParaMath.Paragraph;
var oWPrp = this.Get_CompiledPr(false);
for (var Pos = 0 ; Pos < this.Content.length; Pos++ )
{
if( !this.Content[Pos].IsAlignPoint() )
{
GapsInfo.leftRunPrp = GapsInfo.currRunPrp;
GapsInfo.Left = GapsInfo.Current;
GapsInfo.currRunPrp = oWPrp;
GapsInfo.Current = this.Content[Pos];
GapsInfo.setGaps();
}
}
}
ParaRun.prototype.Math_PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsInfo)
{
this.Parent = Parent;
......
......@@ -381,7 +381,6 @@ function CMathAccentPr()
this.chr = null;
this.chrType = null;
}
CMathAccentPr.prototype.Set_FromObject = function(Obj)
{
if (undefined !== Obj.chr && null !== Obj.chr)
......@@ -394,7 +393,6 @@ CMathAccentPr.prototype.Set_FromObject = function(Obj)
else
this.chrType = null;
};
CMathAccentPr.prototype.Copy = function()
{
var NewPr = new CMathAccentPr();
......@@ -404,7 +402,6 @@ CMathAccentPr.prototype.Copy = function()
return NewPr;
};
CMathAccentPr.prototype.Write_ToBinary = function(Writer)
{
// Long : chr (-1 : null)
......@@ -413,7 +410,6 @@ CMathAccentPr.prototype.Write_ToBinary = function(Writer)
Writer.WriteLong(null === this.chr ? -1 : this.chr);
Writer.WriteLong(null === this.chrType ? -1 : this.chrType);
};
CMathAccentPr.prototype.Read_FromBinary = function(Reader)
{
// Long : chr (-1 : null)
......
......@@ -937,23 +937,6 @@ CMathContent.prototype =
}
}
},
update_Cursor: function(CurPage, UpdateTarget)
{
var result;
if(this.Content[this.CurPos].Type == para_Math_Composition)
{
result = this.Content[this.CurPos].update_Cursor(CurPage, UpdateTarget);
}
else
{
var X = this.pos.x + this.ParaMath.X + this.WidthToElement[this.CurPos],
Y = this.pos.y + this.ParaMath.Y + this.size.ascent;
result = this.Content[this.CurPos].Math_Update_Cursor(X, Y, CurPage, UpdateTarget);
}
return result;
},
setCtrPrp: function()
{
......
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