public static bool LayoutFootnote(Page p, FootnoteBody fb, Area area) { try { BodyAreaContainer bac = p.getBody(); AreaContainer footArea = bac.getFootnoteReferenceArea(); footArea.setIDReferences(bac.getIDReferences()); int basePos = footArea.GetCurrentYPosition() - footArea.GetHeight(); int oldHeight = footArea.GetHeight(); if (area != null) { footArea.setMaxHeight(area.getMaxHeight() - area.GetHeight() + footArea.GetHeight()); } else { footArea.setMaxHeight(bac.getMaxHeight() + footArea.GetHeight()); } Status status = fb.Layout(footArea); if (status.isIncomplete()) { return(false); } else { if (area != null) { area.setMaxHeight(area.getMaxHeight() - footArea.GetHeight() + oldHeight); } if (bac.getFootnoteState() == 0) { Area ar = bac.getMainReferenceArea(); DecreaseMaxHeight(ar, footArea.GetHeight() - oldHeight); footArea.setYPosition(basePos + footArea.GetHeight()); } } } catch (FonetException) { return(false); } return(true); }
public static bool LayoutFootnote(Page p, FootnoteBody fb, Area area) { try { BodyAreaContainer bac = p.getBody(); AreaContainer footArea = bac.getFootnoteReferenceArea(); footArea.setIDReferences(bac.getIDReferences()); int basePos = footArea.GetCurrentYPosition() - footArea.GetHeight(); int oldHeight = footArea.GetHeight(); if (area != null) { footArea.setMaxHeight(area.getMaxHeight() - area.GetHeight() + footArea.GetHeight()); } else { footArea.setMaxHeight(bac.getMaxHeight() + footArea.GetHeight()); } Status status = fb.Layout(footArea); if (status.isIncomplete()) { return false; } else { if (area != null) { area.setMaxHeight(area.getMaxHeight() - footArea.GetHeight() + oldHeight); } if (bac.getFootnoteState() == 0) { Area ar = bac.getMainReferenceArea(); DecreaseMaxHeight(ar, footArea.GetHeight() - oldHeight); footArea.setYPosition(basePos + footArea.GetHeight()); } } } catch (FonetException) { return false; } return true; }
public void addPendingFootnote(FootnoteBody fb) { if (footnotes == null) { footnotes = new ArrayList(); } footnotes.Add(fb); }
public void addFootnote(FootnoteBody fb) { if (pendingFootnotes == null) { pendingFootnotes = new ArrayList(); } pendingFootnotes.Add(fb); }