xlsx and xls: read the print setup, so a printed sheet fits its paper
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start in internal/html/document_element.cpp at sheet_print_fit, then read ooxml_spreadsheet_document.cpp and the existing Sheet::page_layout() path. Trace how XLSX page setup, margins, column widths and defaults are read, then compare the corresponding XLS records (SETUP, margin records, COLINFO, DEFCOLWIDTH). Done means XLSX and XLS print setup and effective column widths feed the fit calculation; pagination, print ranges and repeated title rows are out of scope.
由索引模型根据 Issue 内容生成。
描述
Split out of #816. For an ods sheet, #817, #820 and #1197 fixed the reported case: the ruler does not print, and translate_sheet writes --odr-print-fit from Sheet::page_layout(). For xlsx and xls, sheet_page_layout returns an empty layout, so a wide sheet still depends on the shrink heuristic of the browser.
Three gaps stop sheet_print_fit (internal/html/document_element.cpp) for xlsx:
pageSetupandpageMarginsare not read (ooxml_spreadsheet_document.cpp,// TODO pageSetup is not read).paperSizeis an enumeration (ECMA-376 Part 1, 18.3.1.63),orientationturns it, and the margins are in inches. ApaperWidthandpaperHeightwith units can replace the enumeration.- A column width is in characters (
ch), andcss_pixelsgives no answer forch. Excel converts with the maximum digit width of the default font (7 px for Calibri 11). - A column with no
<col>has no width, so the sum stops.sheetFormatPr/@defaultColWidthor@baseColWidthgives the default.
xls has the same shape (SETUP, the margin records, COLINFO and DEFCOLWIDTH).
Not in scope: pagination along the columns, print ranges, and repeated title rows. #816 lists these as the larger fix.
- 主要语言
- C++
- 星标
- 41
- 派生
- 10
- 平均合并
- 10 小时 30 分钟
- 30 天内合并 PR
- 342
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
opendocument-app/OpenDocument.core 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
opendocument-app/OpenDocument.core#1281 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 57/100
opendocument-app/OpenDocument.core#1280 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 42/100
opendocument-app/OpenDocument.core#1279 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
opendocument-app/OpenDocument.core#1278 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
opendocument-app/OpenDocument.core#1221 ·
维护者通常 1 天内回复
查看 opendocument-app/OpenDocument.core 的全部 Issue
相似的 Issue
-
good first issue invalid
难度 1/5 1 小时以内 新手友好度 72/100
DanielJerolm/gpcc#74 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
patrick-hudson/put.gd-desktop#808 ·
维护者通常 1 天内回复
-
DPI change is not fully handled in the cascading window on Windows可能已有人在做 @yukawa 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
dasher-project/Dasher-GTK#97 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复