vcl/source/pdf/pdfwriter_impl.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit 748c3720f6aad106ef6bca70a01aa71d10b587dc Author: Xisco Fauli <[email protected]> AuthorDate: Wed Feb 25 17:57:39 2026 +0100 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Thu Feb 26 09:16:20 2026 +0100 tdf#168057: use RoleMapNS in PDF/UA-2 This commit reverts my previous attempt at fixing the same issue commit 5dbf35a932bfa00e17f17b1f2337de7403754b8d Author: Xisco Fauli <[email protected]> Date: Wed Feb 25 12:54:41 2026 +0100 tdf#168057: Don't use aliases in StructElem when exporting to PDF/UA-2 The unittest has been removed in the backport because the verapdf validator is only available in master Change-Id: I20ef86c780224909a7fa9414fea628415289af60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200350 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200352 Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/vcl/source/pdf/pdfwriter_impl.cxx b/vcl/source/pdf/pdfwriter_impl.cxx index ca0a7728db04..1e2cbd327738 100644 --- a/vcl/source/pdf/pdfwriter_impl.cxx +++ b/vcl/source/pdf/pdfwriter_impl.cxx @@ -1022,11 +1022,21 @@ void PDFWriterImpl::emitNamespaces() if (!updateObject(nObject)) return; - COSWriter aWriter(m_aContext.Encryption.getParams(), m_pPDFEncryptor); + OStringBuffer aLine; + COSWriter aWriter(aLine, m_aContext.Encryption.getParams(), m_pPDFEncryptor); aWriter.startObject(nObject); aWriter.startDict(); aWriter.write("/Type", "/Namespace"); aWriter.writeKeyAndLiteral("/NS", sNamespace); + if( ! m_aRoleMap.empty() ) + { + aLine.append( "/RoleMapNS<<" ); + for (auto const& role : m_aRoleMap) + { + aLine.append( "/" + role.first + "/" + role.second + " " ); + } + aLine.append( ">> " ); + } aWriter.endDict(); aWriter.endObject();
