summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx38
1 files changed, 17 insertions, 21 deletions
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 258c0313b981..f3d9e69ad51b 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1969,39 +1969,35 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Goto footnote text:
if ( mrSh.GotoFootnoteText() )
{
- // Link PageNums
- std::vector<sal_Int32> aLinkPageNums = CalcOutputPageNums( aLinkRect );
-
// Destination Rectangle
const SwRect& rDestRect = mrSh.GetCharRect();
+ const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect );
+ if ( -1 != nDestPageNum )
+ {
+ const SwPageFrame* pCurrPage = static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() );
+ // Destination PageNum
+ tools::Rectangle aRect = SwRectToPDFRect(pCurrPage, rDestRect.SVRect());
+ // Destination Export
+ const sal_Int32 nDestId = pPDFExtOutDevData->CreateDest(aRect, nDestPageNum);
+ mrSh.GotoFootnoteAnchor();
- const SwPageFrame* pCurrPage =
- static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() );
+ // Link PageNums
+ sal_Int32 aLinkPageNum = CalcOutputPageNum( aLinkRect );
- // Destination PageNum
- const sal_Int32 nDestPageNum = CalcOutputPageNum( rDestRect );
+ pCurrPage = static_cast<const SwPageFrame*>( mrSh.GetLayout()->Lower() );
- for (sal_Int32 aLinkPageNum : aLinkPageNums)
- {
// Link Export
- tools::Rectangle aRect(SwRectToPDFRect(pCurrPage, aLinkRect.SVRect()));
- const sal_Int32 nLinkId =
- pPDFExtOutDevData->CreateLink(aRect, aLinkPageNum);
+ aRect = SwRectToPDFRect(pCurrPage, aLinkRect.SVRect());
+ const sal_Int32 nLinkId = pPDFExtOutDevData->CreateLink(aRect, aLinkPageNum);
// Store link info for tagged pdf output:
const IdMapEntry aLinkEntry( aLinkRect, nLinkId );
s_aLinkIdMap.push_back( aLinkEntry );
- if ( -1 != nDestPageNum )
- {
- aRect = SwRectToPDFRect(pCurrPage, rDestRect.SVRect());
- // Destination Export
- const sal_Int32 nDestId = pPDFExtOutDevData->CreateDest(rDestRect.SVRect(), nDestPageNum);
-
- // Connect Link and Destination:
- pPDFExtOutDevData->SetLinkDest( nLinkId, nDestId );
- }
+ // Connect Link and Destination:
+ pPDFExtOutDevData->SetLinkDest( nLinkId, nDestId );
}
+
}
}