sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 7352d8968988ae42948354de9a63d214c03ac6ce Author: Sam James <s...@gentoo.org> AuthorDate: Fri Sep 2 04:31:18 2022 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Sep 15 18:13:06 2022 +0200 Fix build with Poppler 22.09.0 With Poppler 22.09.0, LO fails to build with: ``` /var/tmp/portage/app-office/libreoffice-7.3.5.2/work/libreoffice-7.3.5.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx:682:36: error: too many arguments to function call, expected single argument 'start', have 3 arguments state->getLineDash(&dashArray, &arrayLen, &startOffset); ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/poppler/GfxState.h:1506:32: note: 'getLineDash' declared here const std::vector<double> &getLineDash(double *start) ^ 1 error generated. ``` Poppler changed the getLineDash interface: ``` - void getLineDash(double **dash, int *length, double *start) + const std::vector<double> &getLineDash(double *start) ``` Signed-off-by: Sam James <s...@gentoo.org> Change-Id: I29e18f20d7650a7fcac1bc8ab4aaa04aaa2ab8fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139249 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit b7d63694985bbb1cf86eb71769feadb28ce68c17) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139835 (cherry picked from commit 89d2ecd6bc71fc6e581cff595b18ae67a13d8b11) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140009 Tested-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 85cd88d50162..d621aabc8204 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -661,8 +661,15 @@ void PDFOutDev::updateLineDash(GfxState *state) return; assert(state); - double* dashArray; int arrayLen; double startOffset; + int arrayLen; double startOffset; +#if POPPLER_CHECK_VERSION(22, 9, 0) + const std::vector<double> &dash = state->getLineDash(&startOffset); + const double* dashArray = dash.data(); + arrayLen = dash.size(); +#else + double* dashArray; state->getLineDash(&dashArray, &arrayLen, &startOffset); +#endif printf( "updateLineDash" ); if( arrayLen && dashArray )