]> git.pld-linux.org Git - packages/libreoffice.git/blame - libreoffice-poppler-22.09.0.patch
- use system ucpp
[packages/libreoffice.git] / libreoffice-poppler-22.09.0.patch
CommitLineData
7f3f1a51
JB
1From b7d63694985bbb1cf86eb71769feadb28ce68c17 Mon Sep 17 00:00:00 2001
2From: Sam James <sam@gentoo.org>
3Date: Fri, 2 Sep 2022 04:31:18 +0100
4Subject: Fix build with Poppler 22.09.0
5
6With Poppler 22.09.0, LO fails to build with:
7```
8/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
9 state->getLineDash(&dashArray, &arrayLen, &startOffset);
10 ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~
11/usr/include/poppler/GfxState.h:1506:32: note: 'getLineDash' declared here
12 const std::vector<double> &getLineDash(double *start)
13 ^
141 error generated.
15```
16
17Poppler changed the getLineDash interface:
18```
19- void getLineDash(double **dash, int *length, double *start)
20+ const std::vector<double> &getLineDash(double *start)
21```
22
23Signed-off-by: Sam James <sam@gentoo.org>
24Change-Id: I29e18f20d7650a7fcac1bc8ab4aaa04aaa2ab8fb
25Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139249
26Tested-by: Jenkins
27Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
28---
29 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 9 ++++++++-
30 1 file changed, 8 insertions(+), 1 deletion(-)
31
32diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
33index f12478cb2f4d..3ad139b65fa3 100644
34--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
35+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
36@@ -678,8 +678,15 @@ void PDFOutDev::updateLineDash(GfxState *state)
37 return;
38 assert(state);
39
40- double* dashArray; int arrayLen; double startOffset;
41+ int arrayLen; double startOffset;
42+#if POPPLER_CHECK_VERSION(22, 9, 0)
43+ const std::vector<double> &dash = state->getLineDash(&startOffset);
44+ const double* dashArray = dash.data();
45+ arrayLen = dash.size();
46+#else
47+ double* dashArray;
48 state->getLineDash(&dashArray, &arrayLen, &startOffset);
49+#endif
50
51 printf( "updateLineDash" );
52 if( arrayLen && dashArray )
53--
54cgit v1.2.1
55
This page took 0.115839 seconds and 4 git commands to generate.