1 diff -up inkscape-0.48.2/configure.ac.poppler_020 inkscape-0.48.2/configure.ac
2 --- inkscape-0.48.2/configure.ac.poppler_020 2011-07-08 14:23:16.270623076 -0500
3 +++ inkscape-0.48.2/configure.ac 2012-06-23 12:01:38.918678539 -0500
4 @@ -623,6 +623,12 @@ if test "x$popplernew" = "xyes"; then
5 AC_DEFINE(POPPLER_NEW_GFXFONT, 1, [Use GfxFont from Poppler >= 0.8.3])
8 +PKG_CHECK_MODULES(POPPLER_NEWERRORAPI, poppler >= 0.20.0, popplernewerror=yes, popplernewerror=no)
9 +if test "x$popplernewerror" = "xyes"; then
10 + AC_DEFINE(POPPLER_NEW_ERRORAPI, 1, [Use new error API from Poppler >= 0.20.0])
14 ink_svd_CPPFLAGS=$CPPFLAGS
16 CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
17 diff -up inkscape-0.48.2/src/extension/internal/pdfinput/pdf-parser.cpp.poppler_020 inkscape-0.48.2/src/extension/internal/pdfinput/pdf-parser.cpp
18 --- inkscape-0.48.2/src/extension/internal/pdfinput/pdf-parser.cpp.poppler_020 2011-07-08 13:25:09.468790000 -0500
19 +++ inkscape-0.48.2/src/extension/internal/pdfinput/pdf-parser.cpp 2012-06-23 12:08:49.285298266 -0500
20 @@ -367,15 +367,23 @@ void PdfParser::parse(Object *obj, GBool
21 for (i = 0; i < obj->arrayGetLength(); ++i) {
22 obj->arrayGet(i, &obj2);
23 if (!obj2.isStream()) {
24 +#ifdef POPPLER_NEW_ERRORAPI
25 + error(errInternal, -1, "Weird page contents");
27 error(-1, const_cast<char*>("Weird page contents"));
34 } else if (!obj->isStream()) {
35 - error(-1, const_cast<char*>("Weird page contents"));
37 +#ifdef POPPLER_NEW_ERRORAPI
38 + error(errInternal, -1, "Weird page contents");
40 + error(-1, const_cast<char*>("Weird page contents"));
44 parser = new Parser(xref, new Lexer(xref, obj), gFalse);
46 @@ -419,7 +427,11 @@ void PdfParser::go(GBool topLevel) {
48 // too many arguments - something is wrong
50 +#ifdef POPPLER_NEW_ERRORAPI
51 + error(errSyntaxError, getPos(), "Too many args in content stream");
53 error(getPos(), const_cast<char*>("Too many args in content stream"));
56 printf("throwing away arg: ");
58 @@ -436,7 +448,11 @@ void PdfParser::go(GBool topLevel) {
60 // args at end with no command
62 +#ifdef POPPLER_NEW_ERRORAPI
63 + error(errSyntaxError, getPos(), "Leftover args in content stream");
65 error(getPos(), const_cast<char*>("Leftover args in content stream"));
68 printf("%d leftovers:", numArgs);
69 for (i = 0; i < numArgs; ++i) {
70 @@ -502,7 +518,11 @@ void PdfParser::execOp(Object *cmd, Obje
72 if (!(op = findOp(name))) {
74 +#ifdef POPPLER_NEW_ERRORAPI
75 + error(errSyntaxError, getPos(), "Unknown operator '{0:s}'", name);
77 error(getPos(), const_cast<char*>("Unknown operator '%s'"), name);
82 @@ -510,26 +530,42 @@ void PdfParser::execOp(Object *cmd, Obje
84 if (op->numArgs >= 0) {
85 if (numArgs < op->numArgs) {
86 +#ifdef POPPLER_NEW_ERRORAPI
87 + error(errSyntaxError, getPos(), "Too few ({0:d}) args to '{1:d}' operator", numArgs, name);
89 error(getPos(), const_cast<char*>("Too few (%d) args to '%s' operator"), numArgs, name);
93 if (numArgs > op->numArgs) {
95 +#ifdef POPPLER_NEW_ERRORAPI
96 + error(errSyntaxError, getPos(), "Too many ({0:d}) args to '{1:s}' operator", numArgs, name);
98 error(getPos(), "Too many (%d) args to '%s' operator", numArgs, name);
101 argPtr += numArgs - op->numArgs;
102 numArgs = op->numArgs;
105 if (numArgs > -op->numArgs) {
106 +#ifdef POPPLER_NEW_ERRORAPI
107 + error(errSyntaxError, getPos(), "Too many ({0:d}) args to '{1:s}' operator",
109 error(getPos(), const_cast<char*>("Too many (%d) args to '%s' operator"),
115 for (i = 0; i < numArgs; ++i) {
116 if (!checkArg(&argPtr[i], op->tchk[i])) {
117 +#ifdef POPPLER_NEW_ERRORAPI
118 + error(errSyntaxError, getPos(), "Arg #{0:d} to '{1:s}' operator is wrong type ({2:s})",
120 error(getPos(), const_cast<char*>("Arg #%d to '%s' operator is wrong type (%s)"),
122 i, name, argPtr[i].getTypeName());
125 @@ -690,7 +726,11 @@ void PdfParser::opSetExtGState(Object ar
128 if (!obj1.isDict()) {
129 +#ifdef POPPLER_NEW_ERRORAPI
130 + error(errSyntaxError, getPos(), "ExtGState '{0:s}' is wrong type"), args[0].getName();
132 error(getPos(), const_cast<char*>("ExtGState '%s' is wrong type"), args[0].getName());
137 @@ -705,7 +745,11 @@ void PdfParser::opSetExtGState(Object ar
138 if (state->parseBlendMode(&obj2, &mode)) {
139 state->setBlendMode(mode);
141 +#ifdef POPPLER_NEW_ERRORAPI
142 + error(errSyntaxError, getPos(), "Invalid blend mode in ExtGState");
144 error(getPos(), const_cast<char*>("Invalid blend mode in ExtGState"));
149 @@ -764,7 +808,11 @@ void PdfParser::opSetExtGState(Object ar
150 state->setTransfer(funcs);
152 } else if (!obj2.isNull()) {
153 +#ifdef POPPLER_NEW_ERRORAPI
154 + error(errSyntaxError, getPos(), "Invalid transfer function in ExtGState");
156 error(getPos(), const_cast<char*>("Invalid transfer function in ExtGState"));
161 @@ -784,8 +832,11 @@ void PdfParser::opSetExtGState(Object ar
162 funcs[0] = Function::parse(&obj3);
163 if (funcs[0]->getInputSize() != 1 ||
164 funcs[0]->getOutputSize() != 1) {
166 - const_cast<char*>("Invalid transfer function in soft mask in ExtGState"));
167 +#ifdef POPPLER_NEW_ERRORAPI
168 + error(errSyntaxError, getPos(), "Invalid transfer function in soft mask in ExtGState");
170 + error(getPos(), const_cast<char*>("Invalid transfer function in soft mask in ExtGState"));
175 @@ -809,7 +860,7 @@ void PdfParser::opSetExtGState(Object ar
176 blendingColorSpace = NULL;
177 isolated = knockout = gFalse;
178 if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) {
179 -#ifdef POPPLER_NEW_COLOR_SPACE_API
180 +#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
181 blendingColorSpace = GfxColorSpace::parse(&obj5, NULL);
183 blendingColorSpace = GfxColorSpace::parse(&obj5);
184 @@ -840,15 +891,27 @@ void PdfParser::opSetExtGState(Object ar
188 +#ifdef POPPLER_NEW_ERRORAPI
189 + error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState - missing group");
191 error(getPos(), const_cast<char*>("Invalid soft mask in ExtGState - missing group"));
196 +#ifdef POPPLER_NEW_ERRORAPI
197 + error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState - missing group");
199 error(getPos(), const_cast<char*>("Invalid soft mask in ExtGState - missing group"));
203 } else if (!obj2.isNull()) {
204 +#ifdef POPPLER_NEW_ERRORAPI
205 + error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState");
207 error(getPos(), const_cast<char*>("Invalid soft mask in ExtGState"));
212 @@ -876,7 +939,11 @@ void PdfParser::doSoftMask(Object *str,
214 dict->lookup(const_cast<char*>("FormType"), &obj1);
215 if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) {
216 +#ifdef POPPLER_NEW_ERRORAPI
217 + error(errSyntaxError, getPos(), "Unknown form type");
219 error(getPos(), const_cast<char*>("Unknown form type"));
224 @@ -884,7 +951,11 @@ void PdfParser::doSoftMask(Object *str,
225 dict->lookup(const_cast<char*>("BBox"), &obj1);
226 if (!obj1.isArray()) {
228 +#ifdef POPPLER_NEW_ERRORAPI
229 + error(errSyntaxError, getPos(), "Bad form bounding box");
231 error(getPos(), const_cast<char*>("Bad form bounding box"));
235 for (i = 0; i < 4; ++i) {
236 @@ -1012,7 +1083,7 @@ void PdfParser::opSetFillColorSpace(Obje
238 state->setFillPattern(NULL);
239 res->lookupColorSpace(args[0].getName(), &obj);
240 -#ifdef POPPLER_NEW_COLOR_SPACE_API
241 +#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
243 colorSpace = GfxColorSpace::parse(&args[0], NULL);
245 @@ -1032,7 +1103,11 @@ void PdfParser::opSetFillColorSpace(Obje
246 state->setFillColor(&color);
247 builder->updateStyle(state);
249 +#ifdef POPPLER_NEW_ERRORAPI
250 + error(errSyntaxError, getPos(), "Bad color space (fill)");
252 error(getPos(), const_cast<char*>("Bad color space (fill)"));
257 @@ -1043,7 +1118,7 @@ void PdfParser::opSetStrokeColorSpace(Ob
259 state->setStrokePattern(NULL);
260 res->lookupColorSpace(args[0].getName(), &obj);
261 -#ifdef POPPLER_NEW_COLOR_SPACE_API
262 +#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
264 colorSpace = GfxColorSpace::parse(&args[0], NULL);
266 @@ -1063,7 +1138,11 @@ void PdfParser::opSetStrokeColorSpace(Ob
267 state->setStrokeColor(&color);
268 builder->updateStyle(state);
270 +#ifdef POPPLER_NEW_ERRORAPI
271 + error(errSyntaxError, getPos(), "Bad color space (stroke)");
273 error(getPos(), const_cast<char*>("Bad color space (stroke)"));
278 @@ -1072,7 +1151,11 @@ void PdfParser::opSetFillColor(Object ar
281 if (numArgs != state->getFillColorSpace()->getNComps()) {
282 +#ifdef POPPLER_NEW_ERRORAPI
283 + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'sc' command");
285 error(getPos(), const_cast<char*>("Incorrect number of arguments in 'sc' command"));
289 state->setFillPattern(NULL);
290 @@ -1088,7 +1171,11 @@ void PdfParser::opSetStrokeColor(Object
293 if (numArgs != state->getStrokeColorSpace()->getNComps()) {
294 +#ifdef POPPLER_NEW_ERRORAPI
295 + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SC' command");
297 error(getPos(), const_cast<char*>("Incorrect number of arguments in 'SC' command"));
301 state->setStrokePattern(NULL);
302 @@ -1109,7 +1196,11 @@ void PdfParser::opSetFillColorN(Object a
303 if (!((GfxPatternColorSpace *)state->getFillColorSpace())->getUnder() ||
304 numArgs - 1 != ((GfxPatternColorSpace *)state->getFillColorSpace())
305 ->getUnder()->getNComps()) {
306 +#ifdef POPPLER_NEW_ERRORAPI
307 + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'scn' command");
309 error(getPos(), const_cast<char*>("Incorrect number of arguments in 'scn' command"));
313 for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) {
314 @@ -1120,7 +1211,7 @@ void PdfParser::opSetFillColorN(Object a
315 state->setFillColor(&color);
316 builder->updateStyle(state);
318 -#ifdef POPPLER_NEW_COLOR_SPACE_API
319 +#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
320 if (args[numArgs-1].isName() &&
321 (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) {
322 state->setFillPattern(pattern);
323 @@ -1136,7 +1227,11 @@ void PdfParser::opSetFillColorN(Object a
326 if (numArgs != state->getFillColorSpace()->getNComps()) {
327 +#ifdef POPPLER_NEW_ERRORAPI
328 + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'scn' command");
330 error(getPos(), const_cast<char*>("Incorrect number of arguments in 'scn' command"));
334 state->setFillPattern(NULL);
335 @@ -1161,7 +1256,11 @@ void PdfParser::opSetStrokeColorN(Object
337 numArgs - 1 != ((GfxPatternColorSpace *)state->getStrokeColorSpace())
338 ->getUnder()->getNComps()) {
339 +#ifdef POPPLER_NEW_ERRORAPI
340 + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command");
342 error(getPos(), const_cast<char*>("Incorrect number of arguments in 'SCN' command"));
346 for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) {
347 @@ -1172,7 +1271,7 @@ void PdfParser::opSetStrokeColorN(Object
348 state->setStrokeColor(&color);
349 builder->updateStyle(state);
351 -#ifdef POPPLER_NEW_COLOR_SPACE_API
352 +#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
353 if (args[numArgs-1].isName() &&
354 (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) {
355 state->setStrokePattern(pattern);
356 @@ -1188,7 +1287,11 @@ void PdfParser::opSetStrokeColorN(Object
359 if (numArgs != state->getStrokeColorSpace()->getNComps()) {
360 +#ifdef POPPLER_NEW_ERRORAPI
361 + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command");
363 error(getPos(), const_cast<char*>("Incorrect number of arguments in 'SCN' command"));
367 state->setStrokePattern(NULL);
368 @@ -1212,7 +1315,11 @@ void PdfParser::opMoveTo(Object args[],
370 void PdfParser::opLineTo(Object args[], int numArgs) {
371 if (!state->isCurPt()) {
372 +#ifdef POPPLER_NEW_ERRORAPI
373 + error(errSyntaxError, getPos(), "No current point in lineto");
375 error(getPos(), const_cast<char*>("No current point in lineto"));
379 state->lineTo(args[0].getNum(), args[1].getNum());
380 @@ -1222,7 +1329,11 @@ void PdfParser::opCurveTo(Object args[],
381 double x1, y1, x2, y2, x3, y3;
383 if (!state->isCurPt()) {
384 +#ifdef POPPLER_NEW_ERRORAPI
385 + error(errSyntaxError, getPos(), "No current point in curveto");
387 error(getPos(), const_cast<char*>("No current point in curveto"));
391 x1 = args[0].getNum();
392 @@ -1238,7 +1349,11 @@ void PdfParser::opCurveTo1(Object args[]
393 double x1, y1, x2, y2, x3, y3;
395 if (!state->isCurPt()) {
396 +#ifdef POPPLER_NEW_ERRORAPI
397 + error(errSyntaxError, getPos(), "No current point in curveto1");
399 error(getPos(), const_cast<char*>("No current point in curveto1"));
403 x1 = state->getCurX();
404 @@ -1254,7 +1369,11 @@ void PdfParser::opCurveTo2(Object args[]
405 double x1, y1, x2, y2, x3, y3;
407 if (!state->isCurPt()) {
408 +#ifdef POPPLER_NEW_ERRORAPI
409 + error(errSyntaxError, getPos(), "No current point in curveto2");
411 error(getPos(), const_cast<char*>("No current point in curveto2"));
415 x1 = args[0].getNum();
416 @@ -1282,7 +1401,11 @@ void PdfParser::opRectangle(Object args[
418 void PdfParser::opClosePath(Object args[], int numArgs) {
419 if (!state->isCurPt()) {
420 +#ifdef POPPLER_NEW_ERRORAPI
421 + error(errSyntaxError, getPos(), "No current point in closepath");
423 error(getPos(), const_cast<char*>("No current point in closepath"));
428 @@ -1440,7 +1563,11 @@ void PdfParser::doPatternFillFallback(GB
429 doShadingPatternFillFallback((GfxShadingPattern *)pattern, gFalse, eoFill);
432 +#ifdef POPPLER_NEW_ERRORAPI
433 + error(errUnimplemented, getPos(), "Unimplemented pattern type (%d) in fill",
435 error(getPos(), const_cast<char*>("Unimplemented pattern type (%d) in fill"),
440 @@ -1459,7 +1586,11 @@ void PdfParser::doPatternStrokeFallback(
441 doShadingPatternFillFallback((GfxShadingPattern *)pattern, gTrue, gFalse);
444 +#ifdef POPPLER_NEW_ERRORAPI
445 + error(errUnimplemented, getPos(), "Unimplemented pattern type ({0:d}) in stroke",
447 error(getPos(), const_cast<char*>("Unimplemented pattern type (%d) in stroke"),
452 @@ -1579,7 +1710,7 @@ void PdfParser::opShFill(Object args[],
453 double *matrix = NULL;
454 GBool savedState = gFalse;
456 -#ifdef POPPLER_NEW_COLOR_SPACE_API
457 +#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
458 if (!(shading = res->lookupShading(args[0].getName(), NULL))) {
461 @@ -2156,7 +2287,11 @@ void PdfParser::opTextNextLine(Object ar
463 void PdfParser::opShowText(Object args[], int numArgs) {
464 if (!state->getFont()) {
465 +#ifdef POPPLER_NEW_ERRORAPI
466 + error(errSyntaxError, getPos(), "No font in show");
468 error(getPos(), const_cast<char*>("No font in show"));
473 @@ -2170,7 +2305,11 @@ void PdfParser::opMoveShowText(Object ar
476 if (!state->getFont()) {
477 +#ifdef POPPLER_NEW_ERRORAPI
478 + error(errSyntaxError, getPos(), "No font in move/show");
480 error(getPos(), const_cast<char*>("No font in move/show"));
485 @@ -2188,7 +2327,11 @@ void PdfParser::opMoveSetShowText(Object
488 if (!state->getFont()) {
489 +#ifdef POPPLER_NEW_ERRORAPI
490 + error(errSyntaxError, getPos(), "No font in move/set/show");
492 error(getPos(), const_cast<char*>("No font in move/set/show"));
497 @@ -2211,7 +2354,11 @@ void PdfParser::opShowSpaceText(Object a
500 if (!state->getFont()) {
501 +#ifdef POPPLER_NEW_ERRORAPI
502 + error(errSyntaxError, getPos(), "No font in show/space");
504 error(getPos(), const_cast<char*>("No font in show/space"));
509 @@ -2236,7 +2383,11 @@ void PdfParser::opShowSpaceText(Object a
510 } else if (obj.isString()) {
511 doShowText(obj.getString());
513 +#ifdef POPPLER_NEW_ERRORAPI
514 + error(errSyntaxError, getPos(), "Element of show/space array must be number or string");
516 error(getPos(), const_cast<char*>("Element of show/space array must be number or string"));
521 @@ -2334,7 +2485,11 @@ void PdfParser::doShowText(GooString *s)
522 if (charProc.isStream()) {
523 //parse(&charProc, gFalse); // TODO: parse into SVG font
525 +#ifdef POPPLER_NEW_ERRORAPI
526 + error(errSyntaxError, getPos(), "Missing or bad Type3 CharProc entry");
528 error(getPos(), const_cast<char*>("Missing or bad Type3 CharProc entry"));
531 //out->endType3Char(state);
533 @@ -2410,7 +2565,11 @@ void PdfParser::opXObject(Object args[],
536 if (!obj1.isStream()) {
537 +#ifdef POPPLER_NEW_ERRORAPI
538 + error(errSyntaxError, getPos(), "XObject '{0:s}' is wrong type", name);
540 error(getPos(), const_cast<char*>("XObject '%s' is wrong type"), name);
545 @@ -2426,9 +2585,17 @@ void PdfParser::opXObject(Object args[],
546 /* out->psXObject(obj1.getStream(),
547 obj3.isStream() ? obj3.getStream() : (Stream *)NULL);*/
548 } else if (obj2.isName()) {
549 +#ifdef POPPLER_NEW_ERRORAPI
550 + error(errSyntaxError, getPos(), "Unknown XObject subtype '{0:s}'", obj2.getName());
552 error(getPos(), const_cast<char*>("Unknown XObject subtype '%s'"), obj2.getName());
555 +#ifdef POPPLER_NEW_ERRORAPI
556 + error(errSyntaxError, getPos(), "XObject subtype is missing or wrong type");
558 error(getPos(), const_cast<char*>("XObject subtype is missing or wrong type"));
563 @@ -2559,7 +2726,7 @@ void PdfParser::doImage(Object *ref, Str
566 if (!obj1.isNull()) {
567 -#ifdef POPPLER_NEW_COLOR_SPACE_API
568 +#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
569 colorSpace = GfxColorSpace::parse(&obj1, NULL);
571 colorSpace = GfxColorSpace::parse(&obj1);
572 @@ -2648,7 +2815,7 @@ void PdfParser::doImage(Object *ref, Str
576 -#ifdef POPPLER_NEW_COLOR_SPACE_API
577 +#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
578 maskColorSpace = GfxColorSpace::parse(&obj1, NULL);
580 maskColorSpace = GfxColorSpace::parse(&obj1);
581 @@ -2758,7 +2925,11 @@ void PdfParser::doImage(Object *ref, Str
585 +#ifdef POPPLER_NEW_ERRORAPI
586 + error(errSyntaxError, getPos(), "Bad image parameters");
588 error(getPos(), const_cast<char*>("Bad image parameters"));
592 void PdfParser::doForm(Object *str) {
593 @@ -2783,7 +2954,11 @@ void PdfParser::doForm(Object *str) {
595 dict->lookup(const_cast<char*>("FormType"), &obj1);
596 if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) {
597 +#ifdef POPPLER_NEW_ERRORAPI
598 + error(errSyntaxError, getPos(), "Unknown form type");
600 error(getPos(), const_cast<char*>("Unknown form type"));
605 @@ -2791,7 +2966,11 @@ void PdfParser::doForm(Object *str) {
606 dict->lookup(const_cast<char*>("BBox"), &bboxObj);
607 if (!bboxObj.isArray()) {
609 +#ifdef POPPLER_NEW_ERRORAPI
610 + error(errSyntaxError, getPos(), "Bad form bounding box");
612 error(getPos(), const_cast<char*>("Bad form bounding box"));
616 for (i = 0; i < 4; ++i) {
617 @@ -2827,7 +3006,7 @@ void PdfParser::doForm(Object *str) {
618 if (obj1.dictLookup(const_cast<char*>("S"), &obj2)->isName(const_cast<char*>("Transparency"))) {
620 if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) {
621 -#ifdef POPPLER_NEW_COLOR_SPACE_API
622 +#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
623 blendingColorSpace = GfxColorSpace::parse(&obj3, NULL);
625 blendingColorSpace = GfxColorSpace::parse(&obj3);
626 @@ -2990,7 +3169,11 @@ Stream *PdfParser::buildImageStream() {
627 parser->getObj(&obj);
628 while (!obj.isCmd(const_cast<char*>("ID")) && !obj.isEOF()) {
630 +#ifdef POPPLER_NEW_ERRORAPI
631 + error(errSyntaxError, getPos(), "Inline image dictionary key must be a name object");
633 error(getPos(), const_cast<char*>("Inline image dictionary key must be a name object"));
637 key = copyString(obj.getName());
638 @@ -3005,7 +3188,11 @@ Stream *PdfParser::buildImageStream() {
639 parser->getObj(&obj);
642 +#ifdef POPPLER_NEW_ERRORAPI
643 + error(errSyntaxError, getPos(), "End of file in inline image");
645 error(getPos(), const_cast<char*>("End of file in inline image"));
650 @@ -3020,11 +3207,19 @@ Stream *PdfParser::buildImageStream() {
653 void PdfParser::opImageData(Object args[], int numArgs) {
654 +#ifdef POPPLER_NEW_ERRORAPI
655 + error(errInternal, getPos(), "Internal: got 'ID' operator");
657 error(getPos(), const_cast<char*>("Internal: got 'ID' operator"));
661 void PdfParser::opEndImage(Object args[], int numArgs) {
662 +#ifdef POPPLER_NEW_ERRORAPI
663 + error(errInternal, getPos(), "Internal: got 'EI' operator");
665 error(getPos(), const_cast<char*>("Internal: got 'EI' operator"));
669 //------------------------------------------------------------------------
670 diff -up inkscape-0.48.2/src/extension/internal/pdfinput/svg-builder.cpp.poppler_020 inkscape-0.48.2/src/extension/internal/pdfinput/svg-builder.cpp
671 --- inkscape-0.48.2/src/extension/internal/pdfinput/svg-builder.cpp.poppler_020 2012-06-23 12:01:38.912678613 -0500
672 +++ inkscape-0.48.2/src/extension/internal/pdfinput/svg-builder.cpp 2012-06-23 12:01:38.920678513 -0500
673 @@ -961,9 +961,7 @@ void SvgBuilder::updateFont(GfxState *st
674 _font_style = sp_repr_css_attr_new();
675 GfxFont *font = state->getFont();
676 // Store original name
677 - if (font->getOrigName()) {
678 - _font_specification = font->getOrigName()->getCString();
679 - } else if (font->getName()) {
680 + if (font->getName()) {
681 _font_specification = font->getName()->getCString();
683 _font_specification = (char*) "Arial";