commit: Footnotes placement perfect :-) was (Almost work).

From: Martin Sevior (msevior@physics.unimelb.edu.au)
Date: Thu Jan 16 2003 - 13:54:13 EST

  • Next message: Dom Lachowicz: "Re: commit: further bidi fixes"

    On Thu, 16 Jan 2003, Tomas Frydrych wrote:

    >
    >
    > > The corner case of inserting footnote into the last line doesn't quite
    > > work yet. I suspect a rounding erreo.
    >
    > Martin, it might be some consolation to you that MS is not able to
    > handle this case ever since the 32 verison of Word came out, in
    > spite of numerous complains from the academia (I recall that
    > Edinburgh University had an entire webpage dedicated to
    > workaround for this nuisance). I am sure, though, we can do better.
    >

    He He :-)

    This commit gives us perfect behaviour. The last line gets pushed onto the
    next page along with it's footnote if you insert a footnote there. The
    algorithim is very simple and appears nicely robust. It works perfectly
    for multiple columns per page.

    The algorthimn works by simply subtracting the height of the footnotes
    from the height available for columns during the column breaking. If the
    footnote is not on the same page as the current column it's height is
    added to the height of the line containing the footnote - so the line
    containing footnote reference's is efectively it's own height plus the
    footnote(s) height.

    During the procedure where containers are inserted into columns footnotes
    are paced on the same page as the line containing the reference.

    It all works nicely :-)

    Next I'll do some simple corner case detection of back-space or forward
    deletion of a footnote reference. Then RTF import/export.

    On the down-side I'm currently getting a number of these asserts followed
    by crashes during import and zoom changes...

    **** (1) Assert ****
    **** (1) (!m_pLastRunToKeep) || (pLine->getLastRun() == m_pLastRunToKeep)
    at ../../../../../abi-unstable/src/text/fmt/xp/fb_LineBreaker.cpp:622 ****
    **** (1) Continue ? (y/n) [y] :

    As is David Chart. I don't really understand what is causing these and I
    suspect they're related to Jesper Skov's recent work. Does anybody else
    have an idea of what causes these?

    Anyway, enjoy footnotes :-)

    Cheers

    Martin

    CVS:
    ----------------------------------------------------------------------
    CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
    CVS:
    CVS: Committing in .
    CVS:
    CVS: Modified Files:
    CVS: fmt/xp/fb_ColumnBreaker.cpp fmt/xp/fb_ColumnBreaker.h
    CVS: fmt/xp/fp_FootnoteContainer.cpp fmt/xp/fp_Line.cpp
    CVS: fmt/xp/fp_Page.cpp ptbl/xp/pt_PT_DeleteSpan.cpp
    CVS:
    ----------------------------------------------------------------------
    Footnotes placement algorithim perfect :-)



    This archive was generated by hypermail 2.1.4 : Thu Jan 16 2003 - 13:56:55 EST