summaryrefslogtreecommitdiff
path: root/sw/source/core/text
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-03-07 10:40:23 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2023-03-08 10:38:11 +0000
commit7a907965cc6246ab644be92811e35d9f73a90e86 (patch)
treea8691ff07a0857931df6bb62c984532b867bc73f /sw/source/core/text
parent4e5489297cb5cfb8d2387d57da7cd92ae1a3ebb1 (diff)
vcl,sw: PDF/UA export: tag headers and footers as required
ISO 14289-1:2014 has one requirement for specific tagging of artifacts: 7.8 Page headers and footers Running headers and footers shall be identified as Pagination artifacts and shall be classified as either Header or Footer subtypes as per ISO 32000-1:2008, 14.8.2.2.2, Table 330. It was not immediately obvious how to implement this but the functions used for tunnelling structure element attributes through MetaFile can be used for this purpose as well with a few tweaks. Change-Id: I19a3192b1b56b82ed11972c4bbe8d20ab13567be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148387 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/core/text')
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 1dde77106624..e9f8d310d3fe 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -602,6 +602,18 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
}
break;
+ case vcl::PDFWriter::NonStructElement:
+ if (pFrame->IsHeaderFrame() || pFrame->IsFooterFrame())
+ {
+ // ISO 14289-1:2014, Clause: 7.8
+ mpPDFExtOutDevData->SetStructureAttribute(vcl::PDFWriter::Type, vcl::PDFWriter::Pagination);
+ mpPDFExtOutDevData->SetStructureAttribute(vcl::PDFWriter::Subtype,
+ pFrame->IsHeaderFrame()
+ ? vcl::PDFWriter::Header
+ : vcl::PDFWriter::Footer);
+ }
+ break;
+
default :
break;
}