diff options
author | Lei Zhang <thestig@chromium.org> | 2015-05-06 14:48:28 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-05-06 14:48:28 -0700 |
commit | 5734d862cb22eca6e9644ea7d1c096d70123434f (patch) | |
tree | 896e80b1809d3961375e0cdca6b78fbe4ec7d8f5 /core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp | |
parent | 903e03a03ad4526252874d8ba15258e7c2955739 (diff) | |
download | pdfium-5734d862cb22eca6e9644ea7d1c096d70123434f.tar.xz |
Merge to XFA: Replace FX_NEW with new, remove tests from fpdfapi
Very few places where a change is required, but remove FX_NEW to show
they've been audited.
Review URL: https://codereview.chromium.org/1075953004
(cherry picked from commit 5c357a5d3d873be6b0ab01d7bec82f79d0a09f0e)
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1125183006
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp index e8c051b434..b64151ad06 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp @@ -50,7 +50,7 @@ void CPDF_PageContentGenerate::GenerateContent() if (pContent != NULL) { pPageDict->RemoveAt("Contents"); } - CPDF_Stream* pStream = FX_NEW CPDF_Stream(NULL, 0, NULL); + CPDF_Stream* pStream = new CPDF_Stream(NULL, 0, NULL); pStream->SetData(buf.GetBuffer(), buf.GetLength(), FALSE, FALSE); m_pDocument->AddIndirectObject(pStream); pPageDict->SetAtReference("Contents", m_pDocument, pStream->GetObjNum()); @@ -58,13 +58,13 @@ void CPDF_PageContentGenerate::GenerateContent() CFX_ByteString CPDF_PageContentGenerate::RealizeResource(CPDF_Object* pResourceObj, const FX_CHAR* szType) { if (m_pPage->m_pResources == NULL) { - m_pPage->m_pResources = FX_NEW CPDF_Dictionary; + m_pPage->m_pResources = new CPDF_Dictionary; int objnum = m_pDocument->AddIndirectObject(m_pPage->m_pResources); m_pPage->m_pFormDict->SetAtReference("Resources", m_pDocument, objnum); } CPDF_Dictionary* pResList = m_pPage->m_pResources->GetDict(szType); if (pResList == NULL) { - pResList = FX_NEW CPDF_Dictionary; + pResList = new CPDF_Dictionary; m_pPage->m_pResources->SetAt(szType, pResList); } m_pDocument->AddIndirectObject(pResourceObj); @@ -104,7 +104,7 @@ void CPDF_PageContentGenerate::ProcessForm(CFX_ByteTextBuf& buf, FX_LPCBYTE data if (!data || !size) { return; } - CPDF_Stream* pStream = FX_NEW CPDF_Stream(NULL, 0, NULL); + CPDF_Stream* pStream = new CPDF_Stream(NULL, 0, NULL); CPDF_Dictionary* pFormDict = CPDF_Dictionary::Create(); pFormDict->SetAtName(FX_BSTR("Type"), FX_BSTR("XObject")); pFormDict->SetAtName(FX_BSTR("Subtype"), FX_BSTR("Form")); @@ -136,7 +136,7 @@ void CPDF_PageContentGenerate::TransformContent(CFX_Matrix& matrix) if (!pContent || pContent->GetType() != PDFOBJ_STREAM) { continue; } - CPDF_StreamAcc* pStream = FX_NEW CPDF_StreamAcc(); + CPDF_StreamAcc* pStream = new CPDF_StreamAcc(); pStream->LoadAllData((CPDF_Stream*)pContent); pContentArray[i] = pStream; size += pContentArray[i]->GetSize() + 1; @@ -157,7 +157,7 @@ void CPDF_PageContentGenerate::TransformContent(CFX_Matrix& matrix) contentStream.LoadAllData((CPDF_Stream*)pContent); ProcessForm(buf, contentStream.GetData(), contentStream.GetSize(), matrix); } - CPDF_Stream* pStream = FX_NEW CPDF_Stream(NULL, 0, NULL); + CPDF_Stream* pStream = new CPDF_Stream(NULL, 0, NULL); pStream->SetData(buf.GetBuffer(), buf.GetLength(), FALSE, FALSE); m_pDocument->AddIndirectObject(pStream); m_pPage->m_pFormDict->SetAtReference("Contents", m_pDocument, pStream->GetObjNum()); |