Skip to content

feat(word): add visual pageless view mode#53

Draft
juliusknorr wants to merge 2 commits into
mainfrom
worktree-pageless-view
Draft

feat(word): add visual pageless view mode#53
juliusknorr wants to merge 2 commits into
mainfrom
worktree-pageless-view

Conversation

@juliusknorr

@juliusknorr juliusknorr commented Jun 17, 2026

Copy link
Copy Markdown
Member

Pageless view for the Word editor (issue #2553).

Adds a per-view "pageless" flag that renders a multi-page document as one continuous sheet, without changing internal pagination. Mirrors the existing Multiple Pages view mode.

Changes

  • WordControl gains isPagelessMode plus getPageGapVer()/getPageGapHor() accessors that return 0 when pageless; the inter-page gap reads in CalculateDocumentSize/OnCalculatePagesPlace now go through them, collapsing the grey gaps.
  • CPage.Draw skips the per-page outline (strokeColor = undefined) when pageless.
  • Public API SetPagelessMode/GetPagelessMode (modelled on Set/GetMultipageViewMode); the setter clears the page cache and re-fires layout so the outline/gap change repaints.

Notes

  • View preference only — does not modify the document or affect collaborators.
  • The UI toggle lives in the web-apps PR; this PR is the engine half.
True continuous reflow (future, out of scope here)

Documented now so Phase 1 doesn't paint us into a corner. The engine already has a pluggable layout architecture that is the right insertion point:

  • CDocumentLayoutBase (word/Editor/Layout/Base.js) defines GetPageContentFrame / GetColumnContentFrame, whose YLimit is what forces content onto the next page.
    • Concrete layouts CDocumentPrintView and CDocumentReadView (Layout/PrintView.js, Layout/ReadView.js) are registered in CDocument at Document.js:1207-1212 (this.Layouts = {Print, Read}; this.Layout = this.Layouts.Print;) and swapped via SetDocumentReadMode (Document.js:17049`).

Phase 2 would add CDocumentPagelessView returning a near-infinite YLimit (single ever-growing page, no page breaks), register it in this.Layouts, add a SetDocumentPagelessModeswap method followingSetDocumentReadMode, and decide header/footer and section-break handling. The Phase-1 API method (SetPagelessMode`) can later route to this layout swap so the UI contract stays stable.

Deferred background colour would extend getPageBackgroundColor (api.js:14248-14254) plus a colour-picker control in ViewTab.

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Julius Knorr <jus@bitgrid.net>
@juliusknorr juliusknorr changed the title feat(word): add visual pageless view mode (#2553) feat(word): add visual pageless view mode Jun 17, 2026
Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant