Commit 98fc4400 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Bug #31890 Исправлен баг с зацикливанием при нулевом дефолтовом табе.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68743 954022d7-b5bf-4e40-9824-e11837661b57
parent 98baac2c
......@@ -2350,24 +2350,27 @@ function CHorRuler()
_positon_y = this.m_nBottom + 1.5;
var _min_default_value = Math.max(0, this.m_dMaxTab);
while (true)
if (this.m_dDefaultTab > 0.01)
{
if ((_margin_left + position_default_tab) > this.m_dMarginRight)
break;
if (position_default_tab < _min_default_value)
while (true)
{
position_default_tab += this.m_dDefaultTab;
continue;
}
if ((_margin_left + position_default_tab) > this.m_dMarginRight)
break;
var _x = parseInt((_margin_left + position_default_tab) * dKoef_mm_to_pix) + left + 0.5;
context.beginPath();
context.moveTo(_x, _positon_y);
context.lineTo(_x, _positon_y + 3);
context.stroke();
if (position_default_tab < _min_default_value)
{
position_default_tab += this.m_dDefaultTab;
continue;
}
position_default_tab += this.m_dDefaultTab;
var _x = parseInt((_margin_left + position_default_tab) * dKoef_mm_to_pix) + left + 0.5;
context.beginPath();
context.moveTo(_x, _positon_y);
context.lineTo(_x, _positon_y + 3);
context.stroke();
position_default_tab += this.m_dDefaultTab;
}
}
// custom tabs
......
......@@ -1918,7 +1918,13 @@ Paragraph.prototype.private_RecalculateGetTabPos = function(X, ParaPr, CurPage)
if ( null === Tab )
{
if ( X < PageStart.X + ParaPr.Ind.Left )
{
NewX = PageStart.X + ParaPr.Ind.Left;
}
else if (Default_Tab_Stop < 0.001)
{
NewX = X;
}
else
{
NewX = PageStart.X;
......
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