include/vcl/pdfwriter.hxx
| 4
sw/source/core/text/EnhancedPDFExportHelper.cxx
| 2
vcl/qa/cppunit/pdfexport/data/TableTH_test_LibreOfficeWriter7.3.3_HeaderRow-HeadersInTopRow.fodt
| 560 ++++++++++
vcl/qa/cppunit/pdfexport/pdfexport.cxx
| 61 +
vcl/source/gdi/pdfwriter_impl.cxx
| 18
5 files changed, 643 insertions(+), 2 deletions(-)
New commits:
commit dfffe710d07f84f4152cf61ccd4a69279a26ff7c
Author: Michael Stahl <[email protected]>
AuthorDate: Fri Oct 28 21:46:54 2022 +0200
Commit: Michael Stahl <[email protected]>
CommitDate: Tue Nov 15 20:42:35 2022 +0100
tdf#149140 vcl,sw: PDF/UA export: add Scope attribute to table headers
Change-Id: If2402c824e637016e3c10860810501ec60732bc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142000
Tested-by: Jenkins
Reviewed-by: Michael Stahl <[email protected]>
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index ff0fa6066f71..5d06b1b05c96 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -138,7 +138,7 @@ public:
Placement, WritingMode, SpaceBefore, SpaceAfter, StartIndent,
EndIndent,
TextIndent, TextAlign, Width, Height, BlockAlign, InlineAlign,
LineHeight, BaselineShift, TextDecorationType, ListNumbering,
- RowSpan, ColSpan,
+ RowSpan, ColSpan, Scope,
// link destination is an artificial attribute that sets
// the link annotation ID of a Link element
@@ -172,6 +172,8 @@ public:
Normal,
// TextDecorationType
Underline, Overline, LineThrough,
+ // Scope
+ Row, Column, Both,
// ListNumbering
Disc, Circle, Square, Decimal, UpperRoman, LowerRoman, UpperAlpha,
LowerAlpha
};
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index fe67e955d37a..0f5f13c05966 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -538,6 +538,8 @@ void SwTaggedPDFHelper::SetAttributes(
vcl::PDFWriter::StructElement eType )
break;
case vcl::PDFWriter::TableHeader :
+
mpPDFExtOutDevData->SetStructureAttribute(vcl::PDFWriter::Scope,
vcl::PDFWriter::Column);
+ [[fallthrough]];
case vcl::PDFWriter::TableData :
bPlacement =
bWritingMode =
diff --git
a/vcl/qa/cppunit/pdfexport/data/TableTH_test_LibreOfficeWriter7.3.3_HeaderRow-HeadersInTopRow.fodt
b/vcl/qa/cppunit/pdfexport/data/TableTH_test_LibreOfficeWriter7.3.3_HeaderRow-HeadersInTopRow.fodt
new file mode 100644
index 000000000000..1b13a4fd5004
--- /dev/null
+++
b/vcl/qa/cppunit/pdfexport/data/TableTH_test_LibreOfficeWriter7.3.3_HeaderRow-HeadersInTopRow.fodt
@@ -0,0 +1,560 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/"
xmlns:grddl="http://www.w3.org/2003/g/data-view#"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:ooo="http://openoffice.org/2004/office"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ooow="http://openoffice.org/2004/writer"
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
xmlns:oooc="http://openoffice.org/2004/calc"
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"
xmlns:draw="urn:oasis:names:tc:open
document:xmlns:drawing:1.0"
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
xmlns:rpt="http://openoffice.org/2005/report"
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
xmlns:dom="http://www.w3.org/2001/xml-events"
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
xmlns:math="http://www.w3.org/1998/Math/MathML"
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:initial-creator>Christophe
Strobbe</meta:initial-creator><meta:creation-date>2022-05-14T18:39:40.868000000</meta:creation-date><meta:editing-cycles>18</meta:editing-cycles><meta:editing-duration>PT21M55S</meta:editing-duration><dc:title>Test
File for Simple Tables With or Without a Properly Marked Header
Row</dc:title><dc:date>2022-05-17T16:43:48.919000000</dc:date><dc:creator>Christophe
Strobbe</dc:creator><meta:generator>LibreOfficeDev/7.5.0.0.alpha0$Linux_X86_64
LibreOffice_project/54178896aba2ded7b57479dad435607b73dc89fa</meta:generator><meta:document-statistic
meta:table-count="3" meta:image-count="0" meta:object-count="0"
meta:page-count="1" meta:paragraph-count="28" meta:word-count="329"
meta:character-count="1794"
meta:non-whitespace-character-count="1502"/></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Sans" svg:font-family="'Liberation
Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation
Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="MS Gothic" svg:font-family="'MS Gothic'"
style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="OpenSymbol" svg:font-family="OpenSymbol"
style:font-charset="x-symbol"/>
+ <style:font-face style:name="Segoe UI" svg:font-family="'Segoe UI'"
style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"
style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4"
draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm"
draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm"
draw:start-line-spacing-vertical="0.283cm"
draw:end-line-spacing-horizontal="0.283cm"
draw:end-line-spacing-vertical="0.283cm" style:writing-mode="lr-tb"
style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha"
style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true"
style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en"
fo:country="GB" style:letter-kerning="true" style:font-name-asian="Segoe UI"
style:font-size-asian="10.5pt" style:language-asian="zxx"
style:country-asian="none" style:font-name-complex="Tahoma1"
style:font-size-complex="12pt" style:language-complex="zxx"
style:country-complex="none"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2"
fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha"
style:punctuation-wrap="hanging" style:line-break="strict"
style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true"
style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en"
fo:country="GB" style:letter-kerning="true" style:font-name-asian="Segoe UI"
style:font-size-asian="10.5pt" style:language-asian="zxx"
style:country-asian="none" style:font-name-complex="Tahoma1"
style:font-size-complex="12pt" style:language-complex="zxx"
style:country-complex="none" fo:hyphenate="false"
fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph"
style:class="text"/>
+ <style:style style:name="Heading" style:family="paragraph"
style:parent-style-name="Standard" style:next-style-name="Text_20_body"
style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm"
fo:margin-bottom="0.212cm" style:contextual-spacing="false"
fo:keep-with-next="always"/>
+ <style:text-properties style:font-name="Liberation Sans"
fo:font-family="'Liberation Sans'" style:font-family-generic="swiss"
style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="MS
Gothic" style:font-family-asian="'MS Gothic'"
style:font-family-generic-asian="system" style:font-pitch-asian="variable"
style:font-size-asian="14pt" style:font-name-complex="Tahoma1"
style:font-family-complex="Tahoma" style:font-family-generic-complex="system"
style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body"
style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm"
style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="Title" style:family="paragraph"
style:parent-style-name="Heading" style:next-style-name="Text_20_body"
style:class="chapter">
+ <style:paragraph-properties fo:text-align="center"
style:justify-single-word="false"/>
+ <style:text-properties fo:font-size="28pt" fo:font-weight="bold"
style:font-size-asian="28pt" style:font-weight-asian="bold"
style:font-size-complex="28pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table
Contents" style:family="paragraph" style:parent-style-name="Standard"
style:class="extra">
+ <style:paragraph-properties fo:orphans="0" fo:widows="0"
text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1"
style:family="paragraph" style:parent-style-name="Heading"
style:next-style-name="Text_20_body" style:default-outline-level="1"
style:class="text">
+ <style:paragraph-properties fo:margin-top="0.423cm"
fo:margin-bottom="0.212cm" style:contextual-spacing="false"/>
+ <style:text-properties fo:font-size="18pt" fo:font-weight="bold"
style:font-size-asian="18pt" style:font-weight-asian="bold"
style:font-size-complex="18pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Table_20_Heading" style:display-name="Table
Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents"
style:class="extra">
+ <style:paragraph-properties fo:text-align="center"
style:justify-single-word="false" text:number-lines="false"
text:line-number="0"/>
+ <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold"
style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_2" style:display-name="Heading 2"
style:family="paragraph" style:parent-style-name="Heading"
style:next-style-name="Text_20_body" style:default-outline-level="2"
style:class="text">
+ <style:paragraph-properties fo:margin-top="0.353cm"
fo:margin-bottom="0.212cm" style:contextual-spacing="false"/>
+ <style:text-properties fo:font-size="16pt" fo:font-weight="bold"
style:font-size-asian="16pt" style:font-weight-asian="bold"
style:font-size-complex="16pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Bullet_20_Symbols" style:display-name="Bullet
Symbols" style:family="text">
+ <style:text-properties style:font-name="OpenSymbol"
fo:font-family="OpenSymbol" style:font-charset="x-symbol"
style:font-name-asian="OpenSymbol" style:font-family-asian="OpenSymbol"
style:font-charset-asian="x-symbol" style:font-name-complex="OpenSymbol"
style:font-family-complex="OpenSymbol" style:font-charset-complex="x-symbol"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1"
text:start-value="0" text:footnotes-position="page"
text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i"
text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false"
text:offset="0.499cm" style:num-format="1" text:number-position="left"
text:increment="5"/>
+ <style:style style:name="Default_20_Style.1" style:display-name="Default
Style.1" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-top="0.51pt solid #000000" fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.2" style:display-name="Default
Style.2" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.3" style:display-name="Default
Style.3" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.4" style:display-name="Default
Style.4" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-right="0.51pt solid #000000" fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.5" style:display-name="Default
Style.5" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.6" style:display-name="Default
Style.6" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.7" style:display-name="Default
Style.7" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.8" style:display-name="Default
Style.8" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.9" style:display-name="Default
Style.9" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.10" style:display-name="Default
Style.10" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-right="0.51pt solid #000000" fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.11" style:display-name="Default
Style.11" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-top="0.51pt solid #000000" fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.12" style:display-name="Default
Style.12" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-right="0.51pt solid #000000" fo:border-top="0.51pt solid #000000"
fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.13" style:display-name="Default
Style.13" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.14" style:display-name="Default
Style.14" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-right="0.51pt solid #000000" fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.15" style:display-name="Default
Style.15" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-top="0.51pt solid #000000" fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Default_20_Style.16" style:display-name="Default
Style.16" style:family="table-cell">
+ <style:table-cell-properties fo:border-left="0.51pt solid #000000"
fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <table:table-template table:name="Default Style"
table:first-row-end-column="row" table:first-row-start-column="row"
table:last-row-end-column="row" table:last-row-start-column="row">
+ <table:first-row table:style-name="Default_20_Style.1"/>
+ <table:last-row table:style-name="Default_20_Style.2"/>
+ <table:first-column table:style-name="Default_20_Style.3"/>
+ <table:last-column table:style-name="Default_20_Style.4"/>
+ <table:body table:style-name="Default_20_Style.9"/>
+ <table:even-rows table:style-name="Default_20_Style.5"/>
+ <table:odd-rows table:style-name="Default_20_Style.6"/>
+ <table:even-columns table:style-name="Default_20_Style.7"/>
+ <table:odd-columns table:style-name="Default_20_Style.8"/>
+ <table:background table:style-name="Default_20_Style.10"/>
+ </table:table-template>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="17cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="5.667cm"
style:rel-column-width="21845*"/>
+ </style:style>
+ <style:style style:name="Table1.1" style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border-left="0.5pt solid #000000"
fo:border-right="none" fo:border-top="0.5pt solid #000000"
fo:border-bottom="0.5pt solid #000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table1.C1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border="0.5pt solid #000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table1.A2" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border-left="0.5pt solid #000000"
fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid
#000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table1.C2" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border-left="0.5pt solid #000000"
fo:border-right="0.5pt solid #000000" fo:border-top="none"
fo:border-bottom="0.5pt solid #000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:rel-column-width="21845*"/>
+ </style:style>
+ <style:style style:name="Table2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border-left="0.5pt solid #000000"
fo:border-right="none" fo:border-top="0.5pt solid #000000"
fo:border-bottom="0.5pt solid #000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table2.C1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border="0.5pt solid #000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table2.A2" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border-left="0.5pt solid #000000"
fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid
#000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table2.C2" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border-left="0.5pt solid #000000"
fo:border-right="0.5pt solid #000000" fo:border-top="none"
fo:border-bottom="0.5pt solid #000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table3" style:family="table">
+ <style:table-properties table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table3.A" style:family="table-column">
+ <style:table-column-properties style:rel-column-width="21845*"/>
+ </style:style>
+ <style:style style:name="Table3.A1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border-left="0.5pt solid #000000"
fo:border-right="none" fo:border-top="0.5pt solid #000000"
fo:border-bottom="0.5pt solid #000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table3.C1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border="0.5pt solid #000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table3.A2" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border-left="0.5pt solid #000000"
fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid
#000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Table3.C2" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent"
fo:padding="0.097cm" fo:border-left="0.5pt solid #000000"
fo:border-right="0.5pt solid #000000" fo:border-top="none"
fo:border-bottom="0.5pt solid #000000" style:writing-mode="page">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph"
style:parent-style-name="Table_20_Contents">
+ <style:paragraph-properties fo:text-align="start"
style:justify-single-word="false"/>
+ <style:text-properties fo:color="#000000" style:text-outline="false"
style:text-line-through-style="none" style:text-line-through-type="none"
style:font-name="Liberation Serif" fo:font-size="12pt" fo:font-style="normal"
fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="normal"
style:font-size-asian="12pt" style:font-style-asian="normal"
style:font-weight-asian="normal" style:font-size-complex="12pt"
style:font-style-complex="normal" style:font-weight-complex="normal"
style:text-overline-style="none" style:text-overline-color="font-color"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph"
style:parent-style-name="Standard" style:list-style-name="L1"/>
+ <style:style style:name="P6" style:family="paragraph"
style:parent-style-name="Standard" style:list-style-name="L2"/>
+ <style:style style:name="P7" style:family="paragraph"
style:parent-style-name="Standard" style:list-style-name="L3"/>
+ <text:list-style style:name="L1">
+ <text:list-level-style-bullet text:level="1"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm"
fo:margin-left="1.27cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="2"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm"
fo:margin-left="1.905cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="3"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm"
fo:margin-left="2.54cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="4"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm"
fo:margin-left="3.175cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="5"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm"
fo:margin-left="3.81cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="6"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm"
fo:margin-left="4.445cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="7"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm"
fo:margin-left="5.08cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="8"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm"
fo:margin-left="5.715cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="9"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm"
fo:margin-left="6.35cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="10"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm"
fo:margin-left="6.985cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ </text:list-style>
+ <text:list-style style:name="L2">
+ <text:list-level-style-bullet text:level="1"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm"
fo:margin-left="1.27cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="2"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm"
fo:margin-left="1.905cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="3"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm"
fo:margin-left="2.54cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="4"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm"
fo:margin-left="3.175cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="5"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm"
fo:margin-left="3.81cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="6"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm"
fo:margin-left="4.445cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="7"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm"
fo:margin-left="5.08cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="8"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm"
fo:margin-left="5.715cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="9"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm"
fo:margin-left="6.35cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="10"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm"
fo:margin-left="6.985cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ </text:list-style>
+ <text:list-style style:name="L3">
+ <text:list-level-style-bullet text:level="1"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm"
fo:margin-left="1.27cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="2"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm"
fo:margin-left="1.905cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="3"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm"
fo:margin-left="2.54cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="4"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm"
fo:margin-left="3.175cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="5"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm"
fo:margin-left="3.81cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="6"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm"
fo:margin-left="4.445cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="7"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm"
fo:margin-left="5.08cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="8"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="◦">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm"
fo:margin-left="5.715cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="9"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="▪">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm"
fo:margin-left="6.35cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ <text:list-level-style-bullet text:level="10"
text:style-name="Bullet_20_Symbols" style:num-suffix="." text:bullet-char="•">
+ <style:list-level-properties
text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm"
fo:margin-left="6.985cm"/>
+ </style:list-level-properties>
+ </text:list-level-style-bullet>
+ </text:list-style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm"
fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait"
fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm"
fo:margin-right="2cm" style:writing-mode="lr-tb"
style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20"
style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm"
style:layout-grid-mode="none" style:layout-grid-ruby-below="false"
style:layout-grid-print="false" style:layout-grid-display="false"
style:footnote-max-height="0cm">
+ <style:footnote-sep style:width="0.018cm"
style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm"
style:line-style="solid" style:adjustment="left" style:rel-width="25%"
style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"
draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0"
text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="Title"><text:title>Test File for Simple Tables
With or Without a Properly Marked Header Row</text:title></text:p>
+ <text:h text:style-name="Heading_20_1" text:outline-level="1">Table with
Header Row (Repeat First Row)</text:h>
+ <table:table table:name="Table1" table:style-name="Table1"
table:template-name="Default Style">
+ <table:table-column table:style-name="Table1.A"
table:number-columns-repeated="3"/>
+ <table:table-header-rows>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A1"
office:value-type="string">
+ <text:p text:style-name="P1"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A1"
office:value-type="string">
+ <text:p text:style-name="P1">Average starting score</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.C1"
office:value-type="string">
+ <text:p text:style-name="P1">Average improved score</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table-header-rows>
+ <table:table-row table:style-name="Table1.1">
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="P1">Images</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="P1">35%</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.C2" office:value-type="string">
+ <text:p text:style-name="P1">91%</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:list text:style-name="L1">
+ <text:list-item>
+ <text:p text:style-name="P4">This table is fine and the LibreOffice
Accessibility Checker does not flag it.</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P4">After exporting the file to PDF (PDF/UA),
the first row is tagged as a TR with tree TH elements. This is as
expected.</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P4">When the PDF file is checked with PAC2021,
there is an error for each TH element because the scope attribute is set to
“None” instead of “Column”. This is a bug in LibreOffice’s PDF export.</text:p>
+ </text:list-item>
+ </text:list>
+ <text:h text:style-name="Heading_20_1" text:outline-level="1">Table with
Table Heading Style in First Row (Repeat First Row not set)</text:h>
+ <table:table table:name="Table2" table:style-name="Table2"
table:template-name="Default Style">
+ <table:table-column table:style-name="Table2.A"
table:number-columns-repeated="3"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Heading"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Heading">Average starting
score</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.C1" office:value-type="string">
+ <text:p text:style-name="Table_20_Heading">Average improved
score</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table2.A2" office:value-type="string">
+ <text:p text:style-name="P1">Images</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.A2" office:value-type="string">
+ <text:p text:style-name="P1">35%</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.C2" office:value-type="string">
+ <text:p text:style-name="P1">91%</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:list text:style-name="L2">
+ <text:list-item>
+ <text:p text:style-name="P6">For this table, the LibreOffice
Accessibility Checker should warn the author that the first row should be
marked as a repeatable row in the Table Properties.</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P6">After exporting the file to PDF (PDF/UA),
the first row is tagged as a TR with tree TH elements. This is good, even
though it is not what was expected.</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P6">When the PDF file is checked with PAC2021,
there is an error for each TH element because the scope attribute is set to
“None” instead of “Column”. This is a bug in LibreOffice’s PDF export.</text:p>
+ </text:list-item>
+ </text:list>
+ <text:h text:style-name="Heading_20_1" text:outline-level="1">Table with
Heading 2 Style in First Row (Repeat First Row not set)</text:h>
+ <table:table table:name="Table3" table:style-name="Table3"
table:template-name="Default Style">
+ <table:table-column table:style-name="Table3.A"
table:number-columns-repeated="3"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_2" text:outline-level="2"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.A1" office:value-type="string">
+ <text:h text:style-name="Heading_20_2" text:outline-level="2">Average
starting score</text:h>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.C1" office:value-type="string">
+ <text:h text:style-name="Heading_20_2" text:outline-level="2">Average
improved score</text:h>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table3.A2" office:value-type="string">
+ <text:p text:style-name="P1">Images</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.A2" office:value-type="string">
+ <text:p text:style-name="P1">35%</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table3.C2" office:value-type="string">
+ <text:p text:style-name="P1">91%</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:list text:style-name="L3">
+ <text:list-item>
+ <text:p text:style-name="P7">Error flagged by the LibreOffice
Accessibility Checker: “Tables must not contain headings.” This error is
justified.</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P7">After exporting the file to PDF (PDF/UA),
the first row is tagged as a TR with tree TD elements, each of which contains a
H2 element. This is as expected: Heading x styles should not be used to mark
table headings.</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P7">When the PDF file is checked with PAC2021,
no errors are reported for this table. This is a shortcoming of PAC2021, which
is outside the scope of LibreOffice.</text:p>
+ </text:list-item>
+ </text:list>
+ </office:text>
+ </office:body>
+</office:document>
\ No newline at end of file
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index e5fd9c495859..4e081e0fba94 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -3128,6 +3128,67 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf139736)
CPPUNIT_ASSERT(nArtifacts >= 3);
}
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf149140)
+{
+ aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+
+ // Enable PDF/UA
+ uno::Sequence<beans::PropertyValue> aFilterData(
+ comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true)
} }));
+ aMediaDescriptor["FilterData"] <<= aFilterData;
+
saveAsPDF(u"TableTH_test_LibreOfficeWriter7.3.3_HeaderRow-HeadersInTopRow.fodt");
+
+ vcl::filter::PDFDocument aDocument;
+ SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
+ CPPUNIT_ASSERT(aDocument.Read(aStream));
+
+ // The document has one page.
+ std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aPages.size());
+
+ int nTH(0);
+ for (const auto& rDocElement : aDocument.GetElements())
+ {
+ auto pObject =
dynamic_cast<vcl::filter::PDFObjectElement*>(rDocElement.get());
+ if (!pObject)
+ continue;
+ auto pType =
dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("Type"));
+ if (pType && pType->GetValue() == "StructElem")
+ {
+ auto pS =
dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("S"));
+ if (pS && pS->GetValue() == "TH")
+ {
+ int nTable(0);
+ auto pAttrs =
dynamic_cast<vcl::filter::PDFArrayElement*>(pObject->Lookup("A"));
+ CPPUNIT_ASSERT(pAttrs != nullptr);
+ for (const auto& rAttrRef : pAttrs->GetElements())
+ {
+ auto pARef =
dynamic_cast<vcl::filter::PDFReferenceElement*>(rAttrRef);
+ CPPUNIT_ASSERT(pARef != nullptr);
+ auto pAttr = pARef->LookupObject();
+ CPPUNIT_ASSERT(pAttr != nullptr);
+ auto pAttrDict = pAttr->GetDictionary();
+ CPPUNIT_ASSERT(pAttrDict != nullptr);
+ auto pOwner
+ =
dynamic_cast<vcl::filter::PDFNameElement*>(pAttrDict->LookupElement("O"));
+ CPPUNIT_ASSERT(pOwner != nullptr);
+ if (pOwner->GetValue() == "Table")
+ {
+ auto pScope =
dynamic_cast<vcl::filter::PDFNameElement*>(
+ pAttrDict->LookupElement("Scope"));
+ CPPUNIT_ASSERT(pScope != nullptr);
+ CPPUNIT_ASSERT_EQUAL(OString("Column"),
pScope->GetValue());
+ ++nTable;
+ }
+ }
+ CPPUNIT_ASSERT_EQUAL(int(1), nTable);
+ ++nTH;
+ }
+ }
+ }
+ CPPUNIT_ASSERT_EQUAL(int(6), nTH);
+}
+
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf142129)
{
loadFromURL(u"master.odm");
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx
b/vcl/source/gdi/pdfwriter_impl.cxx
index 6f7521beccd3..b95898f4b2bc 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1821,6 +1821,7 @@ const char* PDFWriterImpl::getAttributeTag(
PDFWriter::StructAttribute eAttr )
aAttributeStrings[ PDFWriter::ListNumbering ] = "ListNumbering";
aAttributeStrings[ PDFWriter::RowSpan ] = "RowSpan";
aAttributeStrings[ PDFWriter::ColSpan ] = "ColSpan";
+ aAttributeStrings[ PDFWriter::Scope ] = "Scope";
aAttributeStrings[ PDFWriter::LinkAnnotation ] = "LinkAnnotation";
}
@@ -1857,6 +1858,9 @@ const char* PDFWriterImpl::getAttributeValueTag(
PDFWriter::StructAttributeValue
aValueStrings[ PDFWriter::Underline ] = "Underline";
aValueStrings[ PDFWriter::Overline ] = "Overline";
aValueStrings[ PDFWriter::LineThrough ] = "LineThrough";
+ aValueStrings[ PDFWriter::Row ] = "Row";
+ aValueStrings[ PDFWriter::Column ] = "Column";
+ aValueStrings[ PDFWriter::Both ] = "Both";
aValueStrings[ PDFWriter::Disc ] = "Disc";
aValueStrings[ PDFWriter::Circle ] = "Circle";
aValueStrings[ PDFWriter::Square ] = "Square";
@@ -1907,8 +1911,11 @@ OString PDFWriterImpl::emitStructureAttributes(
PDFStructureElement& i_rEle )
if( attribute.first == PDFWriter::ListNumbering )
appendStructureAttributeLine( attribute.first, attribute.second,
aList, true );
else if( attribute.first == PDFWriter::RowSpan ||
- attribute.first == PDFWriter::ColSpan )
+ attribute.first == PDFWriter::ColSpan ||
+ attribute.first == PDFWriter::Scope)
+ {
appendStructureAttributeLine( attribute.first, attribute.second,
aTable, false );
+ }
else if( attribute.first == PDFWriter::LinkAnnotation )
{
sal_Int32 nLink = attribute.second.nValue;
@@ -10910,6 +10917,15 @@ bool PDFWriterImpl::setStructureAttribute( enum
PDFWriter::StructAttribute eAttr
}
}
break;
+ case PDFWriter::Scope:
+ if (eVal == PDFWriter::Row || eVal == PDFWriter::Column ||
eVal == PDFWriter::Both)
+ {
+ if (eType == PDFWriter::TableHeader)
+ {
+ bInsert = true;
+ }
+ }
+ break;
case PDFWriter::ListNumbering:
if( eVal == PDFWriter::NONE ||
eVal == PDFWriter::Disc ||