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

            Bug ID: 174190
           Summary: PDF/UA: a merged cell in a Calc tagged table has no
                    ColSpan/RowSpan, 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 209388
  --> https://bugs.documentfoundation.org/attachment.cgi?id=209388&action=edit
calc-merged.fods: the sheet, B2:C2 merged

Calc's tagged PDF export writes a sheet as Table / TR / TD. A merged cell gives
one TD with no ColSpan or RowSpan attribute, 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 a merged cell inside its data fails PDF/UA-1.

Steps to reproduce:
1. Open the attached calc-merged.fods: a 3x3 table where B2:C2 is merged.
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; the TD of the merged cell has no
ColSpan.
- veraPDF fails 7.2-43 ("Table rows shall have the same number of columns
(taking into account column spans)").
calc-merged.master-output.pdf is the output of master.

Expected:
- A merged cell is one TD (or TH) with /A << /O /Table /ColSpan n /RowSpan m
>>; the cells it covers get no element.
ISO 32000-1, 14.8.5.7 (RowSpan, ColSpan); ISO 14289-1 (PDF/UA-1), 7.5.

Code pointer:
lcl_OpenCellElement() in sc/source/ui/view/output2.cxx opens the TD or TH and
sets only Scope. ScMergeAttr (ATTR_MERGE) holds the spans where the cell is
opened.

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

Attachments:
- calc-merged.fods: the sheet
- calc-merged.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