From 0bc96b8805f2cfa2278729a9f3e56a350ddd69ad Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 30 Nov 2022 15:06:02 +0100 Subject: tdf#135192 drawinglayer,svx: PDF/UA export: also tag TH for SdrTableObj There isn't really an indication of anything being a header row, but the table template application has a flag to apply special formatting to the first row, so let's use that as indication that it's a header row Change-Id: Ic361c84d9a1a4e91109d6f9d2cd626c9633b311f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143500 Tested-by: Jenkins Reviewed-by: Michael Stahl --- svx/source/table/viewcontactoftableobj.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'svx/source/table') diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index df271a3e2404..da11d1741789 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -354,9 +354,15 @@ namespace sdr::contact } if (pPage) { + // heuristic: if there's a special formatting on + // first row, assume that it's a header row + auto const eType( + aCellPos.mnRow == 0 && rTableObj.getTableStyleSettings().mbUseFirstRow + ? vcl::PDFWriter::TableHeader + : vcl::PDFWriter::TableData); cell = drawinglayer::primitive2d::Primitive2DContainer { new drawinglayer::primitive2d::StructureTagPrimitive2D( - vcl::PDFWriter::TableData, + eType, pPage->IsMasterPage(), false, std::move(cell)) }; -- cgit