Commit 10f2c277 authored by Ilya Kirillov's avatar Ilya Kirillov

Исправлен баг с расчетом автофигур в колонтитуле.

parent 72a161a9
...@@ -323,13 +323,7 @@ CHeaderFooter.prototype = ...@@ -323,13 +323,7 @@ CHeaderFooter.prototype =
Draw : function(nPageIndex, pGraphics) Draw : function(nPageIndex, pGraphics)
{ {
//var OldPage = this.RecalcInfo.CurPage;
//
//this.Set_Page( nPageIndex );
this.Content.Draw( nPageIndex, pGraphics ); this.Content.Draw( nPageIndex, pGraphics );
//if ( -1 !== OldPage )
// this.Set_Page( OldPage );
}, },
// Пришло сообщение о том, что контент изменился и пересчитался // Пришло сообщение о том, что контент изменился и пересчитался
...@@ -1484,7 +1478,8 @@ CHeaderFooterController.prototype = ...@@ -1484,7 +1478,8 @@ CHeaderFooterController.prototype =
this.private_UpdateDrawingVerticalPositions(HeaderDrawings, PageLimits.Y, PageLimits.YLimit); this.private_UpdateDrawingVerticalPositions(HeaderDrawings, PageLimits.Y, PageLimits.YLimit);
this.private_UpdateDrawingVerticalPositions(FooterDrawings, PageLimits.Y, PageLimits.YLimit); this.private_UpdateDrawingVerticalPositions(FooterDrawings, PageLimits.Y, PageLimits.YLimit);
this.LogicDocument.DrawingObjects.mergeDrawings(PageIndex, HeaderDrawings, HeaderTables, FooterDrawings, FooterTables); this.private_MergeFlowObjectsFromHeaderAndFooter(PageIndex, HeaderDrawings, HeaderTables, FooterDrawings, FooterTables);
if ( true === bRecalcHeader || true === bRecalcFooter ) if ( true === bRecalcHeader || true === bRecalcFooter )
return true; return true;
...@@ -1503,31 +1498,72 @@ CHeaderFooterController.prototype = ...@@ -1503,31 +1498,72 @@ CHeaderFooterController.prototype =
} }
}, },
private_MergeFlowObjectsFromHeaderAndFooter : function(nPageIndex, arrHeaderDrawings, arrHeaderTables, arrFooterDrawings, arrFooterTables)
{
var oHeader = this.Pages[nPageIndex].Header;
var oFooter = this.Pages[nPageIndex].Footer;
var nOldHeaderCurPage = null;
var nOldFooterCurPage = null;
if (oHeader)
{
oHeader.Set_Page(nPageIndex);
nOldHeaderCurPage = oHeader.RecalcInfo.CurPage;
}
if (oFooter)
{
oFooter.Set_Page(nPageIndex);
nOldFooterCurPage = oFooter.RecalcInfo.CurPage;
}
this.LogicDocument.DrawingObjects.mergeDrawings(nPageIndex, arrHeaderDrawings, arrHeaderTables, arrFooterDrawings, arrFooterTables);
if (null !== nOldHeaderCurPage)
oHeader.Set_Page(nOldHeaderCurPage);
if (null !== nOldFooterCurPage)
oFooter.Set_Page(nOldFooterCurPage);
},
// Отрисовка колонтитулов на данной странице // Отрисовка колонтитулов на данной странице
Draw : function(nPageIndex, pGraphics) Draw : function(nPageIndex, pGraphics)
{ {
var oHeader = this.Pages[nPageIndex].Header;
var oFooter = this.Pages[nPageIndex].Footer;
var Header = this.Pages[nPageIndex].Header; var nOldHeaderCurPage = null;
var Footer = this.Pages[nPageIndex].Footer; var nOldFooterCurPage = null;
var OldPageHdr = Header && Header.RecalcInfo.CurPage; if (oHeader)
var OldPageFtr = Footer && Footer.RecalcInfo.CurPage; {
oHeader.Set_Page(nPageIndex);
nOldHeaderCurPage = oHeader.RecalcInfo.CurPage;
}
Header && Header.Set_Page(nPageIndex); if (oFooter)
Footer && Footer.Set_Page(nPageIndex); {
this.LogicDocument.DrawingObjects.drawBehindDocHdrFtr( nPageIndex, pGraphics ); oFooter.Set_Page(nPageIndex);
this.LogicDocument.DrawingObjects.drawWrappingObjectsHdrFtr( nPageIndex, pGraphics ); nOldFooterCurPage = oFooter.RecalcInfo.CurPage;
}
if ( null !== Header ) this.LogicDocument.DrawingObjects.drawBehindDocHdrFtr(nPageIndex, pGraphics);
Header.Draw( nPageIndex, pGraphics ); this.LogicDocument.DrawingObjects.drawWrappingObjectsHdrFtr(nPageIndex, pGraphics);
if ( null !== Footer ) if (oHeader)
Footer.Draw( nPageIndex, pGraphics ); oHeader.Draw(nPageIndex, pGraphics);
if (oFooter)
oFooter.Draw(nPageIndex, pGraphics);
this.LogicDocument.DrawingObjects.drawBeforeObjectsHdrFtr(nPageIndex, pGraphics);
this.LogicDocument.DrawingObjects.drawBeforeObjectsHdrFtr( nPageIndex, pGraphics ); if (null !== nOldHeaderCurPage)
oHeader.Set_Page(nOldHeaderCurPage);
Header && Header.Set_Page(OldPageHdr); if (null !== nOldFooterCurPage)
Footer && Footer.Set_Page(OldPageFtr); oFooter.Set_Page(nOldFooterCurPage);
}, },
CheckRange : function(X0, Y0, X1, Y1, _Y0, _Y1, X_lf, X_rf, PageIndex, bMathWrap) CheckRange : function(X0, Y0, X1, Y1, _Y0, _Y1, X_lf, X_rf, PageIndex, bMathWrap)
......
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