Commit 00bbfa3f authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баз с пересчетом и записью в историю.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53176 954022d7-b5bf-4e40-9824-e11837661b57
parent fb744b55
......@@ -781,10 +781,12 @@ CDocument.prototype =
if ( true === bFullRecalc )
{
ChangeIndex = 0;
RecalcData.Inline.PageNum = 0;
}
else if ( -1 === RecalcData.Inline.Pos )
{
ChangeIndex = -1;
RecalcData.Inline.PageNum = 0;
}
else if ( RecalcData.Inline.Pos >= 0 )
{
......@@ -1015,7 +1017,6 @@ CDocument.prototype =
if ( undefined === Frame_YLimit )
Frame_YLimit = Page_Height;
for ( var TempIndex = Index; TempIndex < Index + FlowCount; TempIndex++ )
{
var TempElement = this.Content[TempIndex];
......@@ -10750,7 +10751,7 @@ CDocument.prototype =
Y_Top_Margin = Y_Top_Field;
}
this.HdrFtr.UpdateMargins( 0, true );
this.HdrFtr.UpdateMargins( 0, true, true );
break;
}
......@@ -10766,7 +10767,7 @@ CDocument.prototype =
Y_Bottom_Field = Page_Height - Y_Bottom_Margin;
Y_Top_Field = Y_Top_Margin;
this.HdrFtr.UpdateMargins( 0, true );
this.HdrFtr.UpdateMargins( 0, true, true );
break;
}
......@@ -10779,7 +10780,7 @@ CDocument.prototype =
Y_Bottom_Margin = Data.Margins_old.Bottom;
X_Left_Margin = Data.Margins_old.Left;
this.HdrFtr.UpdateMargins( 0, true );
this.HdrFtr.UpdateMargins( 0, true, true );
editor.DocumentOrientation = this.Orientation === orientation_Portrait ? true : false;
editor.sync_PageOrientCallback(editor.get_DocumentOrientation());
......@@ -10837,7 +10838,7 @@ CDocument.prototype =
Y_Top_Margin = Y_Top_Field;
}
this.HdrFtr.UpdateMargins( 0, true );
this.HdrFtr.UpdateMargins( 0, true, true );
break;
}
......@@ -10853,7 +10854,7 @@ CDocument.prototype =
Y_Bottom_Field = Page_Height - Y_Bottom_Margin;
Y_Top_Field = Y_Top_Margin;
this.HdrFtr.UpdateMargins( 0, true );
this.HdrFtr.UpdateMargins( 0, true, true );
break;
}
......@@ -10866,7 +10867,7 @@ CDocument.prototype =
Y_Bottom_Margin = Data.Margins_new.Bottom;
X_Left_Margin = Data.Margins_new.Left;
this.HdrFtr.UpdateMargins( 0, true );
this.HdrFtr.UpdateMargins( 0, true, true );
editor.DocumentOrientation = this.Orientation === orientation_Portrait ? true : false;
editor.sync_PageOrientCallback(editor.get_DocumentOrientation());
......@@ -11578,7 +11579,7 @@ CDocument.prototype =
Y_Top_Margin = Y_Top_Field;
}
this.HdrFtr.UpdateMargins( 0, true );
this.HdrFtr.UpdateMargins( 0, true, true );
break;
}
......@@ -11598,7 +11599,7 @@ CDocument.prototype =
Y_Bottom_Field = Page_Height - Y_Bottom_Margin;
Y_Top_Field = Y_Top_Margin;
this.HdrFtr.UpdateMargins( 0, true );
this.HdrFtr.UpdateMargins( 0, true, true );
break;
}
......@@ -11618,7 +11619,7 @@ CDocument.prototype =
Y_Bottom_Margin = Reader.GetDouble();
X_Left_Margin = Reader.GetDouble();
this.HdrFtr.UpdateMargins( 0, true );
this.HdrFtr.UpdateMargins( 0, true, true );
editor.DocumentOrientation = this.Orientation === orientation_Portrait ? true : false;
editor.sync_PageOrientCallback(editor.get_DocumentOrientation());
......
......@@ -417,7 +417,7 @@ CHeaderFooter.prototype =
return this.Content.Get_PageBounds(0);
},
UpdateMargins : function(bNoRecalc)
UpdateMargins : function(bNoRecalc, bNoSaveHistory)
{
// Обновляем границы
this.Content.X = X_Left_Field;
......@@ -426,7 +426,11 @@ CHeaderFooter.prototype =
// Запускаем пересчет
if ( hdrftr_Footer === this.Type )
{
History.Add( this, { Type : historyitem_HdrFtr_BoundY2, Old : this.BoundY2, New : Page_Height - Y_Default_Footer } );
if ( true !== bNoSaveHistory )
{
History.Add( this, { Type : historyitem_HdrFtr_BoundY2, Old : this.BoundY2, New : Page_Height - Y_Default_Footer } );
}
this.BoundY2 = Page_Height - Y_Default_Footer;
}
......@@ -2010,29 +2014,29 @@ CHeaderFooterController.prototype =
return -1;
},
UpdateMargins : function(Index, bNoRecalc)
UpdateMargins : function(Index, bNoRecalc, bNoSaveHistory)
{
var SectHdrFtr = this.Content[Index];
var Headers = SectHdrFtr.Header;
var Footers = SectHdrFtr.Footer;
if ( Headers.First != Headers.Odd && Headers.First != Headers.Even && null != Headers.First )
Headers.First.UpdateMargins(bNoRecalc);
Headers.First.UpdateMargins(bNoRecalc, bNoSaveHistory);
if ( Headers.Even != Headers.Odd && null != Headers.Even )
Headers.Even.UpdateMargins(bNoRecalc);
Headers.Even.UpdateMargins(bNoRecalc, bNoSaveHistory);
if ( null != Headers.Odd )
Headers.Odd.UpdateMargins(bNoRecalc);
Headers.Odd.UpdateMargins(bNoRecalc, bNoSaveHistory);
if ( Footers.First != Footers.Odd && Footers.First != Footers.Even && null != Footers.First )
Footers.First.UpdateMargins(bNoRecalc);
Footers.First.UpdateMargins(bNoRecalc, bNoSaveHistory);
if ( Footers.Even != Footers.Odd && null != Footers.Even )
Footers.Even.UpdateMargins(bNoRecalc);
Footers.Even.UpdateMargins(bNoRecalc, bNoSaveHistory);
if ( null != Footers.Odd )
Footers.Odd.UpdateMargins(bNoRecalc);
Footers.Odd.UpdateMargins(bNoRecalc, bNoSaveHistory);
},
......
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