Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

xlsx and xls: read the print setup, so a printed sheet fits its paper

Đang mở
#1,214 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

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:

  1. pageSetup and pageMargins are not read (ooxml_spreadsheet_document.cpp, // TODO pageSetup is not read). paperSize is an enumeration (ECMA-376 Part 1, 18.3.1.63), orientation turns it, and the margins are in inches. A paperWidth and paperHeight with units can replace the enumeration.
  2. A column width is in characters (ch), and css_pixels gives no answer for ch. Excel converts with the maximum digit width of the default font (7 px for Calibri 11).
  3. A column with no <col> has no width, so the sum stops. sheetFormatPr/@defaultColWidth or @baseColWidth gives 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.

Ngôn ngữ chính
C++
Star
41
Fork
10
Merge trung bình
10 giờ 30 phút
Pull request đã merge (30 ngày)
342

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của opendocument-app/OpenDocument.core

Tất cả issue của opendocument-app/OpenDocument.core

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.