Submitted By:            Douglas R. Reno <renodr at linuxfromscratch dot org>
Date:                    2022-09-03
Initial Package Version: 7.4.0.3
Origin:                  Gentoo (commit 3fe3e0dc873e97eb1bb5ccb2846fffee35182caa in gentoo.git)
Upstream Status:         Submitted
Description:             Adapts libreoffice-7.4.0.3 to changes in Poppler's API,
                         similar to Inkscape's poppler-22.09 patch.

diff -Naurp libreoffice-7.4.0.3.orig/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx libreoffice-7.4.0.3/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
--- libreoffice-7.4.0.3.orig/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx	2022-08-10 09:14:32.000000000 -0500
+++ libreoffice-7.4.0.3/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx	2022-09-03 10:39:04.244841138 -0500
@@ -678,8 +678,16 @@ void PDFOutDev::updateLineDash(GfxState
         return;
     assert(state);
 
-    double* dashArray; int arrayLen; double startOffset;
+    int arrayLen; double startOffset;
+#if POPPLER_CHECK_VERSION(22, 9, 0)
+    const double* dashArray;
+    const std::vector<double> &dash = state->getLineDash(&startOffset);
+    dashArray = dash.data();
+    arrayLen = dash.size();
+#else
+    double* dashArray;
     state->getLineDash(&dashArray, &arrayLen, &startOffset);
+#endif
 
     printf( "updateLineDash" );
     if( arrayLen && dashArray )
