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() ...@@ -2350,24 +2350,27 @@ function CHorRuler()
_positon_y = this.m_nBottom + 1.5; _positon_y = this.m_nBottom + 1.5;
var _min_default_value = Math.max(0, this.m_dMaxTab); 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) while (true)
break;
if (position_default_tab < _min_default_value)
{ {
position_default_tab += this.m_dDefaultTab; if ((_margin_left + position_default_tab) > this.m_dMarginRight)
continue; break;
}
var _x = parseInt((_margin_left + position_default_tab) * dKoef_mm_to_pix) + left + 0.5; if (position_default_tab < _min_default_value)
context.beginPath(); {
context.moveTo(_x, _positon_y); position_default_tab += this.m_dDefaultTab;
context.lineTo(_x, _positon_y + 3); continue;
context.stroke(); }
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 // custom tabs
......
...@@ -1918,7 +1918,13 @@ Paragraph.prototype.private_RecalculateGetTabPos = function(X, ParaPr, CurPage) ...@@ -1918,7 +1918,13 @@ Paragraph.prototype.private_RecalculateGetTabPos = function(X, ParaPr, CurPage)
if ( null === Tab ) if ( null === Tab )
{ {
if ( X < PageStart.X + ParaPr.Ind.Left ) if ( X < PageStart.X + ParaPr.Ind.Left )
{
NewX = PageStart.X + ParaPr.Ind.Left; NewX = PageStart.X + ParaPr.Ind.Left;
}
else if (Default_Tab_Stop < 0.001)
{
NewX = X;
}
else else
{ {
NewX = PageStart.X; 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