Commit 04a1c2e0 authored by Ilya Kirillov's avatar Ilya Kirillov

Reworked some functions in Footnotes based on columns

parent 67431313
...@@ -1053,7 +1053,8 @@ CDocumentRecalcInfo.prototype = ...@@ -1053,7 +1053,8 @@ CDocumentRecalcInfo.prototype =
Set_FootnoteReference : function(oFootnoteReference, nPageAbs, nColumnAbs) Set_FootnoteReference : function(oFootnoteReference, nPageAbs, nColumnAbs)
{ {
this.FootnoteReference = oFootnoteReference; this.FootnoteReference = oFootnoteReference;
this.FlowObjectPage = nPageAbs; this.FootnotePage = nPageAbs;
this.FootnoteColumn = nColumnAbs;
}, },
Check_FootnoteReference : function(oFootnoteReference) Check_FootnoteReference : function(oFootnoteReference)
...@@ -2867,7 +2868,7 @@ CDocument.prototype.private_RecalculateShiftFootnotes = function(nPageAbs, nColu ...@@ -2867,7 +2868,7 @@ CDocument.prototype.private_RecalculateShiftFootnotes = function(nPageAbs, nColu
{ {
var dFootnotesHeight = this.Footnotes.GetHeight(nPageAbs, nColumnAbs); var dFootnotesHeight = this.Footnotes.GetHeight(nPageAbs, nColumnAbs);
var oPageMetrics = this.Get_PageContentStartPos(nPageAbs); var oPageMetrics = this.Get_PageContentStartPos(nPageAbs);
this.Footnotes.Shift(nPageAbs, 0, oPageMetrics.YLimit - dFootnotesHeight); this.Footnotes.Shift(nPageAbs, nColumnAbs, 0, oPageMetrics.YLimit - dFootnotesHeight);
}; };
CDocument.prototype.private_RecalculateFlowTable = function(RecalcInfo) CDocument.prototype.private_RecalculateFlowTable = function(RecalcInfo)
{ {
......
...@@ -45,11 +45,13 @@ function CFootEndnote(DocumentController) ...@@ -45,11 +45,13 @@ function CFootEndnote(DocumentController)
AscCommon.extendClass(CFootEndnote, CDocumentContent); AscCommon.extendClass(CFootEndnote, CDocumentContent);
CFootEndnote.prototype.GetRelaitivePageIndex = function(PageAbs) CFootEndnote.prototype.GetRelaitivePageIndex = function(nPageAbs, nColumnAbs)
{ {
// TODO: Переделать с учетом колонок
var StartPageAbs = this.Get_StartPage_Absolute(); var StartPageAbs = this.Get_StartPage_Absolute();
var PagesCount = this.Get_PagesCount(); var PagesCount = this.Get_PagesCount();
return Math.max(0, Math.min(PagesCount - 1, PageAbs - StartPageAbs)); return Math.max(0, Math.min(PagesCount - 1, nPageAbs - StartPageAbs));
}; };
CFootEndnote.prototype.Write_ToBinary2 = function(Writer) CFootEndnote.prototype.Write_ToBinary2 = function(Writer)
{ {
......
This diff is collapsed.
...@@ -1872,7 +1872,7 @@ Paragraph.prototype.private_RecalculateLineCheckFootnotes = function(CurLine, Cu ...@@ -1872,7 +1872,7 @@ Paragraph.prototype.private_RecalculateLineCheckFootnotes = function(CurLine, Cu
else else
{ {
// TODO: Реализовать // TODO: Реализовать
RecalcInfo.Set_PageBreaFlowObjectPageBreakBefore(true); RecalcInfo.Set_PageBreakBefore(true);
this.Parent.Footnotes.RemoveFootnoteFromPage(nPageAbs, nColumnAbs, oFootnote); this.Parent.Footnotes.RemoveFootnoteFromPage(nPageAbs, nColumnAbs, oFootnote);
PRS.RecalcResult = recalcresult_CurPage | recalcresultflags_Column | recalcresultflags_Footnotes; PRS.RecalcResult = recalcresult_CurPage | recalcresultflags_Column | recalcresultflags_Footnotes;
return false; return false;
......
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