Repository navigation
Built-in engines W23: Word floating tables, UYAP UDF, RTF → TXT, Excel short date - #1693
Merged
Merged
Conversation
A Word table with w:tblpPr floats: Word places it from the top of the paragraph after it (vertAnchor text) or against the margins or the page, and the text after it goes around it. Filee laid it out in the flow, so the report's figure captions (floating one-cell tables) took their own room and the empty paragraphs after them went under them instead of beside them. The DOCX reader reads tblpPr into HTable.Float (an HAnchor: horzAnchor / vertAnchor, tblpX / tblpY or tblpXSpec / tblpYSpec) and FloatDistance (the From-text distances); only the layout engine uses them. The page composer places such a table like a picture wrapped square: anchored to the next paragraph (laid out ahead, so it keeps its list number), never above the text before it, moved to the next column with that paragraph when it would run past the bottom, and drawn with the page's floating objects. A table taller than a column stays in the flow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tables read from other formats get the 5 mm the HWPX writer leaves under a table. Word puts the next paragraph right under its tables, so a Word table (one with Word's column sizing) now gets none; every table of the report took 14 pt more than in Word. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A line holding an inline picture in a paragraph with "multiple" line spacing was the picture's height times the multiple: a 330 pt figure on 1.1 lines left 33 pt of empty line, and the report's flowchart no longer fitted on its page. Word spaces only the line's text: a picture on a 1.5 line with 12 pt text is its height and half the text's line, as Word's own PDF of #356 has it. Equations are spaced like text, as before; lines without pictures are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Word puts the larger of a paragraph's space after and the next one's space before between them, not their sum, unless the settings turn its HTML paragraph spacing off (w:doNotUseHTMLParagraphAutoSpacing). The headings on page 3 of #1152 have 6 pt after and 12 pt before: Word's PDF has 12 pt between them, Filee had 18. The reader now cuts the space after by the next paragraph's space before, as it drops contextual spacing; a paragraph that starts a page or column keeps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UYAP Document Editor files (.udf, Turkish courts and lawyers) are a ZIP with one content.xml: the text in a CDATA block and paragraphs whose runs point into it by offset. The new built-in UYAP reader turns them into the document model, so the Filee renderer writes PDF and the writers DOCX, ODT, HWPX, TXT and the rest. Fonts, sizes, bold/italic/underline, colours, Swing alignment, indents, spacing, tab sets, tables, Base64 pictures, page breaks, headers and footers and the page setup are read. Lines are as high as Java makes them and text has no kerning, so the reporter's petition breaks onto the same three pages as UYAP's own PDF. ".udf" is also a Universal Disk Format disc image. The content decides: a ZIP whose content.xml has a <template> root is UYAP. A disc given to a document route is refused with error.udf_not_uyap (all locales), which points to Extract; the archive engine's new udf -> folder edge unpacks a disc as an ISO and a UYAP file as its ZIP. The package is read within DocumentLimits (part and total sizes counted while unpacking, inflate ratio, no DTD, depth and element limits). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1204) Without LibreOffice the built-in RTF → TXT went through the Filee renderer's PDF and the PDF's text (or the HWPX writer), which wrapped long lines, joined lines, dropped leading spaces, tabs and empty paragraphs and put an empty line between all paragraphs. RTF → TXT now has a direct built-in edge in the HWP text engine: RtfReader's document written by PlainTextWriter.WriteLines, as a word processor saves plain text. LibreOffice keeps the conversion while it is installed; RTF → DOCX, PDF and the other outputs are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1315) Excel shows format 14 in the short date of the PC's regional format (11/8/2026 in the US, 2026/11/8 in China); Filee always used yyyy-mm-dd, one character more, so the reporter's dates printed as ####. The XLSX and XLS readers now take the current culture's short date pattern as the Excel code, falling back to yyyy-mm-dd for other calendars and patterns with names or eras. Other built-in formats are unchanged. Tests that check format 14 run in en-US. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Built-in engines wave W23: Word floating tables and paragraph spacing, UYAP UDF documents, RTF → TXT line by line, and Excel's short date.
Word floating tables and spacing (#1194, #1152)
w:tblPr/w:tblpPrtables are read as floating (HTable.Float,FloatDistance) and placed like square-wrapped pictures: text-anchored ones below the next paragraph's top bytblpY, page/margin ones fixed to the page; the text after them wraps beside. A table taller than the column stays in the flow.w:doNotUseHTMLParagraphAutoSpacingkeeps the sum.UYAP UDF documents → PDF, DOCX and the other document writers (#1338)
UyapReaderreads.udf(a ZIP with onecontent.xml,<template>root) into the document model: text runs with fonts, sizes, bold/italic/underline, colours, alignment, indents, tabs, tables, pictures, page size and margins. The renderer draws the PDF; every existing document writer follows.content.xml+<template>is UYAP. A.udfthat isn't (a UDF disk image) is refused on document routes witherror.udf_not_uyap(23 locales) and unpacks through the disk-image path.DocumentPackage/DocumentLimits,SafeXml(no DTD; onlyCheckCharactersoff because UYAP writes control characters in CDATA),DocumentBudget, picture size and count caps, table nesting cap.udfon their documents donut (custom claims stay put).RTF → TXT line by line (#1204, #1416)
rtf → txtedge now writes one line per paragraph,\lineas a newline, empty paragraphs as empty lines, spaces and tabs as written (PlainTextWriter.WriteLines). LibreOffice still takes it when installed.Excel's short date, number format 14 (#1315)
m/d/yyyy, zh-CNyyyy/m/d); non-Gregorian or named patterns keepyyyy-mm-dd. [Bug]:excel转pdf的图片问题 #1315's date cells fit on zh-CN and en-US instead of####.Checks
ReportedCasesTests(+5),UyapTests(10),UyapSettingsTests(2),RtfToBuiltInTextTests(3),SheetPrintTests(+2), a renderer route test. Inputs built in code.Follow-ups went on the board.
🤖 Generated with Claude Code