diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-10-28 21:46:54 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-11-15 20:42:35 +0100 |
commit | dfffe710d07f84f4152cf61ccd4a69279a26ff7c (patch) | |
tree | b42704c9c28f75b966ba736fa590189f868cd749 /vcl/source/gdi/pdfwriter_impl.cxx | |
parent | 701e8d06484fb8781e43017ccf4ac1a3d64ac9e8 (diff) |
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 <michael.stahl@allotropia.de>
Diffstat (limited to 'vcl/source/gdi/pdfwriter_impl.cxx')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
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 || |