diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-10-25 13:41:05 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-10-25 20:50:04 +0200 |
commit | fa3f04bdd4f73a1b3be70dfb709c44638ef7e3d9 (patch) | |
tree | f6b64a6f11acabe4b524bfed275a3ef30f96c21b /sc | |
parent | ee912e56d85345489234196266216e660a5dee46 (diff) |
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 <michael.stahl@allotropia.de>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/output2.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 2899ddd3c725..a7efd3dbb088 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -862,10 +862,10 @@ static void lcl_DoHyperlinkResult( const OutputDevice* pDev, const tools::Rectan vcl::PDFExtOutDevData* pPDFData = dynamic_cast< vcl::PDFExtOutDevData* >( pDev->GetExtOutDevData() ); OUString aURL; + OUString aCellText; if (rCell.getType() == CELLTYPE_FORMULA) { ScFormulaCell* pFCell = rCell.getFormula(); - OUString aCellText; if ( pFCell->IsHyperLinkCell() ) pFCell->GetURLResult( aURL, aCellText ); } @@ -873,7 +873,7 @@ static void lcl_DoHyperlinkResult( const OutputDevice* pDev, const tools::Rectan if ( !aURL.isEmpty() && pPDFData ) { vcl::PDFExtOutDevBookmarkEntry aBookmark; - aBookmark.nLinkId = pPDFData->CreateLink( rRect ); + aBookmark.nLinkId = pPDFData->CreateLink(rRect, aCellText); aBookmark.aBookmark = aURL; std::vector< vcl::PDFExtOutDevBookmarkEntry >& rBookmarks = pPDFData->GetBookmarks(); rBookmarks.push_back( aBookmark ); |