| Index: core/src/fpdfdoc/doc_tagged.cpp
|
| diff --git a/core/src/fpdfdoc/doc_tagged.cpp b/core/src/fpdfdoc/doc_tagged.cpp
|
| index c5fe39b6ee8b6cdc1344ded31d0295ecb4b38771..e3cd744c614acd498dff78e8544771448f7f8d30 100644
|
| --- a/core/src/fpdfdoc/doc_tagged.cpp
|
| +++ b/core/src/fpdfdoc/doc_tagged.cpp
|
| @@ -20,10 +20,7 @@ CPDF_StructTree* CPDF_StructTree::LoadPage(const CPDF_Document* pDoc, const CPDF
|
| if (!IsTagged(pDoc)) {
|
| return NULL;
|
| }
|
| - CPDF_StructTreeImpl* pTree = FX_NEW CPDF_StructTreeImpl(pDoc);
|
| - if (pTree == NULL) {
|
| - return NULL;
|
| - }
|
| + CPDF_StructTreeImpl* pTree = new CPDF_StructTreeImpl(pDoc);
|
| pTree->LoadPageTree(pPageDict);
|
| return pTree;
|
| }
|
| @@ -32,10 +29,7 @@ CPDF_StructTree* CPDF_StructTree::LoadDoc(const CPDF_Document* pDoc)
|
| if (!IsTagged(pDoc)) {
|
| return NULL;
|
| }
|
| - CPDF_StructTreeImpl* pTree = FX_NEW CPDF_StructTreeImpl(pDoc);
|
| - if (pTree == NULL) {
|
| - return NULL;
|
| - }
|
| + CPDF_StructTreeImpl* pTree = new CPDF_StructTreeImpl(pDoc);
|
| pTree->LoadDocTree();
|
| return pTree;
|
| }
|
| @@ -66,10 +60,7 @@ void CPDF_StructTreeImpl::LoadDocTree()
|
| return;
|
| }
|
| if (pKids->GetType() == PDFOBJ_DICTIONARY) {
|
| - CPDF_StructElementImpl* pStructElementImpl = FX_NEW CPDF_StructElementImpl(this, NULL, (CPDF_Dictionary*)pKids);
|
| - if (pStructElementImpl == NULL) {
|
| - return;
|
| - }
|
| + CPDF_StructElementImpl* pStructElementImpl = new CPDF_StructElementImpl(this, NULL, (CPDF_Dictionary*)pKids);
|
| m_Kids.Add(pStructElementImpl);
|
| return;
|
| }
|
| @@ -79,10 +70,7 @@ void CPDF_StructTreeImpl::LoadDocTree()
|
| CPDF_Array* pArray = (CPDF_Array*)pKids;
|
| for (FX_DWORD i = 0; i < pArray->GetCount(); i ++) {
|
| CPDF_Dictionary* pKid = pArray->GetDict(i);
|
| - CPDF_StructElementImpl* pStructElementImpl = FX_NEW CPDF_StructElementImpl(this, NULL, pKid);
|
| - if (pStructElementImpl == NULL) {
|
| - return;
|
| - }
|
| + CPDF_StructElementImpl* pStructElementImpl = new CPDF_StructElementImpl(this, NULL, pKid);
|
| m_Kids.Add(pStructElementImpl);
|
| }
|
| }
|
| @@ -140,10 +128,7 @@ CPDF_StructElementImpl* CPDF_StructTreeImpl::AddPageNode(CPDF_Dictionary* pDict,
|
| if (map.Lookup(pDict, (FX_LPVOID&)pElement)) {
|
| return pElement;
|
| }
|
| - pElement = FX_NEW CPDF_StructElementImpl(this, NULL, pDict);
|
| - if (pElement == NULL) {
|
| - return NULL;
|
| - }
|
| + pElement = new CPDF_StructElementImpl(this, NULL, pDict);
|
| map.SetAt(pDict, pElement);
|
| CPDF_Dictionary* pParent = pDict->GetDict(FX_BSTRC("P"));
|
| if (pParent == NULL || pParent->GetString(FX_BSTRC("Type")) == FX_BSTRC("StructTreeRoot")) {
|
| @@ -321,7 +306,7 @@ void CPDF_StructElementImpl::LoadKid(FX_DWORD PageObjNum, CPDF_Object* pKidObj,
|
| pKid->m_Type = CPDF_StructKid::Element;
|
| pKid->m_Element.m_pDict = pKidDict;
|
| if (m_pTree->m_pPage == NULL) {
|
| - pKid->m_Element.m_pElement = FX_NEW CPDF_StructElementImpl(m_pTree, this, pKidDict);
|
| + pKid->m_Element.m_pElement = new CPDF_StructElementImpl(m_pTree, this, pKidDict);
|
| } else {
|
| pKid->m_Element.m_pElement = NULL;
|
| }
|
|
|