~ubuntu-branches/ubuntu/precise/inkscape/precise-updates

« back to all changes in this revision

Viewing changes to src/extension/internal/pdfinput/pdf-parser.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alex Valavanis
  • Date: 2010-09-12 19:44:58 UTC
  • mfrom: (1.1.12 upstream) (45.1.3 maverick)
  • Revision ID: james.westby@ubuntu.com-20100912194458-4sjwmbl7dlsrk5dc
Tags: 0.48.0-1ubuntu1
* Merge with Debian unstable (LP: #628048, LP: #401567, LP: #456248, 
  LP: #463602, LP: #591986)
* debian/control: 
  - Ubuntu maintainers
  - Promote python-lxml, python-numpy, python-uniconvertor to Recommends.
  - Demote pstoedit to Suggests (universe package).
  - Suggests ttf-dejavu instead of ttf-bitstream-vera (LP: #513319)
* debian/rules:
  - Run intltool-update on build (Ubuntu-specific).
  - Add translation domain to .desktop files (Ubuntu-specific).
* debian/dirs:
  - Add usr/share/pixmaps.  Allow inkscape.xpm installation
* drop 50-poppler-API.dpatch (now upstream)
* drop 51-paste-in-unwritable-directory.dpatch (now upstream) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
809
809
          blendingColorSpace = NULL;
810
810
          isolated = knockout = gFalse;
811
811
          if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) {
 
812
#ifdef POPPLER_NEW_COLOR_SPACE_API
 
813
            blendingColorSpace = GfxColorSpace::parse(&obj5, NULL);
 
814
#else
812
815
            blendingColorSpace = GfxColorSpace::parse(&obj5);
 
816
#endif
813
817
          }
814
818
          obj5.free();
815
819
          if (obj4.dictLookup(const_cast<char*>("I"), &obj5)->isBool()) {
1008
1012
 
1009
1013
  state->setFillPattern(NULL);
1010
1014
  res->lookupColorSpace(args[0].getName(), &obj);
 
1015
#ifdef POPPLER_NEW_COLOR_SPACE_API
 
1016
  if (obj.isNull()) {
 
1017
    colorSpace = GfxColorSpace::parse(&args[0], NULL);
 
1018
  } else {
 
1019
    colorSpace = GfxColorSpace::parse(&obj, NULL);
 
1020
  }
 
1021
#else
1011
1022
  if (obj.isNull()) {
1012
1023
    colorSpace = GfxColorSpace::parse(&args[0]);
1013
1024
  } else {
1014
1025
    colorSpace = GfxColorSpace::parse(&obj);
1015
1026
  }
 
1027
#endif
1016
1028
  obj.free();
1017
1029
  if (colorSpace) {
1018
1030
    state->setFillColorSpace(colorSpace);
1031
1043
 
1032
1044
  state->setStrokePattern(NULL);
1033
1045
  res->lookupColorSpace(args[0].getName(), &obj);
 
1046
#ifdef POPPLER_NEW_COLOR_SPACE_API
 
1047
  if (obj.isNull()) {
 
1048
    colorSpace = GfxColorSpace::parse(&args[0], NULL);
 
1049
  } else {
 
1050
    colorSpace = GfxColorSpace::parse(&obj, NULL);
 
1051
  }
 
1052
#else
1034
1053
  if (obj.isNull()) {
1035
1054
    colorSpace = GfxColorSpace::parse(&args[0]);
1036
1055
  } else {
1037
1056
    colorSpace = GfxColorSpace::parse(&obj);
1038
1057
  }
 
1058
#endif
1039
1059
  obj.free();
1040
1060
  if (colorSpace) {
1041
1061
    state->setStrokeColorSpace(colorSpace);
1100
1120
      state->setFillColor(&color);
1101
1121
      builder->updateStyle(state);
1102
1122
    }
 
1123
#ifdef POPPLER_NEW_COLOR_SPACE_API
 
1124
    if (args[numArgs-1].isName() &&
 
1125
        (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) {
 
1126
      state->setFillPattern(pattern);
 
1127
      builder->updateStyle(state);
 
1128
    }
 
1129
#else
1103
1130
    if (args[numArgs-1].isName() &&
1104
1131
        (pattern = res->lookupPattern(args[numArgs-1].getName()))) {
1105
1132
      state->setFillPattern(pattern);
1106
1133
      builder->updateStyle(state);
1107
1134
    }
 
1135
#endif
1108
1136
 
1109
1137
  } else {
1110
1138
    if (numArgs != state->getFillColorSpace()->getNComps()) {
1144
1172
      state->setStrokeColor(&color);
1145
1173
      builder->updateStyle(state);
1146
1174
    }
 
1175
#ifdef POPPLER_NEW_COLOR_SPACE_API
 
1176
    if (args[numArgs-1].isName() &&
 
1177
        (pattern = res->lookupPattern(args[numArgs-1].getName(), NULL))) {
 
1178
      state->setStrokePattern(pattern);
 
1179
      builder->updateStyle(state);
 
1180
    }
 
1181
#else
1147
1182
    if (args[numArgs-1].isName() &&
1148
1183
        (pattern = res->lookupPattern(args[numArgs-1].getName()))) {
1149
1184
      state->setStrokePattern(pattern);
1150
1185
      builder->updateStyle(state);
1151
1186
    }
 
1187
#endif
1152
1188
 
1153
1189
  } else {
1154
1190
    if (numArgs != state->getStrokeColorSpace()->getNComps()) {
1543
1579
  double *matrix = NULL;
1544
1580
  GBool savedState = gFalse;
1545
1581
 
 
1582
#ifdef POPPLER_NEW_COLOR_SPACE_API
 
1583
  if (!(shading = res->lookupShading(args[0].getName(), NULL))) {
 
1584
    return;
 
1585
  }
 
1586
#else
1546
1587
  if (!(shading = res->lookupShading(args[0].getName()))) {
1547
1588
    return;
1548
1589
  }
 
1590
#endif
1549
1591
 
1550
1592
  // save current graphics state
1551
1593
  if (shading->getType() != 2 && shading->getType() != 3) {
2507
2549
      }
2508
2550
    }
2509
2551
    if (!obj1.isNull()) {
 
2552
#ifdef POPPLER_NEW_COLOR_SPACE_API
 
2553
      colorSpace = GfxColorSpace::parse(&obj1, NULL);
 
2554
#else
2510
2555
      colorSpace = GfxColorSpace::parse(&obj1);
 
2556
#endif
2511
2557
    } else if (csMode == streamCSDeviceGray) {
2512
2558
      colorSpace = new GfxDeviceGrayColorSpace();
2513
2559
    } else if (csMode == streamCSDeviceRGB) {
2592
2638
          obj2.free();
2593
2639
        }
2594
2640
      }
 
2641
#ifdef POPPLER_NEW_COLOR_SPACE_API
 
2642
      maskColorSpace = GfxColorSpace::parse(&obj1, NULL);
 
2643
#else
2595
2644
      maskColorSpace = GfxColorSpace::parse(&obj1);
 
2645
#endif
2596
2646
      obj1.free();
2597
2647
      if (!maskColorSpace || maskColorSpace->getMode() != csDeviceGray) {
2598
2648
        goto err1;
2767
2817
    if (obj1.dictLookup(const_cast<char*>("S"), &obj2)->isName(const_cast<char*>("Transparency"))) {
2768
2818
      transpGroup = gTrue;
2769
2819
      if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) {
 
2820
#ifdef POPPLER_NEW_COLOR_SPACE_API
 
2821
        blendingColorSpace = GfxColorSpace::parse(&obj3, NULL);
 
2822
#else
2770
2823
        blendingColorSpace = GfxColorSpace::parse(&obj3);
 
2824
#endif
2771
2825
      }
2772
2826
      obj3.free();
2773
2827
      if (obj1.dictLookup(const_cast<char*>("I"), &obj3)->isBool()) {