diff options
-rw-r--r-- | include/vcl/pdfextoutdevdata.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/EnhancedPDFExportHelper.cxx | 7 | ||||
-rw-r--r-- | vcl/source/gdi/pdfextoutdevdata.cxx | 4 |
4 files changed, 9 insertions, 6 deletions
diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx index 1a0c941eaef7..e3a05d9afa61 100644 --- a/include/vcl/pdfextoutdevdata.hxx +++ b/include/vcl/pdfextoutdevdata.hxx @@ -264,7 +264,7 @@ public: sal_Int32 CreateLink( const Rectangle& rRect, sal_Int32 nPageNr = -1 ); /// Create a Screen annotation. - sal_Int32 CreateScreen(const Rectangle& rRect); + sal_Int32 CreateScreen(const Rectangle& rRect, sal_Int32 nPageNr); /** Set the destination for a link <p>will change a URL type link to a dest link if necessary</p> diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index cb269d6e6758..073e70d8deaa 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1659,7 +1659,7 @@ void ImplPDFExportShapeInteraction( const uno::Reference< drawing::XShape >& xSh xShapePropSet->getPropertyValue("MediaURL") >>= aMediaURL; if (!aMediaURL.isEmpty()) { - sal_Int32 nScreenId = rPDFExtOutDevData.CreateScreen(aLinkRect); + sal_Int32 nScreenId = rPDFExtOutDevData.CreateScreen(aLinkRect, rPDFExtOutDevData.GetCurrentPageNumber()); rPDFExtOutDevData.SetScreenURL(nScreenId, aMediaURL); } } diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index b9d218195d6f..85cc511f7741 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1831,8 +1831,11 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() { const SwPageFrame* pCurrPage = mrSh.GetLayout()->GetPageAtPos(aSnapRect.Center()); Rectangle aPDFRect(SwRectToPDFRect(pCurrPage, aSnapRect.SVRect())); - sal_Int32 nScreenId = pPDFExtOutDevData->CreateScreen(aPDFRect); - pPDFExtOutDevData->SetScreenURL(nScreenId, aMediaURL); + for (sal_Int32 nScreenPageNum : aScreenPageNums) + { + sal_Int32 nScreenId = pPDFExtOutDevData->CreateScreen(aPDFRect, nScreenPageNum); + pPDFExtOutDevData->SetScreenURL(nScreenId, aMediaURL); + } } } } diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index f85c981010a1..0649b450bde5 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -695,12 +695,12 @@ sal_Int32 PDFExtOutDevData::CreateLink( const Rectangle& rRect, sal_Int32 nPageN return mpGlobalSyncData->mCurId++; } -sal_Int32 PDFExtOutDevData::CreateScreen(const Rectangle& rRect) +sal_Int32 PDFExtOutDevData::CreateScreen(const Rectangle& rRect, sal_Int32 nPageNr) { mpGlobalSyncData->mActions.push_back(PDFExtOutDevDataSync::CreateScreen); mpGlobalSyncData->mParaRects.push_back(rRect); mpGlobalSyncData->mParaMapModes.push_back(mrOutDev.GetMapMode()); - mpGlobalSyncData->mParaInts.push_back(mnPage); + mpGlobalSyncData->mParaInts.push_back(nPageNr); return mpGlobalSyncData->mCurId++; } |