From fa3f04bdd4f73a1b3be70dfb709c44638ef7e3d9 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 25 Oct 2022 13:41:05 +0200 Subject: tdf#148934 PDF/UA export: add Contents entry to Link annotations * Specification: ISO 14289-1:2014, Clause: 7.18.5, Test number: 2 Links shall contain an alternate description via their Contents key as described in ISO 32000-1:2008, 14.9.3. These links are created all over the code, in some cases it's a bit dubious what the content/alt-text should be, but let's try to use the most suitable looking bit of text in whatever the context is. * Specification: ISO 14289-1:2014, Clause: 7.18.3, Test number: 1 Every page on which there is an annotation shall contain in its page dictionary the key Tabs, and its value shall be S. Change-Id: I7b63feb759f0c75047f854ed9997918f829a537e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141826 Tested-by: Jenkins Reviewed-by: Michael Stahl --- drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drawinglayer') diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 7b46015003fa..a231e20153ef 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1254,7 +1254,8 @@ void VclMetafileProcessor2D::processTextHierarchyFieldPrimitive2D( static_cast(ceil(aViewRange.getMaxX())), static_cast(ceil(aViewRange.getMaxY()))); vcl::PDFExtOutDevBookmarkEntry aBookmark; - aBookmark.nLinkId = mpPDFExtOutDevData->CreateLink(aRectLogic); + OUString const content(rFieldPrimitive.getValue("Representation")); + aBookmark.nLinkId = mpPDFExtOutDevData->CreateLink(aRectLogic, content); aBookmark.aBookmark = aURL; std::vector& rBookmarks = mpPDFExtOutDevData->GetBookmarks(); rBookmarks.push_back(aBookmark); -- cgit