From fc333597628611d6018e4f7f25dc2b5e661eaaa4 Mon Sep 17 00:00:00 2001 From: Marcin Banasiak Date: Thu, 3 Dec 2009 17:03:34 +0000 Subject: [PATCH] - workaround for https://bugs.launchpad.net/inkscape/+bug/487038 (fixes build) Changed files: inkscape-poppler.patch -> 1.2 --- inkscape-poppler.patch | 129 ++++++++++++++++++++++++++++------------- 1 file changed, 88 insertions(+), 41 deletions(-) diff --git a/inkscape-poppler.patch b/inkscape-poppler.patch index 70f9a16..d2faeae 100644 --- a/inkscape-poppler.patch +++ b/inkscape-poppler.patch @@ -1,42 +1,89 @@ -diff -NrU5 inkscape-0.46.orig/src/extension/internal/pdfinput/pdf-parser.cpp inkscape-0.46/src/extension/internal/pdfinput/pdf-parser.cpp ---- inkscape-0.46.orig/src/extension/internal/pdfinput/pdf-parser.cpp 2008-06-05 00:26:20.000000000 +0200 -+++ inkscape-0.46/src/extension/internal/pdfinput/pdf-parser.cpp 2008-06-05 00:51:47.000000000 +0200 -@@ -2194,11 +2194,11 @@ - void PdfParser::doShowText(GooString *s) { - GfxFont *font; - int wMode; - double riseX, riseY; - CharCode code; -- Unicode u[8]; -+ Unicode *u = NULL; - double x, y, dx, dy, dx2, dy2, curX, curY, tdx, tdy, lineX, lineY; - double originX, originY, tOriginX, tOriginY; - double oldCTM[6], newCTM[6]; - double *mat; - Object charProc; -@@ -2242,11 +2242,11 @@ - oldParser = parser; - p = s->getCString(); - len = s->getLength(); - while (len > 0) { - n = font->getNextChar(p, len, &code, -- u, (int)(sizeof(u) / sizeof(Unicode)), &uLen, -+ &u, &uLen, - &dx, &dy, &originX, &originY); - dx = dx * state->getFontSize() + state->getCharSpace(); - if (n == 1 && *p == ' ') { - dx += state->getWordSpace(); +--- inkscape-0.47/src/extension/internal/pdfinput/pdf-parser.cpp~ 2009-11-16 18:29:17.000000000 +0100 ++++ inkscape-0.47/src/extension/internal/pdfinput/pdf-parser.cpp 2009-12-02 22:41:16.831452938 +0100 +@@ -809,7 +809,7 @@ + blendingColorSpace = NULL; + isolated = knockout = gFalse; + if (!obj4.dictLookup(const_cast("CS"), &obj5)->isNull()) { +- blendingColorSpace = GfxColorSpace::parse(&obj5); ++ blendingColorSpace = GfxColorSpace::parse(&obj5, NULL); + } + obj5.free(); + if (obj4.dictLookup(const_cast("I"), &obj5)->isBool()) { +@@ -1009,9 +1009,9 @@ + state->setFillPattern(NULL); + res->lookupColorSpace(args[0].getName(), &obj); + if (obj.isNull()) { +- colorSpace = GfxColorSpace::parse(&args[0]); ++ colorSpace = GfxColorSpace::parse(&args[0], NULL); + } else { +- colorSpace = GfxColorSpace::parse(&obj); ++ colorSpace = GfxColorSpace::parse(&obj, NULL); + } + obj.free(); + if (colorSpace) { +@@ -1032,9 +1032,9 @@ + state->setStrokePattern(NULL); + res->lookupColorSpace(args[0].getName(), &obj); + if (obj.isNull()) { +- colorSpace = GfxColorSpace::parse(&args[0]); ++ colorSpace = GfxColorSpace::parse(&args[0], NULL); + } else { +- colorSpace = GfxColorSpace::parse(&obj); ++ colorSpace = GfxColorSpace::parse(&obj, NULL); + } + obj.free(); + if (colorSpace) { +@@ -1101,7 +1101,7 @@ + builder->updateStyle(state); + } + if (args[numArgs-1].isName() && +- (pattern = res->lookupPattern(args[numArgs-1].getName()))) { ++ (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) { + state->setFillPattern(pattern); + builder->updateStyle(state); + } +@@ -1145,7 +1145,7 @@ + builder->updateStyle(state); + } + if (args[numArgs-1].isName() && +- (pattern = res->lookupPattern(args[numArgs-1].getName()))) { ++ (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) { + state->setStrokePattern(pattern); + builder->updateStyle(state); + } +@@ -1543,7 +1543,7 @@ + double *matrix = NULL; + GBool savedState = gFalse; + +- if (!(shading = res->lookupShading(args[0].getName()))) { ++ if (!(shading = res->lookupShading(args[0].getName(), NULL))) { + return; + } + +@@ -2507,7 +2507,7 @@ } -@@ -2291,11 +2291,11 @@ - state->textTransformDelta(0, state->getRise(), &riseX, &riseY); - p = s->getCString(); - len = s->getLength(); - while (len > 0) { - n = font->getNextChar(p, len, &code, -- u, (int)(sizeof(u) / sizeof(Unicode)), &uLen, -+ &u, &uLen, - &dx, &dy, &originX, &originY); - - if (wMode) { - dx *= state->getFontSize(); - dy = dy * state->getFontSize() + state->getCharSpace(); + } + if (!obj1.isNull()) { +- colorSpace = GfxColorSpace::parse(&obj1); ++ colorSpace = GfxColorSpace::parse(&obj1, NULL); + } else if (csMode == streamCSDeviceGray) { + colorSpace = new GfxDeviceGrayColorSpace(); + } else if (csMode == streamCSDeviceRGB) { +@@ -2592,7 +2592,7 @@ + obj2.free(); + } + } +- maskColorSpace = GfxColorSpace::parse(&obj1); ++ maskColorSpace = GfxColorSpace::parse(&obj1, NULL); + obj1.free(); + if (!maskColorSpace || maskColorSpace->getMode() != csDeviceGray) { + goto err1; +@@ -2767,7 +2767,7 @@ + if (obj1.dictLookup(const_cast("S"), &obj2)->isName(const_cast("Transparency"))) { + transpGroup = gTrue; + if (!obj1.dictLookup(const_cast("CS"), &obj3)->isNull()) { +- blendingColorSpace = GfxColorSpace::parse(&obj3); ++ blendingColorSpace = GfxColorSpace::parse(&obj3, NULL); + } + obj3.free(); + if (obj1.dictLookup(const_cast("I"), &obj3)->isBool()) { -- 2.44.0