Skip to content

3.0: a table cell holds block elements, laid out by the paragraph engine #705

Backlog

Description

@Tim81

Why

A table cell has its own text engine. It wraps a string (TableRenderer.WordWrapLines) or, since #692, runs, with
rules kept equal to a paragraph's by hand (#679 for line ends, #590 for run boundaries). The two drift: a cell takes
one line height for the whole cell from its largest run, where a paragraph sets each line's baseline, and every paragraph feature (page references, language per run, keep rules, tab stops) has to
be built a second time for cells or is missing there.

Proposal

A cell holds block elements (paragraphs, lists, images, nested tables where the spec allows) and lays them out with
the same renderers the document uses. Cell(string) and Cell(runs) become shorthands for a cell holding one
paragraph. The cell's own wrap, measure cache and continuation bound go; the table asks its children, as #696's
placement model would.

Acceptance

TableRenderer has no word-wrap code of its own; a paragraph in a cell and the same paragraph on the page give the
same lines at the same width; features added to paragraphs work in cells without cell-specific code.

Related: #692, #679, #590, #696, #688, #689.

Activity

  1. added
    area/layout
    type/tracking
    needs-design
    on Nov 26, 2026
  2. Tim81 commented on Nov 27, 2026

    @Tim81
    OwnerAuthor

    Seen while building a sample: a cell built from runs, Cell(IEnumerable<TextRun>) (#698), takes each run's own style and does
    not fall back to the cell's style or the table's DefaultCellStyle, so every run carries a full style. When a cell
    holds paragraphs here, the style inheritance from table to cell to paragraph to run should be stated once and tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/layoutneeds-designtype/tracking

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions