Commit 17dedfb9 authored by Anna.Pavlova's avatar Anna.Pavlova

Strikeout, DoubleStrikeout

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59650 954022d7-b5bf-4e40-9824-e11837661b57
parent 8688851b
...@@ -436,38 +436,6 @@ ParaMath.prototype.Apply_TextPr = function(TextPr, IncFontSize, ApplyToAll) ...@@ -436,38 +436,6 @@ ParaMath.prototype.Apply_TextPr = function(TextPr, IncFontSize, ApplyToAll)
else else
content.Apply_TextPr(TextPr, IncFontSize, ApplyToAll); content.Apply_TextPr(TextPr, IncFontSize, ApplyToAll);
} }
/*if(IncFontSize == undefined)
{
var FontSize = TextPr.FontSize;
if(TextPr.FontSize !== undefined && content.IsNormalTextInRuns() == false)
{
var NewTextPr = new CTextPr();
NewTextPr.FontSize = FontSize;
this.Root.Apply_TextPr(NewTextPr, IncFontSize, true);
TextPr.FontSize = undefined;
}
content.Apply_TextPr(TextPr, IncFontSize, ApplyToAll);
TextPr.FontSize = FontSize;
}
else
{
if(content.IsNormalTextInRuns() == false)
this.Root.Apply_TextPr(TextPr, IncFontSize, true);
else
content.Apply_TextPr(TextPr, IncFontSize, ApplyToAll);
}*/
} }
}; };
ParaMath.prototype.Clear_TextPr = function() ParaMath.prototype.Clear_TextPr = function()
...@@ -1436,9 +1404,9 @@ ParaMath.prototype.Draw_Lines = function(PDSL) ...@@ -1436,9 +1404,9 @@ ParaMath.prototype.Draw_Lines = function(PDSL)
//this.Root.Draw_Lines(PDSL); this.Root.Draw_Lines(PDSL);
PDSL.X += this.Width; PDSL.X = this.X + this.Width;
} }
}; };
......
...@@ -3664,6 +3664,19 @@ ParaRun.prototype.Draw_Lines = function(PDSL) ...@@ -3664,6 +3664,19 @@ ParaRun.prototype.Draw_Lines = function(PDSL)
break; break;
} }
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 );
else if ( true === CurTextPr.Strikeout )
aStrikeout.Add( StrikeoutY, StrikeoutY, X, X + ItemWidthVisible, LineW, CurColor.r, CurColor.g, CurColor.b );
X += ItemWidthVisible;
break;
}
} }
if ( 2 === SpellingMarksArray[Pos + 1] || 3 === SpellingMarksArray[Pos + 1] ) if ( 2 === SpellingMarksArray[Pos + 1] || 3 === SpellingMarksArray[Pos + 1] )
......
...@@ -1081,6 +1081,55 @@ CMathBase.prototype.Draw_HighLights = function(PDSH, bAll) ...@@ -1081,6 +1081,55 @@ CMathBase.prototype.Draw_HighLights = function(PDSH, bAll)
PDSH.X = this.pos.x + this.ParaMath.X + this.size.width; PDSH.X = this.pos.x + this.ParaMath.X + this.size.width;
}; };
CMathBase.prototype.Draw_Lines = function(PDSL)
{
var CtrPrp = this.Get_CompiledCtrPrp();
var aStrikeout = PDSL.Strikeout;
var aDStrikeout = PDSL.DStrikeout;
var X = PDSL.X;
var Y = PDSL.Baseline - CtrPrp.FontSize * g_dKoef_pt_to_mm * 0.27;
var LineW = (CtrPrp.FontSize / 18) * g_dKoef_pt_to_mm;
var Para = PDSL.Paragraph;
var BgColor = PDSL.BgColor;
if ( undefined !== CtrPrp.Shd && shd_Nil !== CtrPrp.Shd.Value )
BgColor = CtrPrp.Shd.Get_Color( Para );
var AutoColor = ( undefined != BgColor && false === BgColor.Check_BlackAutoColor() ? new CDocumentColor( 255, 255, 255, false ) : new CDocumentColor( 0, 0, 0, false ) );
var CurColor, RGBA, Theme = this.Paragraph.Get_Theme(), ColorMap = this.Paragraph.Get_ColorMap();
// Выставляем цвет обводки
if ( true === PDSL.VisitedHyperlink && ( undefined === this.Pr.Color && undefined === this.Pr.Unifill ) )
CurColor = new CDocumentColor( 128, 0, 151 );
else if ( true === CtrPrp.Color.Auto && !CtrPrp.Unifill)
CurColor = new CDocumentColor( AutoColor.r, AutoColor.g, AutoColor.b );
else
{
if(CtrPrp.Unifill)
{
CtrPrp.Unifill.check(Theme, ColorMap);
RGBA = CtrPrp.Unifill.getRGBAColor();
CurColor = new CDocumentColor( RGBA.R, RGBA.G, RGBA.B );
}
else
{
CurColor = new CDocumentColor( CtrPrp.Color.r, CtrPrp.Color.g, CtrPrp.Color.b );
}
}
if ( true === CtrPrp.DStrikeout )
aDStrikeout.Add( Y, Y, X, X + this.size.width, LineW, CurColor.r, CurColor.g, CurColor.b );
else if ( true === CtrPrp.Strikeout )
aStrikeout.Add( Y, Y, X, X + this.size.width, LineW, CurColor.r, CurColor.g, CurColor.b );
for ( var CurPos = 0; CurPos < this.Content.length; CurPos++ )
this.Content[CurPos].Draw_Lines(PDSL);
PDSL.X = this.pos.x + this.ParaMath.X + this.size.width;
};
CMathBase.prototype.Make_ShdColor = function(PDSE, CurTextPr) CMathBase.prototype.Make_ShdColor = function(PDSE, CurTextPr)
{ {
var Para = PDSE.Paragraph; var Para = PDSE.Paragraph;
......
...@@ -3579,6 +3579,16 @@ CMathContent.prototype.Draw_HighLights = function(PDSH, bAll) ...@@ -3579,6 +3579,16 @@ CMathContent.prototype.Draw_HighLights = function(PDSH, bAll)
}; };
CMathContent.prototype.Draw_Lines = function(PDSL) CMathContent.prototype.Draw_Lines = function(PDSL)
{ {
var lng = this.Content.length;
var X = PDSL.X = this.pos.x + this.ParaMath.X,
Y = PDSL.Baseline = this.pos.y + this.ParaMath.Y + this.size.ascent;
for ( var CurPos = 0; CurPos < lng; CurPos++ )
{
this.Content[CurPos].Draw_Lines(PDSL);
PDSL.Baseline = Y;
}
}; };
CMathContent.prototype.Selection_Remove = function() CMathContent.prototype.Selection_Remove = 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