--- src/kernel/cobjecthelpers.cc.orig 2009-04-06 15:24:58 UTC +++ src/kernel/cobjecthelpers.cc @@ -42,14 +42,14 @@ int getIntFromDict(std::string name, boo { using namespace boost; - shared_ptr prop_ptr=dict->getProperty(name); + boost::shared_ptr prop_ptr=dict->getProperty(name); if(prop_ptr->getType() != pInt) { // malformed dictionary throw ElementBadTypeException(name/*, prop_ptr->getType()*/); } - shared_ptr int_ptr=IProperty::getSmartCObjectPtr(prop_ptr); + boost::shared_ptr int_ptr=IProperty::getSmartCObjectPtr(prop_ptr); return int_ptr->getValue(); } @@ -57,14 +57,14 @@ IndiRef getRefFromDict(std::string name, { using namespace boost; - shared_ptr prop_ptr=dict->getProperty(name); + boost::shared_ptr prop_ptr=dict->getProperty(name); if(prop_ptr->getType() != pRef) { // malformed dictionary throw ElementBadTypeException(name/*, prop_ptr->getType()*/); } - shared_ptr int_ptr=IProperty::getSmartCObjectPtr(prop_ptr); + boost::shared_ptr int_ptr=IProperty::getSmartCObjectPtr(prop_ptr); return int_ptr->getValue(); } @@ -72,14 +72,14 @@ std::string getStringFromDict(std::strin { using namespace boost; - shared_ptr prop_ptr=dict->getProperty(name); + boost::shared_ptr prop_ptr=dict->getProperty(name); if(prop_ptr->getType() != pString) { // malformed dictionary throw ElementBadTypeException(name); } - shared_ptr str_ptr=IProperty::getSmartCObjectPtr(prop_ptr); + boost::shared_ptr str_ptr=IProperty::getSmartCObjectPtr(prop_ptr); return str_ptr->getValue(); } @@ -87,14 +87,14 @@ std::string getNameFromDict(std::string { using namespace boost; - shared_ptr prop_ptr=dict->getProperty(name); + boost::shared_ptr prop_ptr=dict->getProperty(name); if(prop_ptr->getType() != pName) { // malformed dictionary throw ElementBadTypeException(name); } - shared_ptr name_ptr=IProperty::getSmartCObjectPtr(prop_ptr); + boost::shared_ptr name_ptr=IProperty::getSmartCObjectPtr(prop_ptr); std::string value; name_ptr->getValue(value); @@ -125,7 +125,7 @@ boost::shared_ptr getDictFromRef( // gets reference value and dereferences indirect object IndiRef ref; IProperty::getSmartCObjectPtr(refProp)->getValue(ref); - shared_ptr pdf = refProp->getPdf().lock(); + boost::shared_ptr pdf = refProp->getPdf().lock(); assert(pdf); boost::shared_ptr indirect_ptr=pdf->getIndirectProperty(ref); if(indirect_ptr->getType() != pDict) @@ -237,7 +237,7 @@ getReferencedObject (boost::shared_ptr(ip)->getValue(ref); - shared_ptr pdf = ip->getPdf().lock(); + boost::shared_ptr pdf = ip->getPdf().lock(); assert(pdf); return pdf->getIndirectProperty (ref); @@ -254,7 +254,7 @@ using namespace boost; // pdf specification says that two diagonal corners should be used and // readers has to be prepared to normalize it - shared_ptr array(CArrayFactory::getInstance()); + boost::shared_ptr array(CArrayFactory::getInstance()); scoped_ptr llx(CRealFactory::getInstance(rect.xleft)); scoped_ptr lly(CRealFactory::getInstance(rect.yleft)); scoped_ptr urx(CRealFactory::getInstance(rect.xright)); @@ -267,12 +267,12 @@ using namespace boost; return array; } -void getRectangleFromProperty(const shared_ptr prop, libs::Rectangle & rect) +void getRectangleFromProperty(const boost::shared_ptr prop, libs::Rectangle & rect) { if(!isArray(prop)) throw CObjBadValue(); - shared_ptr array = IProperty::getSmartCObjectPtr(prop); + boost::shared_ptr array = IProperty::getSmartCObjectPtr(prop); if(array->getPropertyCount() != 4) throw CObjBadValue(); @@ -286,7 +286,7 @@ boost::shared_ptr getIPropert { using namespace boost; - shared_ptr dateString(CStringFactory::getInstance()); + boost::shared_ptr dateString(CStringFactory::getInstance()); char buffer[30]; memset(buffer, '\0', sizeof(buffer)); @@ -304,7 +304,7 @@ bool checkAndReplace(boost::shared_ptr value; + boost::shared_ptr value; try { value=annotDict->getProperty(fieldName); @@ -323,9 +323,9 @@ using namespace boost; // // ::XRef* -getXRef (shared_ptr ip) +getXRef (boost::shared_ptr ip) { - shared_ptr pdf = ip->getPdf().lock(); + boost::shared_ptr pdf = ip->getPdf().lock(); if(!pdf) return NULL; return pdf->getCXref();