]> git.pld-linux.org Git - packages/cups-filters.git/blame - cups-filters-poppler.patch
- added poppler patch (adjust for poppler 0.72 API changes); release 2
[packages/cups-filters.git] / cups-filters-poppler.patch
CommitLineData
91e8d173
JB
1--- cups-filters-1.21.6/filter/pdftoopvp/oprs/OPVPSplashClip.cxx.orig 2018-12-17 17:50:48.000000000 +0100
2+++ cups-filters-1.21.6/filter/pdftoopvp/oprs/OPVPSplashClip.cxx 2018-12-20 21:00:31.188863926 +0100
3@@ -40,14 +40,15 @@
4
5 /* dummy call to clear state */
6 scanners[0]->getBBox(&tsxMin,&tsyMin,&tsxMax,&tsyMax);
7- scanners[0]->getNextSpan(tsyMin-2,&x0,&x1);
8+ SplashXPathScanIterator(*scanners[0], tsyMin-2).getNextSpan(&x0,&x1);
9
10 for (y = tyMin;y <= tyMax;y++) {
11 /* clear buffer */
12 for (i = 0;i < blen;i++) {
13 cbuf[i] = 0;
14 }
15- while (scanners[0]->getNextSpan(y,&x0,&x1)) {
16+ SplashXPathScanIterator iter(*scanners[0], y);
17+ while (iter.getNextSpan(&x0,&x1)) {
18 if (x0 < txMin) x0 = txMin;
19 if (x1 > txMax) x1 = txMax;
20 for (i = x0;i < x1;i++) {
21@@ -59,7 +60,8 @@
22 for (i = 0;i < blen;i++) {
23 tbuf[i] = 0;
24 }
25- while (scanners[j]->getNextSpan(y,&x0,&x1)) {
26+ SplashXPathScanIterator iter2(*scanners[j], y);
27+ while (iter2.getNextSpan(&x0,&x1)) {
28 if (x0 < txMin) x0 = txMin;
29 if (x1 > txMax) x1 = txMax;
30 for (i = x0;i < x1;i++) {
31--- cups-filters-1.21.6/filter/pdftoopvp/oprs/OPVPSplash.cxx.orig 2018-12-17 17:50:48.000000000 +0100
32+++ cups-filters-1.21.6/filter/pdftoopvp/oprs/OPVPSplash.cxx 2018-12-20 21:02:03.895529536 +0100
33@@ -1006,7 +1006,8 @@
34 setStrokePattern(state->fillPattern->copy());
35
36 for (y = yMinI; y < yMaxI; ++y) {
37- while (scanner->getNextSpan(y, &x0, &x1)) {
38+ SplashXPathScanIterator iter(*scanner, y);
39+ while (iter.getNextSpan(&x0, &x1)) {
40 if (x0 == x1) continue;
41 if (clipRes == splashClipAllInside) {
42 drawSpan(x0, x1-1, y, true);
43--- cups-filters-1.21.6/filter/pdftoopvp/OPVPOutputDev.cxx.orig 2018-12-17 17:50:48.000000000 +0100
44+++ cups-filters-1.21.6/filter/pdftoopvp/OPVPOutputDev.cxx 2018-12-20 21:05:04.392194142 +0100
45@@ -294,7 +294,7 @@
46
47 if (state) {
48 if (scaleWidth > 0 && scaleHeight > 0) {
49- double *ctm = state->getCTM();
50+ const double *ctm = state->getCTM();
51
52 switch (rotate) {
53 case 90:
54@@ -548,7 +548,7 @@
55 &faceIndex, NULL);
56 if (fileName == 0) {
57 opvpError(-1, "Couldn't find a font for '%s'",
58- gfxFont->getName() ? gfxFont->getName()->getCString()
59+ gfxFont->getName() ? gfxFont->getName()->c_str()
60 : "(unnamed)");
61 goto err2;
62 }
63@@ -574,7 +574,7 @@
64 }
65 if (!dfp) {
66 opvpError(-1, "Couldn't find a font for '%s'",
67- gfxFont->getName() ? gfxFont->getName()->getCString()
68+ gfxFont->getName() ? gfxFont->getName()->c_str()
69 : "(unnamed)");
70 goto err2;
71 }
72@@ -609,7 +609,7 @@
73 #endif
74 ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
75 opvpError(-1, "Couldn't create a font for '%s'",
76- gfxFont->getName() ? gfxFont->getName()->getCString()
77+ gfxFont->getName() ? gfxFont->getName()->c_str()
78 : "(unnamed)");
79 goto err2;
80 }
81@@ -623,7 +623,7 @@
82 #endif
83 ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
84 opvpError(-1, "Couldn't create a font for '%s'",
85- gfxFont->getName() ? gfxFont->getName()->getCString()
86+ gfxFont->getName() ? gfxFont->getName()->c_str()
87 : "(unnamed)");
88 goto err2;
89 }
90@@ -637,7 +637,7 @@
91 #endif
92 ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
93 opvpError(-1, "Couldn't create a font for '%s'",
94- gfxFont->getName() ? gfxFont->getName()->getCString()
95+ gfxFont->getName() ? gfxFont->getName()->c_str()
96 : "(unnamed)");
97 goto err2;
98 }
99@@ -645,7 +645,7 @@
100 case fontTrueTypeOT:
101 case fontTrueType:
102 if (fileName)
103- ff = FoFiTrueType::load(fileName->getCString());
104+ ff = FoFiTrueType::load(fileName->c_str());
105 else
106 ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
107 if (ff) {
108@@ -661,7 +661,7 @@
109 fontsrc,
110 codeToGID, n))) {
111 opvpError(-1, "Couldn't create a font for '%s'",
112- gfxFont->getName() ? gfxFont->getName()->getCString()
113+ gfxFont->getName() ? gfxFont->getName()->c_str()
114 : "(unnamed)");
115 goto err2;
116 }
117@@ -672,7 +672,7 @@
118 id,
119 fontsrc))) {
120 opvpError(-1, "Couldn't create a font for '%s'",
121- gfxFont->getName() ? gfxFont->getName()->getCString()
122+ gfxFont->getName() ? gfxFont->getName()->c_str()
123 : "(unnamed)");
124 goto err2;
125 }
126@@ -696,7 +696,7 @@
127 fontsrc))) {
128 #endif
129 opvpError(-1, "Couldn't create a font for '%s'",
130- gfxFont->getName() ? gfxFont->getName()->getCString()
131+ gfxFont->getName() ? gfxFont->getName()->c_str()
132 : "(unnamed)");
133 goto err2;
134 }
135@@ -720,7 +720,7 @@
136 }
137 } else {
138 if (fileName)
139- ff = FoFiTrueType::load(fileName->getCString());
140+ ff = FoFiTrueType::load(fileName->c_str());
141 else
142 ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
143 if (! ff)
144@@ -733,7 +733,7 @@
145 fontsrc,
146 codeToGID, n, faceIndex))) {
147 opvpError(-1, "Couldn't create a font for '%s'",
148- gfxFont->getName() ? gfxFont->getName()->getCString()
149+ gfxFont->getName() ? gfxFont->getName()->c_str()
150 : "(unnamed)");
151 goto err2;
152 }
153@@ -760,7 +760,7 @@
154 if (fontFile->doAdjustMatrix && !gfxFont->isCIDFont()) {
155 double w1, w2;
156 CharCode code;
157- char *name;
158+ const char *name;
159 for (code = 0; code < 256; ++code) {
160 if ((name = ((Gfx8BitFont *)gfxFont)->getCharName(code)) &&
161 name[0] == 'm' && name[1] == '\0') {
162@@ -1115,7 +1115,7 @@
163 int width, int height, bool invert,
164 bool interpolate,
165 bool inlineImg) {
166- double *ctm;
167+ const double *ctm;
168 SplashCoord mat[6];
169 SplashOutImageMaskData imgMaskData;
170
171@@ -1379,7 +1379,7 @@
172 GfxImageColorMap *colorMap,
173 bool interpolate,
174 int *maskColors, bool inlineImg) {
175- double *ctm;
176+ const double *ctm;
177 SplashCoord mat[6];
178 SplashOutImageData imgData;
179 SplashColorMode srcMode;
180@@ -1604,7 +1604,7 @@
181 Stream *maskStr, int maskWidth,
182 int maskHeight, bool maskInvert,
183 bool maskInterpolate) {
184- double *ctm;
185+ const double *ctm;
186 SplashCoord mat[6];
187 SplashOutMaskedImageData imgData;
188 SplashOutImageMaskData imgMaskData;
189@@ -1759,7 +1759,7 @@
190 int maskWidth, int maskHeight,
191 GfxImageColorMap *maskColorMap,
192 bool maskInterpolate) {
193- double *ctm;
194+ const double *ctm;
195 SplashCoord mat[6];
196 SplashOutImageData imgData;
197 SplashOutImageData imgMaskData;
198--- cups-filters-1.21.6/filter/pdftoopvp/pdftoopvp.cxx.orig 2018-12-17 17:50:48.000000000 +0100
199+++ cups-filters-1.21.6/filter/pdftoopvp/pdftoopvp.cxx 2018-12-20 21:09:35.195524381 +0100
200@@ -482,11 +482,11 @@
201 if (choices != 0) free(choices);
202 }
203
204- strncpy(jobInfo,jobInfoStr.getCString(),sizeof(jobInfo)-1);
205+ strncpy(jobInfo,jobInfoStr.c_str(),sizeof(jobInfo)-1);
206 jobInfo[sizeof(jobInfo)-1] = '\0';
207- strncpy(docInfo,docInfoStr.getCString(),sizeof(docInfo)-1);
208+ strncpy(docInfo,docInfoStr.c_str(),sizeof(docInfo)-1);
209 docInfo[sizeof(docInfo)-1] = '\0';
210- strncpy(pageInfo,pageInfoStr.getCString(),sizeof(pageInfo)-1);
211+ strncpy(pageInfo,pageInfoStr.c_str(),sizeof(pageInfo)-1);
212 pageInfo[sizeof(pageInfo)-1] = '\0';
213
214 colorProfile = getColorProfilePath(ppd,&colorProfilePath);
215@@ -647,7 +647,9 @@
216 name.append("/tmp");
217 }
218 name.append("/XXXXXX");
219- fd = mkstemp(name.getCString());
220+ char namebuf[name.getLength()+1];
221+ strcpy(namebuf, name.c_str());
222+ fd = mkstemp(namebuf);
223 if (fd < 0) {
224 opvpError(-1,"Can't create temporary file");
225 exitCode = 2;
226@@ -691,7 +693,7 @@
227 close(fd);
228 doc = new PDFDoc(&name);
229 /* remove name */
230- unlink(name.getCString());
231+ unlink(name.c_str());
232 } else {
233 /* no jcl check */
234 doc = new PDFDoc(fileName.copy());
This page took 0.122419 seconds and 4 git commands to generate.