summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_flatten.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-08-05 12:34:06 -0700
committerTom Sepez <tsepez@chromium.org>2015-08-05 12:34:06 -0700
commitae51c810a44844ef437393c1768be8f7766586b2 (patch)
tree373bbfa8c8720af43d58a9982beea3ebf10c5d6d /fpdfsdk/src/fpdf_flatten.cpp
parente3166a8c39c8943f6cafb2ffe10bd9564e3eaf16 (diff)
downloadpdfium-ae51c810a44844ef437393c1768be8f7766586b2.tar.xz
Kill off last uses of FX_NEW in XFA.
It would seem that this never merged completely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1277583002 .
Diffstat (limited to 'fpdfsdk/src/fpdf_flatten.cpp')
-rw-r--r--fpdfsdk/src/fpdf_flatten.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index 5514b2b32b..e48c6ab706 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -37,7 +37,7 @@ FX_BOOL IsValiableRect(CPDF_Rect rect, CPDF_Rect rcPage) {
FX_BOOL GetContentsRect(CPDF_Document* pDoc,
CPDF_Dictionary* pDict,
CPDF_RectArray* pRectArray) {
- CPDF_Page* pPDFPage = FX_NEW CPDF_Page;
+ CPDF_Page* pPDFPage = new CPDF_Page;
pPDFPage->Load(pDoc, pDict, FALSE);
pPDFPage->ParseContent();
@@ -197,7 +197,7 @@ void SetPageContents(CFX_ByteString key,
// Create a new contents dictionary
if (!key.IsEmpty()) {
CPDF_Stream* pNewContents =
- FX_NEW CPDF_Stream(NULL, 0, FX_NEW CPDF_Dictionary);
+ new CPDF_Stream(NULL, 0, new CPDF_Dictionary);
if (!pNewContents)
return;
pPage->SetAtReference("Contents", pDocument,
@@ -216,7 +216,7 @@ void SetPageContents(CFX_ByteString key,
switch (iType) {
case PDFOBJ_STREAM: {
- pContentsArray = FX_NEW CPDF_Array;
+ pContentsArray = new CPDF_Array;
CPDF_Stream* pContents = (CPDF_Stream*)pContentsObj;
FX_DWORD dwObjNum = pDocument->AddIndirectObject(pContents);
CPDF_StreamAcc acc;
@@ -247,7 +247,7 @@ void SetPageContents(CFX_ByteString key,
if (!key.IsEmpty()) {
CPDF_Stream* pNewContents =
- FX_NEW CPDF_Stream(NULL, 0, FX_NEW CPDF_Dictionary);
+ new CPDF_Stream(NULL, 0, new CPDF_Dictionary);
dwObjNum = pDocument->AddIndirectObject(pNewContents);
pContentsArray->AddReference(pDocument, dwObjNum);
@@ -365,38 +365,38 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
rcOriginalCB = rcOriginalMB;
if (!rcOriginalMB.IsEmpty()) {
- CPDF_Array* pMediaBox = FX_NEW CPDF_Array();
+ CPDF_Array* pMediaBox = new CPDF_Array();
- pMediaBox->Add(FX_NEW CPDF_Number(rcOriginalMB.left));
- pMediaBox->Add(FX_NEW CPDF_Number(rcOriginalMB.bottom));
- pMediaBox->Add(FX_NEW CPDF_Number(rcOriginalMB.right));
- pMediaBox->Add(FX_NEW CPDF_Number(rcOriginalMB.top));
+ pMediaBox->Add(new CPDF_Number(rcOriginalMB.left));
+ pMediaBox->Add(new CPDF_Number(rcOriginalMB.bottom));
+ pMediaBox->Add(new CPDF_Number(rcOriginalMB.right));
+ pMediaBox->Add(new CPDF_Number(rcOriginalMB.top));
pPageDict->SetAt("MediaBox", pMediaBox);
}
if (!rcOriginalCB.IsEmpty()) {
- CPDF_Array* pCropBox = FX_NEW CPDF_Array();
- pCropBox->Add(FX_NEW CPDF_Number(rcOriginalCB.left));
- pCropBox->Add(FX_NEW CPDF_Number(rcOriginalCB.bottom));
- pCropBox->Add(FX_NEW CPDF_Number(rcOriginalCB.right));
- pCropBox->Add(FX_NEW CPDF_Number(rcOriginalCB.top));
+ CPDF_Array* pCropBox = new CPDF_Array();
+ pCropBox->Add(new CPDF_Number(rcOriginalCB.left));
+ pCropBox->Add(new CPDF_Number(rcOriginalCB.bottom));
+ pCropBox->Add(new CPDF_Number(rcOriginalCB.right));
+ pCropBox->Add(new CPDF_Number(rcOriginalCB.top));
pPageDict->SetAt("ArtBox", pCropBox);
}
CPDF_Dictionary* pRes = NULL;
pRes = pPageDict->GetDict("Resources");
if (!pRes) {
- pRes = FX_NEW CPDF_Dictionary;
+ pRes = new CPDF_Dictionary;
pPageDict->SetAt("Resources", pRes);
}
CPDF_Stream* pNewXObject =
- FX_NEW CPDF_Stream(NULL, 0, FX_NEW CPDF_Dictionary);
+ new CPDF_Stream(NULL, 0, new CPDF_Dictionary);
FX_DWORD dwObjNum = pDocument->AddIndirectObject(pNewXObject);
CPDF_Dictionary* pPageXObject = pRes->GetDict("XObject");
if (!pPageXObject) {
- pPageXObject = FX_NEW CPDF_Dictionary;
+ pPageXObject = new CPDF_Dictionary;
pRes->SetAt("XObject", pPageXObject);
}
@@ -421,7 +421,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
if (!key.IsEmpty()) {
pPageXObject->SetAtReference(key, pDocument, dwObjNum);
CPDF_Dictionary* pNewOXbjectDic = pNewXObject->GetDict();
- pNewXORes = FX_NEW CPDF_Dictionary;
+ pNewXORes = new CPDF_Dictionary;
pNewOXbjectDic->SetAt("Resources", pNewXORes);
pNewOXbjectDic->SetAtName("Type", "XObject");
pNewOXbjectDic->SetAtName("Subtype", "Form");
@@ -497,7 +497,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
CPDF_Dictionary* pXObject = pNewXORes->GetDict("XObject");
if (!pXObject) {
- pXObject = FX_NEW CPDF_Dictionary;
+ pXObject = new CPDF_Dictionary;
pNewXORes->SetAt("XObject", pXObject);
}