mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-08 11:41:35 +00:00
A Word template (.dotx, .dotm, .dot) the platform hands the app, from a double-click in the file manager, the command line or the Finder, opened as itself: the window called it saved, AutoSave was on, and Ctrl+S wrote over the template. Word's default verb for a template makes a new, untitled document based on it. WordApp::open_from_platform sends a Word template to file.newFromTemplate and opens anything else as File > Open does; main.rs (also for a name that isn't valid Unicode) and the Apple Events handler use it. file.newFromTemplate reads the template as file.open reads a file (password, data, an empty file) and, with replaceBlank, takes an untouched blank document's place, so a launch shows one window. The Password box retries the command that asked for it, so a protected template still starts a new document. File > Open and drops still open a template itself. Claude-Session: https://claude.ai/code/session_01LvG6E1XTfHtZDbfYwfREhR Co-authored-by: Filip Strajnar <filip.strajnar@proton.me> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Martin Ball <martin.ball@ucscaregroup.co.uk>