diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/EnhancedPDFExportHelper.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/text/EnhancedPDFExportHelper.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/text/itrpaint.cxx | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx index be3c45383061..6b2e2655ea43 100644 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ b/sw/inc/EnhancedPDFExportHelper.hxx @@ -183,6 +183,7 @@ class SwTaggedPDFHelper ~SwTaggedPDFHelper(); static bool IsExportTaggedPDF( const OutputDevice& rOut ); + static void EndCurrentLink(OutputDevice const&); }; /* diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index e224d33901a4..48c938264994 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -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) diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index 4f0d412f2597..5b6bb1288d57 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -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(); |