Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen
#1,214 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
cpp
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
C++
Sterne
41
Forks
10
Ø Merge
10 Std. 30 Min.
Gemergte PRs (30 T.)
342

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus opendocument-app/OpenDocument.core

Alle Issues in opendocument-app/OpenDocument.core

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.