https://bugs.documentfoundation.org/show_bug.cgi?id=174191

            Bug ID: 174191
           Summary: PDF/UA: an empty cell in a Calc tagged table gets no
                    TD, so its row has fewer columns (veraPDF 7.2-43)
           Product: LibreOffice
           Version: 27.2.0.0 alpha0+ master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: accessibility, filter:pdf
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]
            Blocks: 139007

Created attachment 209390
  --> https://bugs.documentfoundation.org/attachment.cgi?id=209390&action=edit
calc-empty-cell.fods: the sheet, B2 empty

Calc's tagged PDF export writes a sheet as Table / TR / TD, but a TD is opened
only when the text of a cell is drawn. An empty cell gets no TD at all, so its
row has fewer columns than the others, and a screen reader maps every following
cell of that row to the wrong column header. A sheet with an empty cell inside
its data fails PDF/UA-1.

Steps to reproduce:
1. Open the attached calc-empty-cell.fods: a 3x3 table where B2 is empty.
2. File > Export as PDF, with "Universal Accessibility (PDF/UA)" checked.
3. Check the PDF with veraPDF (PDF/UA-1), or look at the structure tree.

Actual:
- Rows 1 and 3 have 3 TD, row 2 has 2 TD: B2 is skipped.
- veraPDF fails 7.2-43 ("Table rows shall have the same number of columns
(taking into account column spans)").
calc-empty-cell.master-output.pdf is the output of master.

Expected:
- An empty cell inside the printed range gets an empty TD.
ISO 14289-1 (PDF/UA-1), 7.5.

Code pointer:
lcl_OpenCellElement() in sc/source/ui/view/output2.cxx opens the TD or TH. It
is called only from the text drawing paths (ScOutputData::DrawStrings,
ScOutputData::DrawEdit), so a cell without text never gets an element.

Reproduced on master eb31ae6c15b8 (2026-10-27), macOS; also on 26.8.1.1.

Attachments:
- calc-empty-cell.fods: the sheet
- calc-empty-cell.master-output.pdf: PDF/UA from master, fails 7.2-43


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=139007
[Bug 139007] [META] PDF accessibility
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to