summaryrefslogtreecommitdiff
path: root/fpdfsdk
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
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')
-rw-r--r--fpdfsdk/include/fsdk_mgr.h2
-rw-r--r--fpdfsdk/include/javascript/JS_Define.h8
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp6
-rw-r--r--fpdfsdk/src/fpdf_dataavail.cpp6
-rw-r--r--fpdfsdk/src/fpdf_flatten.cpp38
-rw-r--r--fpdfsdk/src/fpdf_progressive.cpp6
-rw-r--r--fpdfsdk/src/fpdf_transformpage.cpp42
-rw-r--r--fpdfsdk/src/fpdfdoc.cpp2
-rw-r--r--fpdfsdk/src/fpdfeditimg.cpp6
-rw-r--r--fpdfsdk/src/fpdfeditpage.cpp28
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp4
-rw-r--r--fpdfsdk/src/fpdfsave.cpp8
-rw-r--r--fpdfsdk/src/fpdfview.cpp36
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp4
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp8
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp4
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp2
-rw-r--r--fpdfsdk/src/fsdk_baseannot.cpp12
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp4
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp8
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_FontMap.cpp2
21 files changed, 118 insertions, 118 deletions
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index 1e648e9461..40ac50489d 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -354,7 +354,7 @@ class CPDFDoc_Environment final {
FPDF_LPFILEHANDLER fileHandler =
m_pInfo->FFI_DownloadFromURL(m_pInfo, wsURL);
- CFPDF_FileStream* fileStream = FX_NEW CFPDF_FileStream(fileHandler);
+ CFPDF_FileStream* fileStream = new CFPDF_FileStream(fileHandler);
return fileStream;
}
return NULL;
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h
index 3252602dbc..11471af9b7 100644
--- a/fpdfsdk/include/javascript/JS_Define.h
+++ b/fpdfsdk/include/javascript/JS_Define.h
@@ -190,8 +190,8 @@ void JSMethod(const char* method_name_string,
const wchar_t* js_class_name::m_pClassName = JS_WIDESTRING(class_name); \
void js_class_name::JSConstructor(IFXJS_Context* cc, JSFXObject obj, \
JSFXObject global) { \
- CJS_Object* pObj = FX_NEW js_class_name(obj); \
- pObj->SetEmbedObject(FX_NEW class_alternate(pObj)); \
+ CJS_Object* pObj = new js_class_name(obj); \
+ pObj->SetEmbedObject(new class_alternate(pObj)); \
JS_SetPrivate(NULL, obj, (void*)pObj); \
pObj->InitInstance(cc); \
} \
@@ -398,8 +398,8 @@ void JSSpecialPropDel(const char* class_name,
} \
void js_class_name::JSConstructor(IFXJS_Context* cc, JSFXObject obj, \
JSFXObject global) { \
- CJS_Object* pObj = FX_NEW js_class_name(obj); \
- pObj->SetEmbedObject(FX_NEW class_alternate(pObj)); \
+ CJS_Object* pObj = new js_class_name(obj); \
+ pObj->SetEmbedObject(new class_alternate(pObj)); \
JS_SetPrivate(NULL, obj, (void*)pObj); \
pObj->InitInstance(cc); \
} \
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index cb6d51939e..3a8853cb24 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -175,7 +175,7 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDict("AP");
if (pAPDict == NULL) {
- pAPDict = FX_NEW CPDF_Dictionary;
+ pAPDict = new CPDF_Dictionary;
m_pAnnotDict->SetAt("AP", pAPDict);
}
@@ -194,14 +194,14 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
CPDF_Dictionary* pStreamDict = pStream->GetDict();
if (!pStreamDict) {
- pStreamDict = FX_NEW CPDF_Dictionary;
+ pStreamDict = new CPDF_Dictionary;
pStream->InitStream(NULL, 0, pStreamDict);
}
if (pStreamDict) {
CPDF_Dictionary* pStreamResList = pStreamDict->GetDict("Resources");
if (!pStreamResList) {
- pStreamResList = FX_NEW CPDF_Dictionary();
+ pStreamResList = new CPDF_Dictionary();
pStreamDict->SetAt("Resources", pStreamResList);
}
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp
index 0d5602fcf0..4100fe2db9 100644
--- a/fpdfsdk/src/fpdf_dataavail.cpp
+++ b/fpdfsdk/src/fpdf_dataavail.cpp
@@ -72,7 +72,7 @@ class CFPDF_DataAvail {
DLLEXPORT FPDF_AVAIL STDCALL FPDFAvail_Create(FX_FILEAVAIL* file_avail,
FPDF_FILEACCESS* file) {
- CFPDF_DataAvail* pAvail = FX_NEW CFPDF_DataAvail;
+ CFPDF_DataAvail* pAvail = new CFPDF_DataAvail;
pAvail->m_FileAvail.Set(file_avail);
pAvail->m_FileRead.Set(file);
pAvail->m_pDataAvail =
@@ -98,7 +98,7 @@ DLLEXPORT FPDF_DOCUMENT STDCALL
FPDFAvail_GetDocument(FPDF_AVAIL avail, FPDF_BYTESTRING password) {
if (avail == NULL)
return NULL;
- CPDF_Parser* pParser = FX_NEW CPDF_Parser;
+ CPDF_Parser* pParser = new CPDF_Parser;
pParser->SetPassword(password);
FX_DWORD err_code = pParser->StartAsynParse(
@@ -112,7 +112,7 @@ FPDFAvail_GetDocument(FPDF_AVAIL avail, FPDF_BYTESTRING password) {
CheckUnSupportError(pParser->GetDocument(), FPDF_ERR_SUCCESS);
CPDF_Document* pPDFDoc = pParser->GetDocument();
CPDFXFA_App* pApp = CPDFXFA_App::GetInstance();
- CPDFXFA_Document* pDocument = FX_NEW CPDFXFA_Document(pPDFDoc, pApp);
+ CPDFXFA_Document* pDocument = new CPDFXFA_Document(pPDFDoc, pApp);
return pDocument;
}
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);
}
diff --git a/fpdfsdk/src/fpdf_progressive.cpp b/fpdfsdk/src/fpdf_progressive.cpp
index 9167a77c46..65901f86f2 100644
--- a/fpdfsdk/src/fpdf_progressive.cpp
+++ b/fpdfsdk/src/fpdf_progressive.cpp
@@ -35,17 +35,17 @@ DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap,
// FXMT_CSLOCK_OBJ(&pPage->m_PageLock);
- CRenderContext* pContext = FX_NEW CRenderContext;
+ CRenderContext* pContext = new CRenderContext;
pPage->SetPrivateData((void*)1, pContext, DropContext);
#ifdef _SKIA_SUPPORT_
- pContext->m_pDevice = FX_NEW CFX_SkiaDevice;
+ pContext->m_pDevice = new CFX_SkiaDevice;
if (flags & FPDF_REVERSE_BYTE_ORDER)
((CFX_SkiaDevice*)pContext->m_pDevice)
->Attach((CFX_DIBitmap*)bitmap, 0, TRUE);
else
((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap);
#else
- pContext->m_pDevice = FX_NEW CFX_FxgeDevice;
+ pContext->m_pDevice = new CFX_FxgeDevice;
if (flags & FPDF_REVERSE_BYTE_ORDER)
((CFX_FxgeDevice*)pContext->m_pDevice)
->Attach((CFX_DIBitmap*)bitmap, 0, TRUE);
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp
index ad5f7fd37b..aa08f6843f 100644
--- a/fpdfsdk/src/fpdf_transformpage.cpp
+++ b/fpdfsdk/src/fpdf_transformpage.cpp
@@ -20,11 +20,11 @@ DLLEXPORT void STDCALL FPDFPage_SetMediaBox(FPDF_PAGE page,
if (!pPage)
return;
CPDF_Dictionary* pPageDict = pPage->m_pFormDict;
- CPDF_Array* pMediaBoxArray = FX_NEW CPDF_Array;
- pMediaBoxArray->Add(FX_NEW CPDF_Number(left));
- pMediaBoxArray->Add(FX_NEW CPDF_Number(bottom));
- pMediaBoxArray->Add(FX_NEW CPDF_Number(FX_FLOAT(right)));
- pMediaBoxArray->Add(FX_NEW CPDF_Number(FX_FLOAT(top)));
+ CPDF_Array* pMediaBoxArray = new CPDF_Array;
+ pMediaBoxArray->Add(new CPDF_Number(left));
+ pMediaBoxArray->Add(new CPDF_Number(bottom));
+ pMediaBoxArray->Add(new CPDF_Number(FX_FLOAT(right)));
+ pMediaBoxArray->Add(new CPDF_Number(FX_FLOAT(top)));
pPageDict->SetAt("MediaBox", pMediaBoxArray);
}
@@ -40,11 +40,11 @@ DLLEXPORT void STDCALL FPDFPage_SetCropBox(FPDF_PAGE page,
if (!pPage)
return;
CPDF_Dictionary* pPageDict = pPage->m_pFormDict;
- CPDF_Array* pCropBoxArray = FX_NEW CPDF_Array;
- pCropBoxArray->Add(FX_NEW CPDF_Number(left));
- pCropBoxArray->Add(FX_NEW CPDF_Number(bottom));
- pCropBoxArray->Add(FX_NEW CPDF_Number(FX_FLOAT(right)));
- pCropBoxArray->Add(FX_NEW CPDF_Number(FX_FLOAT(top)));
+ CPDF_Array* pCropBoxArray = new CPDF_Array;
+ pCropBoxArray->Add(new CPDF_Number(left));
+ pCropBoxArray->Add(new CPDF_Number(bottom));
+ pCropBoxArray->Add(new CPDF_Number(FX_FLOAT(right)));
+ pCropBoxArray->Add(new CPDF_Number(FX_FLOAT(top)));
pPageDict->SetAt("CropBox", pCropBoxArray);
}
@@ -125,8 +125,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page,
if (!pContentObj)
return FALSE;
- CPDF_Dictionary* pDic = FX_NEW CPDF_Dictionary;
- CPDF_Stream* pStream = FX_NEW CPDF_Stream(NULL, 0, pDic);
+ CPDF_Dictionary* pDic = new CPDF_Dictionary;
+ CPDF_Stream* pStream = new CPDF_Stream(NULL, 0, pDic);
pStream->SetData(textBuf.GetBuffer(), textBuf.GetSize(), FALSE, FALSE);
CPDF_Document* pDoc = pPage->m_pDocument;
if (!pDoc)
@@ -141,7 +141,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page,
CPDF_Array* pContentArray = NULL;
if (pContentObj && pContentObj->GetType() == PDFOBJ_ARRAY) {
pContentArray = (CPDF_Array*)pContentObj;
- CPDF_Reference* pRef = FX_NEW CPDF_Reference(pDoc, pStream->GetObjNum());
+ CPDF_Reference* pRef = new CPDF_Reference(pDoc, pStream->GetObjNum());
pContentArray->InsertAt(0, pRef);
pContentArray->AddReference(pDoc, pEndStream);
@@ -152,12 +152,12 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page,
if (pDirectObj->GetType() == PDFOBJ_ARRAY) {
pContentArray = (CPDF_Array*)pDirectObj;
CPDF_Reference* pRef =
- FX_NEW CPDF_Reference(pDoc, pStream->GetObjNum());
+ new CPDF_Reference(pDoc, pStream->GetObjNum());
pContentArray->InsertAt(0, pRef);
pContentArray->AddReference(pDoc, pEndStream);
} else if (pDirectObj->GetType() == PDFOBJ_STREAM) {
- pContentArray = FX_NEW CPDF_Array();
+ pContentArray = new CPDF_Array();
pContentArray->AddReference(pDoc, pStream->GetObjNum());
pContentArray->AddReference(pDoc, pDirectObj->GetObjNum());
pContentArray->AddReference(pDoc, pEndStream);
@@ -222,7 +222,7 @@ DLLEXPORT FPDF_CLIPPATH STDCALL FPDF_CreateClipPath(float left,
float bottom,
float right,
float top) {
- CPDF_ClipPath* pNewClipPath = FX_NEW CPDF_ClipPath();
+ CPDF_ClipPath* pNewClipPath = new CPDF_ClipPath();
pNewClipPath->GetModify();
CPDF_Path Path;
Path.GetModify();
@@ -304,8 +304,8 @@ DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,
strClip << "W* n\n";
}
}
- CPDF_Dictionary* pDic = FX_NEW CPDF_Dictionary;
- CPDF_Stream* pStream = FX_NEW CPDF_Stream(NULL, 0, pDic);
+ CPDF_Dictionary* pDic = new CPDF_Dictionary;
+ CPDF_Stream* pStream = new CPDF_Stream(NULL, 0, pDic);
pStream->SetData(strClip.GetBuffer(), strClip.GetSize(), FALSE, FALSE);
CPDF_Document* pDoc = pPage->m_pDocument;
if (!pDoc)
@@ -315,7 +315,7 @@ DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,
CPDF_Array* pContentArray = NULL;
if (pContentObj && pContentObj->GetType() == PDFOBJ_ARRAY) {
pContentArray = (CPDF_Array*)pContentObj;
- CPDF_Reference* pRef = FX_NEW CPDF_Reference(pDoc, pStream->GetObjNum());
+ CPDF_Reference* pRef = new CPDF_Reference(pDoc, pStream->GetObjNum());
pContentArray->InsertAt(0, pRef);
} else if (pContentObj && pContentObj->GetType() == PDFOBJ_REFERENCE) {
@@ -325,11 +325,11 @@ DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page,
if (pDirectObj->GetType() == PDFOBJ_ARRAY) {
pContentArray = (CPDF_Array*)pDirectObj;
CPDF_Reference* pRef =
- FX_NEW CPDF_Reference(pDoc, pStream->GetObjNum());
+ new CPDF_Reference(pDoc, pStream->GetObjNum());
pContentArray->InsertAt(0, pRef);
} else if (pDirectObj->GetType() == PDFOBJ_STREAM) {
- pContentArray = FX_NEW CPDF_Array();
+ pContentArray = new CPDF_Array();
pContentArray->AddReference(pDoc, pStream->GetObjNum());
pContentArray->AddReference(pDoc, pDirectObj->GetObjNum());
pPageDic->SetAtReference("Contents", pDoc,
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp
index 4688e49412..0006094f1a 100644
--- a/fpdfsdk/src/fpdfdoc.cpp
+++ b/fpdfsdk/src/fpdfdoc.cpp
@@ -179,7 +179,7 @@ DLLEXPORT FPDF_LINK STDCALL FPDFLink_GetLinkAtPoint(FPDF_PAGE page,
CPDF_Document* pDoc = pPage->m_pDocument;
CPDF_LinkList* pLinkList = (CPDF_LinkList*)pDoc->GetPrivateData(&THISMODULE);
if (!pLinkList) {
- pLinkList = FX_NEW CPDF_LinkList(pDoc);
+ pLinkList = new CPDF_LinkList(pDoc);
pDoc->SetPrivateData(&THISMODULE, pLinkList, ReleaseLinkList);
}
return pLinkList->GetLinkAtPoint(pPage, (FX_FLOAT)x, (FX_FLOAT)y).GetDict();
diff --git a/fpdfsdk/src/fpdfeditimg.cpp b/fpdfsdk/src/fpdfeditimg.cpp
index bfd9adea36..f839d2c791 100644
--- a/fpdfsdk/src/fpdfeditimg.cpp
+++ b/fpdfsdk/src/fpdfeditimg.cpp
@@ -13,9 +13,9 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL
FPDFPageObj_NewImgeObj(FPDF_DOCUMENT document) {
if (!document)
return NULL;
- CPDF_ImageObject* pImageObj = FX_NEW CPDF_ImageObject;
+ CPDF_ImageObject* pImageObj = new CPDF_ImageObject;
CPDF_Image* pImg =
- FX_NEW CPDF_Image(((CPDFXFA_Document*)document)->GetPDFDoc());
+ new CPDF_Image(((CPDFXFA_Document*)document)->GetPDFDoc());
pImageObj->m_pImage = pImg;
return pImageObj;
}
@@ -28,7 +28,7 @@ FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages,
if (!image_object || !fileAccess || !pages)
return FALSE;
- IFX_FileRead* pFile = FX_NEW CPDF_CustomAccess(fileAccess);
+ IFX_FileRead* pFile = new CPDF_CustomAccess(fileAccess);
CPDF_ImageObject* pImgObj = (CPDF_ImageObject*)image_object;
pImgObj->m_GeneralState.GetModify();
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp
index a8447ce730..e158bee7e6 100644
--- a/fpdfsdk/src/fpdfeditpage.cpp
+++ b/fpdfsdk/src/fpdfeditpage.cpp
@@ -18,7 +18,7 @@
#endif
DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() {
- CPDF_Document* pDoc = FX_NEW CPDF_Document;
+ CPDF_Document* pDoc = new CPDF_Document;
if (!pDoc)
return NULL;
pDoc->CreateNewDoc();
@@ -42,11 +42,11 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() {
if (pInfoDict) {
if (FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS))
pInfoDict->SetAt("CreationDate", new CPDF_String(DateStr));
- pInfoDict->SetAt("Creator", FX_NEW CPDF_String(L"PDFium"));
+ pInfoDict->SetAt("Creator", new CPDF_String(L"PDFium"));
}
CPDFXFA_App* pApp = CPDFXFA_App::GetInstance();
- CPDFXFA_Document* document = FX_NEW CPDFXFA_Document(pDoc, pApp);
+ CPDFXFA_Document* document = new CPDFXFA_Document(pDoc, pApp);
return document;
}
@@ -79,22 +79,22 @@ DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document,
CPDF_Dictionary* pPageDict = pDoc->CreateNewPage(page_index);
if (!pPageDict)
return NULL;
- CPDF_Array* pMediaBoxArray = FX_NEW CPDF_Array;
- pMediaBoxArray->Add(FX_NEW CPDF_Number(0));
- pMediaBoxArray->Add(FX_NEW CPDF_Number(0));
- pMediaBoxArray->Add(FX_NEW CPDF_Number(FX_FLOAT(width)));
- pMediaBoxArray->Add(FX_NEW CPDF_Number(FX_FLOAT(height)));
+ CPDF_Array* pMediaBoxArray = new CPDF_Array;
+ pMediaBoxArray->Add(new CPDF_Number(0));
+ pMediaBoxArray->Add(new CPDF_Number(0));
+ pMediaBoxArray->Add(new CPDF_Number(FX_FLOAT(width)));
+ pMediaBoxArray->Add(new CPDF_Number(FX_FLOAT(height)));
pPageDict->SetAt("MediaBox", pMediaBoxArray);
- pPageDict->SetAt("Rotate", FX_NEW CPDF_Number(0));
- pPageDict->SetAt("Resources", FX_NEW CPDF_Dictionary);
+ pPageDict->SetAt("Rotate", new CPDF_Number(0));
+ pPageDict->SetAt("Resources", new CPDF_Dictionary);
- // CPDF_Page* pPage = FX_NEW CPDF_Page;
+ // CPDF_Page* pPage = new CPDF_Page;
// pPage->Load(pDoc,pPageDict);
// pPage->ParseContent();
CPDFXFA_Page* pPage =
- FX_NEW CPDFXFA_Page((CPDFXFA_Document*)document, page_index);
+ new CPDFXFA_Page((CPDFXFA_Document*)document, page_index);
pPage->LoadPDFPage(pPageDict);
return pPage;
@@ -288,7 +288,7 @@ DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
CPDF_PageObject* pPageObj = (CPDF_PageObject*)page_object;
if (pPageObj == NULL)
return;
- // PDF_ImageObject* pImageObj = FX_NEW CPDF_ImageObject;
+ // PDF_ImageObject* pImageObj = new CPDF_ImageObject;
CFX_AffineMatrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d,
(FX_FLOAT)e, (FX_FLOAT)f);
pPageObj->Transform(matrix);
@@ -345,5 +345,5 @@ DLLEXPORT void STDCALL FPDFPage_SetRotation(FPDF_PAGE page, int rotate) {
CPDF_Dictionary* pDict = pPage->m_pFormDict;
rotate %= 4;
- pDict->SetAt("Rotate", FX_NEW CPDF_Number(rotate * 90));
+ pDict->SetAt("Rotate", new CPDF_Number(rotate * 90));
}
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index 369f9b4279..abb8026a7f 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -299,7 +299,7 @@ DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,
options.m_BackColor = 0xffffff;
}
options.m_AddFlags = flags >> 8;
- options.m_pOCContext = FX_NEW CPDF_OCContext(pPDFDoc);
+ options.m_pOCContext = new CPDF_OCContext(pPDFDoc);
if (CPDFSDK_PageView* pPageView = pFXDoc->GetPageView((CPDFXFA_Page*)page))
pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, &clip);
@@ -496,7 +496,7 @@ FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document,
if (pXFAMenuHander == NULL)
return;
- CFX_ByteStringArray* sSuggestWords = FX_NEW CFX_ByteStringArray;
+ CFX_ByteStringArray* sSuggestWords = new CFX_ByteStringArray;
CFX_PointF ptPopup;
ptPopup.x = x;
ptPopup.y = y;
diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp
index 14f73095fa..f56cc442f0 100644
--- a/fpdfsdk/src/fpdfsave.cpp
+++ b/fpdfsdk/src/fpdfsave.cpp
@@ -171,12 +171,12 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument,
pContext->UpdateChecksum((IFX_FileRead*)pDsfileWrite);
pContext->FinishChecksum();
#endif
- CPDF_Dictionary* pDataDict = FX_NEW CPDF_Dictionary;
+ CPDF_Dictionary* pDataDict = new CPDF_Dictionary;
if (iDataSetsIndex != -1) {
if (pDataSetsStream)
pDataSetsStream->InitStream(pDsfileWrite, pDataDict);
} else {
- CPDF_Stream* pData = FX_NEW CPDF_Stream(NULL, 0, NULL);
+ CPDF_Stream* pData = new CPDF_Stream(NULL, 0, NULL);
pData->InitStream(pDsfileWrite, pDataDict);
FX_DWORD AppStreamobjnum = pPDFDocument->AddIndirectObject(pData);
CPDF_Reference* pRef =
@@ -202,12 +202,12 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument,
CFX_WideStringC(L"form"), pfileWrite,
pContext) &&
pfileWrite > 0) {
- CPDF_Dictionary* pDataDict = FX_NEW CPDF_Dictionary;
+ CPDF_Dictionary* pDataDict = new CPDF_Dictionary;
if (iFormIndex != -1) {
if (pFormStream)
pFormStream->InitStream(pfileWrite, pDataDict);
} else {
- CPDF_Stream* pData = FX_NEW CPDF_Stream(NULL, 0, NULL);
+ CPDF_Stream* pData = new CPDF_Stream(NULL, 0, NULL);
pData->InitStream(pfileWrite, pDataDict);
FX_DWORD AppStreamobjnum = pPDFDocument->AddIndirectObject(pData);
CPDF_Reference* pRef =
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 38a51f9ce2..a308f1727d 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -261,7 +261,7 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path,
return NULL;
CPDFXFA_App* pProvider = CPDFXFA_App::GetInstance();
- CPDFXFA_Document* pDocument = FX_NEW CPDFXFA_Document(pPDFDoc, pProvider);
+ CPDFXFA_Document* pDocument = new CPDFXFA_Document(pPDFDoc, pProvider);
return pDocument;
}
@@ -330,7 +330,7 @@ class CMemFile final : public IFX_FileRead {
DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadMemDocument(const void* data_buf,
int size,
FPDF_BYTESTRING password) {
- CPDF_Parser* pParser = FX_NEW CPDF_Parser;
+ CPDF_Parser* pParser = new CPDF_Parser;
pParser->SetPassword(password);
CMemFile* pMemFile = new CMemFile((uint8_t*)data_buf, size);
FX_DWORD err_code = pParser->StartParse(pMemFile);
@@ -347,16 +347,16 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadMemDocument(const void* data_buf,
return NULL;
CPDFXFA_App* pProvider = CPDFXFA_App::GetInstance();
- CPDFXFA_Document* pDocument = FX_NEW CPDFXFA_Document(pPDFDoc, pProvider);
+ CPDFXFA_Document* pDocument = new CPDFXFA_Document(pPDFDoc, pProvider);
return pDocument;
}
DLLEXPORT FPDF_DOCUMENT STDCALL
FPDF_LoadCustomDocument(FPDF_FILEACCESS* pFileAccess,
FPDF_BYTESTRING password) {
- CPDF_Parser* pParser = FX_NEW CPDF_Parser;
+ CPDF_Parser* pParser = new CPDF_Parser;
pParser->SetPassword(password);
- CPDF_CustomAccess* pFile = FX_NEW CPDF_CustomAccess(pFileAccess);
+ CPDF_CustomAccess* pFile = new CPDF_CustomAccess(pFileAccess);
FX_DWORD err_code = pParser->StartParse(pFile);
if (err_code) {
delete pParser;
@@ -371,7 +371,7 @@ FPDF_LoadCustomDocument(FPDF_FILEACCESS* pFileAccess,
return NULL;
CPDFXFA_App* pProvider = CPDFXFA_App::GetInstance();
- CPDFXFA_Document* pDocument = FX_NEW CPDFXFA_Document(pPDFDoc, pProvider);
+ CPDFXFA_Document* pDocument = new CPDFXFA_Document(pPDFDoc, pProvider);
return pDocument;
}
@@ -477,7 +477,7 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc,
if (!pPage)
return;
- CRenderContext* pContext = FX_NEW CRenderContext;
+ CRenderContext* pContext = new CRenderContext;
pPage->SetPrivateData((void*)1, pContext, DropContext);
#ifndef _WIN32_WCE
@@ -485,18 +485,18 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc,
FX_BOOL bBackgroundAlphaNeeded = FALSE;
bBackgroundAlphaNeeded = pPage->BackgroundAlphaNeeded();
if (bBackgroundAlphaNeeded) {
- pBitmap = FX_NEW CFX_DIBitmap;
+ pBitmap = new CFX_DIBitmap;
pBitmap->Create(size_x, size_y, FXDIB_Argb);
pBitmap->Clear(0x00ffffff);
#ifdef _SKIA_SUPPORT_
- pContext->m_pDevice = FX_NEW CFX_SkiaDevice;
+ pContext->m_pDevice = new CFX_SkiaDevice;
((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)pBitmap);
#else
- pContext->m_pDevice = FX_NEW CFX_FxgeDevice;
+ pContext->m_pDevice = new CFX_FxgeDevice;
((CFX_FxgeDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)pBitmap);
#endif
} else
- pContext->m_pDevice = FX_NEW CFX_WindowsDevice(dc);
+ pContext->m_pDevice = new CFX_WindowsDevice(dc);
FPDF_RenderPage_Retail(pContext, page, start_x, start_y, size_x, size_y,
rotate, flags, TRUE, NULL);
@@ -506,7 +506,7 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc,
CFX_WindowsDevice WinDC(dc);
if (WinDC.GetDeviceCaps(FXDC_DEVICE_CLASS) == FXDC_PRINTER) {
- CFX_DIBitmap* pDst = FX_NEW CFX_DIBitmap;
+ CFX_DIBitmap* pDst = new CFX_DIBitmap;
int pitch = pBitmap->GetPitch();
pDst->Create(size_x, size_y, FXDIB_Rgb32);
FXSYS_memset(pDst->GetBuffer(), -1, pitch * size_y);
@@ -639,10 +639,10 @@ DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap,
if (!pPage)
return;
- CRenderContext* pContext = FX_NEW CRenderContext;
+ CRenderContext* pContext = new CRenderContext;
pPage->SetPrivateData((void*)1, pContext, DropContext);
#ifdef _SKIA_SUPPORT_
- pContext->m_pDevice = FX_NEW CFX_SkiaDevice;
+ pContext->m_pDevice = new CFX_SkiaDevice;
if (flags & FPDF_REVERSE_BYTE_ORDER)
((CFX_SkiaDevice*)pContext->m_pDevice)
@@ -650,7 +650,7 @@ DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap,
else
((CFX_SkiaDevice*)pContext->m_pDevice)->Attach((CFX_DIBitmap*)bitmap);
#else
- pContext->m_pDevice = FX_NEW CFX_FxgeDevice;
+ pContext->m_pDevice = new CFX_FxgeDevice;
if (flags & FPDF_REVERSE_BYTE_ORDER)
((CFX_FxgeDevice*)pContext->m_pDevice)
@@ -856,18 +856,18 @@ void FPDF_RenderPage_Retail(CRenderContext* pContext,
pContext->m_pDevice->SaveState();
pContext->m_pDevice->SetClip_Rect(&clip);
- pContext->m_pContext = FX_NEW CPDF_RenderContext;
+ pContext->m_pContext = new CPDF_RenderContext;
pContext->m_pContext->Create(pPage);
pContext->m_pContext->AppendObjectList(pPage, &matrix);
if (flags & FPDF_ANNOT) {
- pContext->m_pAnnots = FX_NEW CPDF_AnnotList(pPage);
+ pContext->m_pAnnots = new CPDF_AnnotList(pPage);
FX_BOOL bPrinting = pContext->m_pDevice->GetDeviceClass() != FXDC_DISPLAY;
pContext->m_pAnnots->DisplayAnnots(pPage, pContext->m_pContext, bPrinting,
&matrix, TRUE, NULL);
}
- pContext->m_pRenderer = FX_NEW CPDF_ProgressiveRenderer;
+ pContext->m_pRenderer = new CPDF_ProgressiveRenderer;
pContext->m_pRenderer->Start(pContext->m_pContext, pContext->m_pDevice,
pContext->m_pOptions, pause);
if (bNeedToRestore) {
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
index a53381876a..5a233aa92a 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
@@ -17,7 +17,7 @@ CPDFXFA_App* CPDFXFA_App::g_pApp = NULL;
CPDFXFA_App* CPDFXFA_App::GetInstance() {
if (!g_pApp) {
- g_pApp = FX_NEW CPDFXFA_App();
+ g_pApp = new CPDFXFA_App();
}
return g_pApp;
}
@@ -551,6 +551,6 @@ IFWL_AdapterTimerMgr* CPDFXFA_App::GetTimerMgr() {
CXFA_FWLAdapterTimerMgr* pAdapter = NULL;
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
- pAdapter = FX_NEW CXFA_FWLAdapterTimerMgr(pEnv);
+ pAdapter = new CXFA_FWLAdapterTimerMgr(pEnv);
return pAdapter;
}
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
index 30be57e763..be3b235889 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
@@ -159,7 +159,7 @@ CPDFXFA_Page* CPDFXFA_Document::GetPage(int page_index) {
}
if (!pPage) {
- pPage = FX_NEW CPDFXFA_Page(this, page_index);
+ pPage = new CPDFXFA_Page(this, page_index);
FX_BOOL bRet = pPage->LoadPage();
if (!bRet) {
delete pPage;
@@ -649,7 +649,7 @@ void CPDFXFA_Document::SetTitle(IXFA_Doc* hDoc,
if (pInfoDict == NULL)
return;
- pInfoDict->SetAt("Title", FX_NEW CPDF_String(wsTitle));
+ pInfoDict->SetAt("Title", new CPDF_String(wsTitle));
}
void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFilePath,
@@ -767,7 +767,7 @@ content.GetLength());
}
CPDF_Stream* pStream = (CPDF_Stream*)pDirectObj;
- CPDF_StreamAcc* pAcc = FX_NEW CPDF_StreamAcc;
+ CPDF_StreamAcc* pAcc = new CPDF_StreamAcc;
pAcc->LoadAllData(pStream);
fileWrite.WriteBlock(pAcc->GetData(), fileWrite.GetSize(),
pAcc->GetSize());
@@ -998,7 +998,7 @@ IFX_FileRead* CPDFXFA_Document::OpenLinkedFile(IXFA_Doc* hDoc,
if (pFileHandler == NULL)
return NULL;
- CFPDF_FileStream* pFileRead = FX_NEW CFPDF_FileStream(pFileHandler);
+ CFPDF_FileStream* pFileRead = new CFPDF_FileStream(pFileHandler);
return pFileRead;
}
FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp
index f8fbbd4997..3197f2a5e7 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp
@@ -51,7 +51,7 @@ FX_BOOL CPDFXFA_Page::LoadPDFPage() {
m_pPDFPage = NULL;
}
- m_pPDFPage = FX_NEW CPDF_Page;
+ m_pPDFPage = new CPDF_Page;
m_pPDFPage->Load(pPDFDoc, pDict);
m_pPDFPage->ParseContent();
return TRUE;
@@ -113,7 +113,7 @@ FX_BOOL CPDFXFA_Page::LoadPDFPage(CPDF_Dictionary* pageDict) {
if (m_pPDFPage)
delete m_pPDFPage;
- m_pPDFPage = FX_NEW CPDF_Page();
+ m_pPDFPage = new CPDF_Page();
m_pPDFPage->Load(m_pDocument->GetPDFDoc(), pageDict);
m_pPDFPage->ParseContent();
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp
index 3e1eedf8ea..9db36c3920 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp
@@ -16,7 +16,7 @@ FWL_ERR CXFA_FWLAdapterTimerMgr::Start(IFWL_Timer* pTimer,
FX_BOOL bImmediately /* = TRUE */) {
if (m_pEnv) {
uint32_t uIDEvent = m_pEnv->FFI_SetTimer(dwElapse, TimerProc);
- CFWL_TimerInfo* pInfo = FX_NEW CFWL_TimerInfo;
+ CFWL_TimerInfo* pInfo = new CFWL_TimerInfo;
pInfo->uIDEvent = uIDEvent;
pInfo->pTimer = pTimer;
ms_timerArray.Add(pInfo);
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index 83cd49858b..126c7a7fdb 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -699,12 +699,12 @@ void CPDFSDK_BAAnnot::SetBorderWidth(int nWidth) {
CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArray("Border");
if (pBorder) {
- pBorder->SetAt(2, FX_NEW CPDF_Number(nWidth));
+ pBorder->SetAt(2, new CPDF_Number(nWidth));
} else {
CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDict("BS");
if (!pBSDict) {
- pBSDict = FX_NEW CPDF_Dictionary;
+ pBSDict = new CPDF_Dictionary;
m_pAnnot->GetAnnotDict()->SetAt("BS", pBSDict);
}
@@ -783,7 +783,7 @@ void CPDFSDK_BAAnnot::SetBorderDash(const CFX_IntArray& array) {
m_pAnnot->GetAnnotDict()->SetAt("BS", pBSDict);
}
- CPDF_Array* pArray = FX_NEW CPDF_Array;
+ CPDF_Array* pArray = new CPDF_Array;
for (int i = 0, sz = array.GetSize(); i < sz; i++) {
pArray->AddInteger(array[i]);
}
@@ -880,7 +880,7 @@ void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType,
} else {
CPDF_Dictionary* pAPTypeDict = pAPDict->GetDict(sAPType);
if (!pAPTypeDict) {
- pAPTypeDict = FX_NEW CPDF_Dictionary;
+ pAPTypeDict = new CPDF_Dictionary;
pAPDict->SetAt(sAPType, pAPTypeDict);
}
@@ -893,7 +893,7 @@ void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType,
CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
ASSERT(pDoc != NULL);
- pStream = FX_NEW CPDF_Stream(NULL, 0, NULL);
+ pStream = new CPDF_Stream(NULL, 0, NULL);
int32_t objnum = pDoc->AddIndirectObject(pStream);
// pAPDict->SetAtReference(sAPType, pDoc, objnum);
ASSERT(pParentDict != NULL);
@@ -903,7 +903,7 @@ void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType,
CPDF_Dictionary* pStreamDict = pStream->GetDict();
if (!pStreamDict) {
- pStreamDict = FX_NEW CPDF_Dictionary;
+ pStreamDict = new CPDF_Dictionary;
pStreamDict->SetAtName("Type", "XObject");
pStreamDict->SetAtName("Subtype", "Form");
pStreamDict->SetAtInteger("FormType", 1);
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 5c76149a0d..d06fcc0947 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -2013,12 +2013,12 @@ void CPDFSDK_Widget::AddImageToAppearance(const CFX_ByteString& sAPType,
CPDF_Dictionary* pStreamResList = pStreamDict->GetDict("Resources");
if (!pStreamResList) {
- pStreamResList = FX_NEW CPDF_Dictionary();
+ pStreamResList = new CPDF_Dictionary();
pStreamDict->SetAt("Resources", pStreamResList);
}
if (pStreamResList) {
- CPDF_Dictionary* pXObject = FX_NEW CPDF_Dictionary;
+ CPDF_Dictionary* pXObject = new CPDF_Dictionary;
pXObject->SetAtReference(sImageAlias, pDoc, pImage);
pStreamResList->SetAt("XObject", pXObject);
}
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index 4c75f1a4ca..760702e588 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -85,10 +85,10 @@ int JS_DefineObj(IJS_Runtime* pJSRuntime,
v8::HandleScope handle_scope(isolate);
CFX_PtrArray* pArray = (CFX_PtrArray*)isolate->GetData(g_embedderDataSlot);
if (!pArray) {
- pArray = FX_NEW CFX_PtrArray();
+ pArray = new CFX_PtrArray();
isolate->SetData(g_embedderDataSlot, pArray);
}
- CJS_ObjDefintion* pObjDef = FX_NEW CJS_ObjDefintion(
+ CJS_ObjDefintion* pObjDef = new CJS_ObjDefintion(
isolate, sObjName, eObjType, pConstructor, pDestructor);
pArray->Add(pObjDef);
return pArray->GetSize() - 1;
@@ -313,7 +313,7 @@ void JS_InitialRuntime(IJS_Runtime* pJSRuntime,
// Document is set as global object, need to construct it first.
CFX_WideString wsString(L"Document");
if (ws.Equal(wsString)) {
- CJS_PrivateData* pPrivateData = FX_NEW CJS_PrivateData;
+ CJS_PrivateData* pPrivateData = new CJS_PrivateData;
pPrivateData->ObjDefID = i;
v8Context->Global()
@@ -459,7 +459,7 @@ v8::Local<v8::Object> JS_NewFxDynamicObj(IJS_Runtime* pJSRuntime,
v8::Local<v8::Object> obj;
if (!objTemp->NewInstance(context).ToLocal(&obj))
return v8::Local<v8::Object>();
- CJS_PrivateData* pPrivateData = FX_NEW CJS_PrivateData;
+ CJS_PrivateData* pPrivateData = new CJS_PrivateData;
pPrivateData->ObjDefID = nObjDefnID;
obj->SetAlignedPointerInInternalField(0, pPrivateData);
diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
index 65fc9a6bd1..06ddeeb2a2 100644
--- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
@@ -31,7 +31,7 @@ void CPWL_FontMap::SetSystemHandler(IFX_SystemHandler* pSystemHandler) {
CPDF_Document* CPWL_FontMap::GetDocument() {
if (!m_pPDFDoc) {
if (CPDF_ModuleMgr::Get()) {
- m_pPDFDoc = FX_NEW CPDF_Document;
+ m_pPDFDoc = new CPDF_Document;
m_pPDFDoc->CreateNewDoc();
}
}