Commit 85fa456b authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix bug with bullet properties

parent f6acd148
......@@ -63,6 +63,19 @@ ParaHyperlink.prototype.Get_Id = function()
return this.Id;
};
ParaHyperlink.prototype.Get_FirstTextPr2 = function()
{
for(var i = 0; i < this.Content.length; ++i)
{
if(this.Content[i].Type === para_Run && !this.Content[i].Is_Empty())
{
return this.Content[i].Get_CompiledPr();
}
}
return null;
};
ParaHyperlink.prototype.Copy = function(Selected)
{
var NewHyperlink = CParagraphContentWithParagraphLikeContent.prototype.Copy.apply(this, arguments);
......
......@@ -325,6 +325,29 @@ Paragraph.prototype.Get_FirstTextPr = function()
return this.Content[0].Get_CompiledPr();
};
Paragraph.prototype.Get_FirstTextPr2 = function()
{
var HyperlinkPr;
for(var i = 0; i < this.Content.length; ++i)
{
if(!this.Content[i].Is_Empty())
{
if(para_Run === this.Content[i].Type)
{
return this.Content[i].Get_CompiledPr();
}
else if(para_Hyperlink === this.Content[i].Type)
{
HyperlinkPr = this.Content[i].Get_FirstTextPr2();
if(HyperlinkPr)
{
return HyperlinkPr;
}
}
}
}
return this.Get_CompiledPr2(false).TextPr;
};
Paragraph.prototype.GetAllDrawingObjects = function(DrawingObjs)
{
if (undefined === DrawingObjs)
......@@ -1992,9 +2015,9 @@ Paragraph.prototype.Internal_Draw_4 = function(CurPage, pGraphics, Pr, BgColor,
if (true != this.IsEmpty())
{
if (Pr.ParaPr.Ind.FirstLine < 0)
NumberingItem.Draw(X, Y, pGraphics, this.Get_FirstTextPr(), PDSE);
NumberingItem.Draw(X, Y, pGraphics, this.Get_FirstTextPr2(), PDSE);
else
NumberingItem.Draw(this.Pages[CurPage].X + Pr.ParaPr.Ind.Left, Y, pGraphics, this.Get_FirstTextPr(), PDSE);
NumberingItem.Draw(this.Pages[CurPage].X + Pr.ParaPr.Ind.Left, Y, pGraphics, this.Get_FirstTextPr2(), PDSE);
}
}
......
......@@ -2990,7 +2990,7 @@ CParagraphRecalculateStateWrap.prototype =
}
// Найдем настройки для первого текстового элемента
var FirstTextPr = Para.Get_FirstTextPr();
var FirstTextPr = Para.Get_FirstTextPr2();
NumberingItem.Bullet = Bullet;
NumberingItem.BulletNum = BulletNum + 1;
......
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