Kaydet (Commit) 0e71075b authored tarafından Miklos Vajna's avatar Miklos Vajna

Related: tdf#104841 sw PDF export: handle linked videos on non-first pages

Be explicit about the page number, this way a video on the second page
doesn't end up as an annotation for the first page. (In the Impress case
each slide is exported separately, so there this wasn't a problem.)

Change-Id: I83ba9cb4a3b2a6734bd88a138654e391199651c6
Reviewed-on: https://gerrit.libreoffice.org/32696Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst d3c1a84d
......@@ -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>
......
......@@ -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);
}
}
......
......@@ -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);
}
}
}
}
......
......@@ -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++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment