Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 509280 | Differences between
and this patch

Collapse All | Expand All

(-)inkscape-0.48.4.orig/src/extension/internal/pdfinput/pdf-parser.cpp (+49 lines)
Lines 56-61 Link Here
56
#define M_PI 3.14159265358979323846
56
#define M_PI 3.14159265358979323846
57
#endif
57
#endif
58
58
59
#include "poppler-features.h"
60
#if POPPLER_CHECK_VERSION(0, 26, 0)
61
#define POPPLER_26
62
#endif
63
59
//------------------------------------------------------------------------
64
//------------------------------------------------------------------------
60
// constants
65
// constants
61
//------------------------------------------------------------------------
66
//------------------------------------------------------------------------
Lines 861-868 Link Here
861
	  isolated = knockout = gFalse;
866
	  isolated = knockout = gFalse;
862
	  if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) {
867
	  if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) {
863
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
868
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
869
#ifndef POPPLER_26
864
	    blendingColorSpace = GfxColorSpace::parse(&obj5, NULL);
870
	    blendingColorSpace = GfxColorSpace::parse(&obj5, NULL);
865
#else
871
#else
872
	    blendingColorSpace = GfxColorSpace::parse(&obj5, NULL, NULL);
873
#endif
874
#else
866
	    blendingColorSpace = GfxColorSpace::parse(&obj5);
875
	    blendingColorSpace = GfxColorSpace::parse(&obj5);
867
#endif
876
#endif
868
	  }
877
	  }
Lines 1085-1093 Link Here
1085
  res->lookupColorSpace(args[0].getName(), &obj);
1094
  res->lookupColorSpace(args[0].getName(), &obj);
1086
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
1095
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
1087
  if (obj.isNull()) {
1096
  if (obj.isNull()) {
1097
#ifndef POPPLER_26
1088
    colorSpace = GfxColorSpace::parse(&args[0], NULL);
1098
    colorSpace = GfxColorSpace::parse(&args[0], NULL);
1099
#else
1100
    colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL);
1101
#endif
1089
  } else {
1102
  } else {
1103
#ifndef POPPLER_26
1090
    colorSpace = GfxColorSpace::parse(&obj, NULL);
1104
    colorSpace = GfxColorSpace::parse(&obj, NULL);
1105
#else
1106
    colorSpace = GfxColorSpace::parse(&obj, NULL, NULL);
1107
#endif
1091
  }
1108
  }
1092
#else
1109
#else
1093
  if (obj.isNull()) {
1110
  if (obj.isNull()) {
Lines 1120-1128 Link Here
1120
  res->lookupColorSpace(args[0].getName(), &obj);
1137
  res->lookupColorSpace(args[0].getName(), &obj);
1121
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
1138
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
1122
  if (obj.isNull()) {
1139
  if (obj.isNull()) {
1140
#ifndef POPPLER_26
1123
    colorSpace = GfxColorSpace::parse(&args[0], NULL);
1141
    colorSpace = GfxColorSpace::parse(&args[0], NULL);
1142
#else
1143
    colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL);
1144
#endif
1124
  } else {
1145
  } else {
1146
#ifndef POPPLER_26
1125
    colorSpace = GfxColorSpace::parse(&obj, NULL);
1147
    colorSpace = GfxColorSpace::parse(&obj, NULL);
1148
#else
1149
    colorSpace = GfxColorSpace::parse(&obj, NULL, NULL);
1150
#endif
1126
  }
1151
  }
1127
#else
1152
#else
1128
  if (obj.isNull()) {
1153
  if (obj.isNull()) {
Lines 1213-1219 Link Here
1213
    }
1238
    }
1214
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
1239
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
1215
    if (args[numArgs-1].isName() &&
1240
    if (args[numArgs-1].isName() &&
1241
#ifndef POPPLER_26
1216
	(pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) {
1242
	(pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) {
1243
#else
1244
	(pattern = res->lookupPattern(args[numArgs-1].getName(), NULL, NULL))) {
1245
#endif
1217
      state->setFillPattern(pattern);
1246
      state->setFillPattern(pattern);
1218
      builder->updateStyle(state);
1247
      builder->updateStyle(state);
1219
    }
1248
    }
Lines 1273-1279 Link Here
1273
    }
1302
    }
1274
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
1303
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
1275
    if (args[numArgs-1].isName() &&
1304
    if (args[numArgs-1].isName() &&
1305
#ifndef POPPLER_26
1276
	(pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) {
1306
	(pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) {
1307
#else
1308
	(pattern = res->lookupPattern(args[numArgs-1].getName(), NULL, NULL))) {
1309
#endif
1277
      state->setStrokePattern(pattern);
1310
      state->setStrokePattern(pattern);
1278
      builder->updateStyle(state);
1311
      builder->updateStyle(state);
1279
    }
1312
    }
Lines 1711-1717 Link Here
1711
  GBool savedState = gFalse;
1744
  GBool savedState = gFalse;
1712
1745
1713
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
1746
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
1747
#ifndef POPPLER_26
1714
  if (!(shading = res->lookupShading(args[0].getName(), NULL))) {
1748
  if (!(shading = res->lookupShading(args[0].getName(), NULL))) {
1749
#else
1750
  if (!(shading = res->lookupShading(args[0].getName(), NULL, NULL))) {
1751
#endif
1715
    return;
1752
    return;
1716
  }
1753
  }
1717
#else
1754
#else
Lines 2727-2734 Link Here
2727
    }
2764
    }
2728
    if (!obj1.isNull()) {
2765
    if (!obj1.isNull()) {
2729
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
2766
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
2767
#ifndef POPPLER_26
2730
      colorSpace = GfxColorSpace::parse(&obj1, NULL);
2768
      colorSpace = GfxColorSpace::parse(&obj1, NULL);
2731
#else
2769
#else
2770
      colorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
2771
#endif
2772
#else
2732
      colorSpace = GfxColorSpace::parse(&obj1);
2773
      colorSpace = GfxColorSpace::parse(&obj1);
2733
#endif
2774
#endif
2734
    } else if (csMode == streamCSDeviceGray) {
2775
    } else if (csMode == streamCSDeviceGray) {
Lines 2816-2823 Link Here
2816
	}
2857
	}
2817
      }
2858
      }
2818
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
2859
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
2860
#ifndef POPPLER_26
2819
      maskColorSpace = GfxColorSpace::parse(&obj1, NULL);
2861
      maskColorSpace = GfxColorSpace::parse(&obj1, NULL);
2820
#else
2862
#else
2863
      maskColorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
2864
#endif
2865
#else
2821
      maskColorSpace = GfxColorSpace::parse(&obj1);
2866
      maskColorSpace = GfxColorSpace::parse(&obj1);
2822
#endif
2867
#endif
2823
      obj1.free();
2868
      obj1.free();
Lines 3007-3014 Link Here
3007
      transpGroup = gTrue;
3052
      transpGroup = gTrue;
3008
      if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) {
3053
      if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) {
3009
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
3054
#if defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
3055
#ifndef POPPLER_26
3010
	blendingColorSpace = GfxColorSpace::parse(&obj3, NULL);
3056
	blendingColorSpace = GfxColorSpace::parse(&obj3, NULL);
3011
#else
3057
#else
3058
	blendingColorSpace = GfxColorSpace::parse(&obj3, NULL, NULL);
3059
#endif
3060
#else
3012
	blendingColorSpace = GfxColorSpace::parse(&obj3);
3061
	blendingColorSpace = GfxColorSpace::parse(&obj3);
3013
#endif
3062
#endif
3014
      }
3063
      }

Return to bug 509280