tdf#156565 sw: PDF/UA export: split Link SE at line break
There must be one Link SE per Link Annotation, so ensure that a new one
is created for a new line.
(regression from commit 4c5283a3a1)
Change-Id: I2585d9e22a435d7716f48fec89a78149c129f71d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158775
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This commit is contained in:
@@ -183,6 +183,7 @@ class SwTaggedPDFHelper
|
||||
~SwTaggedPDFHelper();
|
||||
|
||||
static bool IsExportTaggedPDF( const OutputDevice& rOut );
|
||||
static void EndCurrentLink(OutputDevice const&);
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -1698,6 +1698,20 @@ void SwTaggedPDFHelper::EndStructureElements()
|
||||
CheckRestoreTag();
|
||||
}
|
||||
|
||||
void SwTaggedPDFHelper::EndCurrentLink(OutputDevice const& rOut)
|
||||
{
|
||||
vcl::PDFExtOutDevData *const pPDFExtOutDevData(
|
||||
dynamic_cast<vcl::PDFExtOutDevData *>(rOut.GetExtOutDevData()));
|
||||
if (pPDFExtOutDevData && pPDFExtOutDevData->GetSwPDFState()->m_oCurrentLink)
|
||||
{
|
||||
pPDFExtOutDevData->GetSwPDFState()->m_oCurrentLink.reset();
|
||||
pPDFExtOutDevData->EndStructureElement();
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
aStructStack.pop_back();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void SwTaggedPDFHelper::EndCurrentAll()
|
||||
{
|
||||
if (mpPDFExtOutDevData->GetSwPDFState()->m_oCurrentSpan)
|
||||
|
||||
@@ -162,6 +162,8 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
|
||||
roTaggedParagraph.emplace(nullptr, &aFrameInfo, nullptr, *GetInfo().GetOut());
|
||||
}
|
||||
|
||||
SwTaggedPDFHelper::EndCurrentLink(*GetInfo().GetOut());
|
||||
|
||||
// Optimization!
|
||||
SwTwips nMaxRight = std::min<SwTwips>( rPaint.Right(), Right() );
|
||||
const SwTwips nTmpLeft = GetInfo().X();
|
||||
|
||||
Reference in New Issue
Block a user