Features/ChainedTextBoxesDraw

    From The Document Foundation Wiki


    This page describes the inner mechanics of text chaining among boxes in Draw.

    Preliminaries

    The goal of this feature is to enable the following behavior: if text in a box gets past the limits of the box's shape The general idea is to allow text boxes with text

    Current implementation status and missing features

    - detection of overflow at paragraph level (TODO: say more on what "paragraph-level" means) - paragraph level chaining when exiting edit mode

    Missing features: - resuming text in edit mode

    Information flow

    The overflow event

    Page overflow is determined by simply checking whether the current page overflow

    The "breaking" point

    ImpEditEngine knows which paragraph is the first that overflows (mnOverflowingPara). This property in itself does not determine whether chaining should occur, only where.

    In Edit Mode:

    In ImpEditEngine::FormatDoc:

    If there is a paragraph potentially modifying (XXX: do I check it is only increasing?) the box’s size, the latter’s index is saved.

    Where is mnOverflowingPara cleared?

    Intuitively it should be cleared after it is used when we get out of edit mode. Thus currently in SdrTextBox::EndTextEdit. This property should be cleared whether used or not (in the latter case simply no chaining was necessary in the first place)

    Where is mnOverflowingPara used by svx?

    Short answer: in SdrTextObj::EndEditMode... This property is used (indirectly, from Outliner) to pass information [XXX: finish sentence]


    When in