sd/source/ui/unoidl/unomodel.cxx |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit fb93cf7e3f70cf711742c5b492d520d9d49c3c5e
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Fri Mar 17 16:39:01 2023 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Wed Mar 22 09:41:44 2023 +0000

    sd: PDF export: produce annotations for shapes before painting shapes
    
    This is the same order as sw SwEnhancedPDFExportHelper and required to
    connect media shape Annot to its StructElem.
    
    Change-Id: I1d421e5d353261e32b28a0429cd73f156c692260
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149060
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 61189ca9deaa..3a89e7728e89 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1944,8 +1944,8 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 
nRenderer, const uno::Any& r
             // hint value if screen display. Only then the AutoColor 
mechanisms shall be applied
             rOutl.SetBackgroundColor( pPage->GetPageBackgroundColor( pPV, 
bScreenDisplay ) );
         }
-        aView.SdrPaintView::CompleteRedraw( pOut, aRegion, 
&aImplRenderPaintProc );
 
+        // produce link annots for media shapes before painting them
         if ( pPDFExtOutDevData && pPage )
         {
             try
@@ -2092,7 +2092,18 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 
nRenderer, const uno::Any& r
                         }
                     }
                 }
+            }
+            catch (const uno::Exception&)
+            {
+            }
+        }
 
+        aView.SdrPaintView::CompleteRedraw(pOut, aRegion, 
&aImplRenderPaintProc);
+
+        if (pPDFExtOutDevData && pPage)
+        {
+            try
+            {
                 Size        aPageSize( mpDoc->GetSdPage( 0, PageKind::Standard 
)->GetSize() );
                 Point aPoint( 0, 0 );
                 ::tools::Rectangle   aPageRect( aPoint, aPageSize );

Reply via email to