Ignore:
Timestamp:
Dec 21, 2008, 8:03:13 AM (13 years ago)
Author:
Eugene Romanenko
Message:

PDF plugin: Poppler library updated to version 0.10.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/mypoppler/poppler/OptionalContent.cc

    r257 r261  
    2929
    3030OCGs::OCGs(Object *ocgObject, XRef *xref) :
    31   m_orderArray(0), m_rBGroupsArray(), m_xref(xref)
     31  m_xref(xref)
    3232{
    3333  // we need to parse the dictionary here, and build optionalContentGroups
     34  ok = gTrue;
    3435  optionalContentGroups = new GooList();
    3536
     
    3940    error(-1, "Expected the optional content group list, but wasn't able to find it, or it isn't an Array");
    4041    ocgList.free();
     42    ok = gFalse;
    4143    return;
    4244  }
     
    5052      break;
    5153    }
    52     OptionalContentGroup *thisOptionalContentGroup = new OptionalContentGroup(ocg.getDict(), xref);
     54    OptionalContentGroup *thisOptionalContentGroup = new OptionalContentGroup(ocg.getDict());
    5355    ocg.free();
    5456    ocgList.arrayGetNF(i, &ocg);
     
    6769    defaultOcgConfig.free();
    6870    ocgList.free();
     71    ok = gFalse;
    6972    return;
    7073  }
     
    124127  off.free();
    125128
    126   Object order;
    127129  defaultOcgConfig.dictLookup("Order", &order);
    128   if ( (order.isArray()) && (order.arrayGetLength() > 0) ) {
    129     m_orderArray = order.getArray();
    130   }
    131 
    132   Object rbgroups;
    133130  defaultOcgConfig.dictLookup("RBGroups", &rbgroups);
    134   if ( (rbgroups.isArray()) && (rbgroups.arrayGetLength() > 0) ) {
    135     m_rBGroupsArray = rbgroups.getArray();
    136   }
    137131
    138132  ocgList.free();
     
    143137{
    144138  deleteGooList(optionalContentGroups, OptionalContentGroup);
     139  order.free();
     140  rbgroups.free();
    145141}
    146142
     
    157153  for (int i=0; i < optionalContentGroups->getLength(); ++i) {
    158154    ocg = (OptionalContentGroup*)optionalContentGroups->get(i);
    159     if ( (ocg->ref().num == ref.num) && (ocg->ref().gen == ref.gen) ) {
     155    if ( (ocg->getRef().num == ref.num) && (ocg->getRef().gen == ref.gen) ) {
    160156      return ocg;
    161157    }
     
    204200    } else if (ocg.isRef()) {
    205201      OptionalContentGroup* oc = findOcgByRef( ocg.getRef() );     
    206       if ( !oc || oc->state() == OptionalContentGroup::Off ) {
     202      if ( !oc || oc->getState() == OptionalContentGroup::Off ) {
    207203        result = false;
    208204      } else {
     
    214210  } else if ( dictType.isName("OCG") ) {
    215211    OptionalContentGroup* oc = findOcgByRef( dictRef->getRef() );
    216     if ( !oc || oc->state() == OptionalContentGroup::Off ) {
     212    if ( !oc || oc->getState() == OptionalContentGroup::Off ) {
    217213      result=false;
    218214    }
     
    231227    if (ocgItem.isRef()) {
    232228      OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );     
    233       if ( oc && oc->state() == OptionalContentGroup::Off ) {
     229      if ( oc && oc->getState() == OptionalContentGroup::Off ) {
    234230        return false;
    235231      }
     
    246242    if (ocgItem.isRef()) {
    247243      OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );     
    248       if ( oc && oc->state() == OptionalContentGroup::On ) {
     244      if ( oc && oc->getState() == OptionalContentGroup::On ) {
    249245        return false;
    250246      }
     
    261257    if (ocgItem.isRef()) {
    262258      OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );     
    263       if ( oc && oc->state() == OptionalContentGroup::On ) {
     259      if ( oc && oc->getState() == OptionalContentGroup::On ) {
    264260        return true;
    265261      }
     
    276272    if (ocgItem.isRef()) {
    277273      OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );     
    278       if ( oc && oc->state() == OptionalContentGroup::Off ) {
     274      if ( oc && oc->getState() == OptionalContentGroup::Off ) {
    279275        return true;
    280276      }
     
    286282//------------------------------------------------------------------------
    287283
    288 OptionalContentGroup::OptionalContentGroup(Dict *ocgDict, XRef *xrefA) : m_name(NULL)
     284OptionalContentGroup::OptionalContentGroup(Dict *ocgDict) : m_name(NULL)
    289285{
    290286  Object ocgName;
    291   ocgDict->lookupNF("Name", &ocgName);
     287  ocgDict->lookup("Name", &ocgName);
    292288  if (!ocgName.isString()) {
    293289    error(-1, "Expected the name of the OCG, but wasn't able to find it, or it isn't a String");
     
    304300}
    305301
    306 GooString* OptionalContentGroup::name() const
     302GooString* OptionalContentGroup::getName() const
    307303{
    308304  return m_name;
     
    314310}
    315311
    316 Ref OptionalContentGroup::ref() const
     312Ref OptionalContentGroup::getRef() const
    317313{
    318314  return m_ref;
Note: See TracChangeset for help on using the changeset viewer.