summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-16 16:00:24 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-16 16:00:24 -0700
commit6c949d13ad2543e28cf174ecf457b5adcdf213bf (patch)
treee3d442fe5a39352c5edf9cb4fb677f6a23d0db4b /xfa
parent3403db90496fc87269d7bb1d033347ee19fc0c38 (diff)
downloadpdfium-6c949d13ad2543e28cf174ecf457b5adcdf213bf.tar.xz
XFA: Write new as "new" rather than using several macros.
Really? R=thestig@chromium.org Review URL: https://codereview.chromium.org/1183193004.
Diffstat (limited to 'xfa')
-rw-r--r--xfa/src/fdp/include/fde_mem.h18
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.cpp2
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.h2
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.cpp10
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.h4
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.cpp6
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.cpp2
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.h2
-rw-r--r--xfa/src/fdp/src/fde/fde_gdidevice.cpp2
-rw-r--r--xfa/src/fdp/src/fde/fde_gdidevice.h2
-rw-r--r--xfa/src/fdp/src/fde/fde_gedevice.cpp4
-rw-r--r--xfa/src/fdp/src/fde/fde_gedevice.h2
-rw-r--r--xfa/src/fdp/src/fde/fde_geobject.cpp2
-rw-r--r--xfa/src/fdp/src/fde/fde_geobject.h2
-rw-r--r--xfa/src/fdp/src/fde/fde_iterator.cpp2
-rw-r--r--xfa/src/fdp/src/fde/fde_iterator.h2
-rw-r--r--xfa/src/fdp/src/fde/fde_object.cpp10
-rw-r--r--xfa/src/fdp/src/fde/fde_object.h10
-rw-r--r--xfa/src/fdp/src/fde/fde_render.cpp2
-rw-r--r--xfa/src/fdp/src/fde/fde_render.h2
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.cpp2
-rw-r--r--xfa/src/fdp/src/tto/fde_textout.h2
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.cpp38
-rw-r--r--xfa/src/fdp/src/xml/fde_xml.h20
-rw-r--r--xfa/src/fgas/include/fx_mem.h2
-rw-r--r--xfa/src/fgas/include/fx_utl.h10
-rw-r--r--xfa/src/fgas/src/crt/fx_memory.cpp8
-rw-r--r--xfa/src/fgas/src/crt/fx_memory.h8
-rw-r--r--xfa/src/fgas/src/crt/fx_utils.cpp12
-rw-r--r--xfa/src/fgas/src/font/fx_gefont.cpp8
-rw-r--r--xfa/src/fgas/src/layout/fx_textbreak.h4
31 files changed, 100 insertions, 102 deletions
diff --git a/xfa/src/fdp/include/fde_mem.h b/xfa/src/fdp/include/fde_mem.h
index a7eb40a9e2..27c6a29a0b 100644
--- a/xfa/src/fdp/include/fde_mem.h
+++ b/xfa/src/fdp/include/fde_mem.h
@@ -6,18 +6,18 @@
#ifndef _FDE_MEM
#define _FDE_MEM
+
+#include "../../../../core/include/fxcrt/fx_memory.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#define FDE_Alloc(size) FX_Alloc(uint8_t, size)
-#define FDE_Realloc(ptr, newSize) FX_Realloc(uint8_t, ptr, newSize)
-#define FDE_Free(ptr) FX_Free(ptr)
-#define FDE_New FXTARGET_New
-#define FDE_Delete FXTARGET_Delete
-#define FDE_NewWith FXTARGET_NewWith
-#define FDE_DeleteWith FXTARGET_DeleteWith
-
+#define FDE_Alloc(size) FX_Alloc(uint8_t, size)
+#define FDE_Realloc(ptr, newSize) FX_Realloc(uint8_t, ptr, newSize)
+#define FDE_Free(ptr) FX_Free(ptr)
#ifdef __cplusplus
-};
+}
+#define FDE_NewWith FXTARGET_NewWith
+#define FDE_DeleteWith FXTARGET_DeleteWith
#endif
#endif
diff --git a/xfa/src/fdp/src/css/fde_csscache.cpp b/xfa/src/fdp/src/css/fde_csscache.cpp
index b1207ae29e..92d3376e00 100644
--- a/xfa/src/fdp/src/css/fde_csscache.cpp
+++ b/xfa/src/fdp/src/css/fde_csscache.cpp
@@ -19,7 +19,7 @@ _FDE_CSSCACHEITEM::~_FDE_CSSCACHEITEM()
}
IFDE_CSSStyleSheetCache* IFDE_CSSStyleSheetCache::Create()
{
- return FDE_New CFDE_CSSStyleSheetCache;
+ return new CFDE_CSSStyleSheetCache;
}
CFDE_CSSStyleSheetCache::CFDE_CSSStyleSheetCache()
: m_pFixedStore(NULL)
diff --git a/xfa/src/fdp/src/css/fde_csscache.h b/xfa/src/fdp/src/css/fde_csscache.h
index 617009b398..d42305877e 100644
--- a/xfa/src/fdp/src/css/fde_csscache.h
+++ b/xfa/src/fdp/src/css/fde_csscache.h
@@ -19,7 +19,7 @@ public:
~CFDE_CSSStyleSheetCache();
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual void SetMaxItems(int32_t iMaxCount = 5)
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
index 6cb024cbf8..5bcb9db736 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
@@ -202,7 +202,7 @@ inline FDE_LPCSSRULEDATA CFDE_CSSRuleCollection::NewRuleData(IFDE_CSSSelector *p
}
IFDE_CSSStyleSelector* IFDE_CSSStyleSelector::Create()
{
- return FDE_New CFDE_CSSStyleSelector;
+ return new CFDE_CSSStyleSelector;
}
CFDE_CSSStyleSelector::CFDE_CSSStyleSelector()
: m_pFontMgr(NULL)
@@ -226,7 +226,7 @@ CFDE_CSSStyleSelector::~CFDE_CSSStyleSelector()
m_pFixedStyleStore->Release();
}
if (m_pAccelerator != NULL) {
- FDE_Delete m_pAccelerator;
+ delete m_pAccelerator;
}
}
void CFDE_CSSStyleSelector::SetFontMgr(IFX_FontMgr *pFontMgr)
@@ -241,7 +241,7 @@ void CFDE_CSSStyleSelector::SetDefFontSize(FX_FLOAT fFontSize)
IFDE_CSSAccelerator* CFDE_CSSStyleSelector::InitAccelerator()
{
if (m_pAccelerator == NULL) {
- m_pAccelerator = FDE_New CFDE_CSSAccelerator;
+ m_pAccelerator = new CFDE_CSSAccelerator;
FXSYS_assert(m_pAccelerator != NULL);
}
m_pAccelerator->Clear();
@@ -972,14 +972,14 @@ void CFDE_CSSStyleSelector::ApplyProperty(FDE_CSSPROPERTY eProperty, IFDE_CSSVal
break;
case FDE_CSSPROPERTY_CounterIncrement: {
if (FDE_CSSNONINHERITS.m_pCounterStyle == NULL) {
- FDE_CSSNONINHERITS.m_pCounterStyle = FDE_New CFDE_CSSCounterStyle;
+ FDE_CSSNONINHERITS.m_pCounterStyle = new CFDE_CSSCounterStyle;
}
FDE_CSSNONINHERITS.m_pCounterStyle->SetCounterIncrementList(pList);
}
break;
case FDE_CSSPROPERTY_CounterReset: {
if (FDE_CSSNONINHERITS.m_pCounterStyle == NULL) {
- FDE_CSSNONINHERITS.m_pCounterStyle = FDE_New CFDE_CSSCounterStyle;
+ FDE_CSSNONINHERITS.m_pCounterStyle = new CFDE_CSSCounterStyle;
}
FDE_CSSNONINHERITS.m_pCounterStyle->SetCounterResetList(pList);
}
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.h b/xfa/src/fdp/src/css/fde_cssstyleselector.h
index 9d1d02b333..2f12213d48 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.h
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.h
@@ -76,7 +76,7 @@ public:
~CFDE_CSSStyleSelector();
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual void SetFontMgr(IFX_FontMgr *pFontMgr);
@@ -355,7 +355,7 @@ public:
FX_DWORD dwRefCount = --m_dwRefCount;
if (dwRefCount == 0) {
if (m_NonInheritedData.m_pCounterStyle != NULL) {
- FDE_Delete m_NonInheritedData.m_pCounterStyle;
+ delete m_NonInheritedData.m_pCounterStyle;
}
FDE_DeleteWith(CFDE_CSSComputedStyle, m_pAllocator, this);
}
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
index dd692ec718..d40f20b1c4 100644
--- a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
@@ -25,7 +25,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadHTMLStandardStyleSheet()
}
IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream(const CFX_WideString &szUrl, IFX_Stream *pStream, FX_WORD wCodePage, FX_DWORD dwMediaList )
{
- CFDE_CSSStyleSheet *pStyleSheet = FDE_New CFDE_CSSStyleSheet(dwMediaList);
+ CFDE_CSSStyleSheet *pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList);
if (pStyleSheet == NULL) {
return NULL;
}
@@ -37,7 +37,7 @@ IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromStream(const CFX_WideString &szU
}
IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadFromBuffer(const CFX_WideString &szUrl, const FX_WCHAR* pBuffer, int32_t iBufSize, FX_WORD wCodePage, FX_DWORD dwMediaList )
{
- CFDE_CSSStyleSheet *pStyleSheet = FDE_New CFDE_CSSStyleSheet(dwMediaList);
+ CFDE_CSSStyleSheet *pStyleSheet = new CFDE_CSSStyleSheet(dwMediaList);
if (pStyleSheet == NULL) {
return NULL;
}
@@ -94,7 +94,7 @@ FX_DWORD CFDE_CSSStyleSheet::Release()
{
FX_DWORD dwRefCount = --m_wRefCount;
if (dwRefCount == 0) {
- FDE_Delete this;
+ delete this;
}
return dwRefCount;
}
diff --git a/xfa/src/fdp/src/css/fde_csssyntax.cpp b/xfa/src/fdp/src/css/fde_csssyntax.cpp
index 058c7c0a3c..1967007648 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.cpp
+++ b/xfa/src/fdp/src/css/fde_csssyntax.cpp
@@ -21,7 +21,7 @@ extern "C" {
#endif
IFDE_CSSSyntaxParser* IFDE_CSSSyntaxParser::Create()
{
- return FDE_New CFDE_CSSSyntaxParser;
+ return new CFDE_CSSSyntaxParser;
}
CFDE_CSSSyntaxParser::CFDE_CSSSyntaxParser()
: m_pStream(NULL)
diff --git a/xfa/src/fdp/src/css/fde_csssyntax.h b/xfa/src/fdp/src/css/fde_csssyntax.h
index 6071b76910..6463d8a9ff 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.h
+++ b/xfa/src/fdp/src/css/fde_csssyntax.h
@@ -94,7 +94,7 @@ public:
~CFDE_CSSSyntaxParser();
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual FX_BOOL Init(IFX_Stream *pStream, int32_t iCSSPlaneSize, int32_t iTextDataSize = 32, FX_BOOL bOnlyDeclaration = FALSE);
virtual FX_BOOL Init(const FX_WCHAR* pBuffer, int32_t iBufferSize, int32_t iTextDatSize = 32, FX_BOOL bOnlyDeclaration = FALSE);
diff --git a/xfa/src/fdp/src/fde/fde_gdidevice.cpp b/xfa/src/fdp/src/fde/fde_gdidevice.cpp
index 7f773efd96..03bbb23fc7 100644
--- a/xfa/src/fdp/src/fde/fde_gdidevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gdidevice.cpp
@@ -11,7 +11,7 @@
#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || _FX_OS_ == _FX_WIN64_
IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_DIBitmap *pBitmap, FX_BOOL bRgbByteOrder )
{
- return FDE_New CFDE_GdiDevice(pBitmap);
+ return new CFDE_GdiDevice(pBitmap);
}
IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_RenderDevice *pDevice)
{
diff --git a/xfa/src/fdp/src/fde/fde_gdidevice.h b/xfa/src/fdp/src/fde/fde_gdidevice.h
index f7336c9b0a..25ae837481 100644
--- a/xfa/src/fdp/src/fde/fde_gdidevice.h
+++ b/xfa/src/fdp/src/fde/fde_gdidevice.h
@@ -17,7 +17,7 @@ public:
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual int32_t GetWidth() const;
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.cpp b/xfa/src/fdp/src/fde/fde_gedevice.cpp
index 9e475cdb67..c8e7c23fac 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.cpp
+++ b/xfa/src/fdp/src/fde/fde_gedevice.cpp
@@ -35,14 +35,14 @@ IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_DIBitmap *pBitmap, FX_BOOL bRgb
return NULL;
}
pDevice->Attach(pBitmap, 0, bRgbByteOrder);
- return FDE_New CFDE_FxgeDevice(pDevice, TRUE);
+ return new CFDE_FxgeDevice(pDevice, TRUE);
}
IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_RenderDevice *pDevice)
{
if (pDevice == NULL) {
return NULL;
}
- return FDE_New CFDE_FxgeDevice(pDevice, FALSE);
+ return new CFDE_FxgeDevice(pDevice, FALSE);
}
CFDE_FxgeDevice::CFDE_FxgeDevice(CFX_RenderDevice *pDevice, FX_BOOL bOwnerDevice)
: m_pDevice(pDevice)
diff --git a/xfa/src/fdp/src/fde/fde_gedevice.h b/xfa/src/fdp/src/fde/fde_gedevice.h
index ab16cc7cae..39fa62667e 100644
--- a/xfa/src/fdp/src/fde/fde_gedevice.h
+++ b/xfa/src/fdp/src/fde/fde_gedevice.h
@@ -14,7 +14,7 @@ public:
~CFDE_FxgeDevice();
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual int32_t GetWidth() const;
diff --git a/xfa/src/fdp/src/fde/fde_geobject.cpp b/xfa/src/fdp/src/fde/fde_geobject.cpp
index 819563619e..e199a3ad5d 100644
--- a/xfa/src/fdp/src/fde/fde_geobject.cpp
+++ b/xfa/src/fdp/src/fde/fde_geobject.cpp
@@ -10,7 +10,7 @@
#ifndef _FDEPLUS
IFDE_Path* IFDE_Path::Create()
{
- return FDE_New CFDE_Path;
+ return new CFDE_Path;
}
FX_BOOL CFDE_Path::StartFigure()
{
diff --git a/xfa/src/fdp/src/fde/fde_geobject.h b/xfa/src/fdp/src/fde/fde_geobject.h
index 3b1b22901d..fd9e29a4e5 100644
--- a/xfa/src/fdp/src/fde/fde_geobject.h
+++ b/xfa/src/fdp/src/fde/fde_geobject.h
@@ -14,7 +14,7 @@ class CFDE_Path : public IFDE_Path, public CFX_Target
public:
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual FX_BOOL StartFigure();
diff --git a/xfa/src/fdp/src/fde/fde_iterator.cpp b/xfa/src/fdp/src/fde/fde_iterator.cpp
index 5f6e0aa7e8..e49fdafe95 100644
--- a/xfa/src/fdp/src/fde/fde_iterator.cpp
+++ b/xfa/src/fdp/src/fde/fde_iterator.cpp
@@ -8,7 +8,7 @@
#include "fde_iterator.h"
IFDE_VisualSetIterator* IFDE_VisualSetIterator::Create()
{
- return FDE_New CFDE_VisualSetIterator;
+ return new CFDE_VisualSetIterator;
}
CFDE_VisualSetIterator::CFDE_VisualSetIterator()
: m_dwFilter(0)
diff --git a/xfa/src/fdp/src/fde/fde_iterator.h b/xfa/src/fdp/src/fde/fde_iterator.h
index 6ebd5c566f..ec8f0abf62 100644
--- a/xfa/src/fdp/src/fde/fde_iterator.h
+++ b/xfa/src/fdp/src/fde/fde_iterator.h
@@ -18,7 +18,7 @@ public:
~CFDE_VisualSetIterator();
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual FX_BOOL AttachCanvas(IFDE_CanvasSet *pCanvas);
diff --git a/xfa/src/fdp/src/fde/fde_object.cpp b/xfa/src/fdp/src/fde/fde_object.cpp
index 71a1b43991..447067db29 100644
--- a/xfa/src/fdp/src/fde/fde_object.cpp
+++ b/xfa/src/fdp/src/fde/fde_object.cpp
@@ -8,19 +8,19 @@
#include "fde_object.h"
IFDE_Pen* IFDE_Pen::Create()
{
- return FDE_New CFDE_Pen();
+ return new CFDE_Pen();
}
IFDE_Brush* IFDE_Brush::Create(int32_t iType)
{
switch (iType) {
case FDE_BRUSHTYPE_Solid:
- return FDE_New CFDE_SolidBrush;
+ return new CFDE_SolidBrush;
case FDE_BRUSHTYPE_Hatch:
- return FDE_New CFDE_HatchBrush;
+ return new CFDE_HatchBrush;
case FDE_BRUSHTYPE_Texture:
- return FDE_New CFDE_TextureBrush;
+ return new CFDE_TextureBrush;
case FDE_BRUSHTYPE_LinearGradient:
- return FDE_New CFDE_LinearBrush;
+ return new CFDE_LinearBrush;
default:
return NULL;
}
diff --git a/xfa/src/fdp/src/fde/fde_object.h b/xfa/src/fdp/src/fde/fde_object.h
index 190865f612..26100c7571 100644
--- a/xfa/src/fdp/src/fde/fde_object.h
+++ b/xfa/src/fdp/src/fde/fde_object.h
@@ -29,7 +29,7 @@ public:
}
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual int32_t GetType() const
@@ -144,7 +144,7 @@ public:
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual int32_t GetType() const
{
@@ -200,7 +200,7 @@ public:
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual int32_t GetType() const
{
@@ -274,7 +274,7 @@ public:
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual int32_t GetType() const
{
@@ -341,7 +341,7 @@ public:
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual int32_t GetType() const
{
diff --git a/xfa/src/fdp/src/fde/fde_render.cpp b/xfa/src/fdp/src/fde/fde_render.cpp
index 7feca48ab8..ff8dceea3f 100644
--- a/xfa/src/fdp/src/fde/fde_render.cpp
+++ b/xfa/src/fdp/src/fde/fde_render.cpp
@@ -45,7 +45,7 @@ void FDE_GetPageMatrix(CFX_Matrix &pageMatrix, const CFX_RectF &docPageRect, con
}
IFDE_RenderContext* IFDE_RenderContext::Create()
{
- return FDE_New CFDE_RenderContext;
+ return new CFDE_RenderContext;
}
CFDE_RenderContext::CFDE_RenderContext()
: CFX_ThreadLock()
diff --git a/xfa/src/fdp/src/fde/fde_render.h b/xfa/src/fdp/src/fde/fde_render.h
index 6bec3e070f..52c95c50a8 100644
--- a/xfa/src/fdp/src/fde/fde_render.h
+++ b/xfa/src/fdp/src/fde/fde_render.h
@@ -14,7 +14,7 @@ public:
virtual ~CFDE_RenderContext();
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual FX_BOOL StartRender(IFDE_RenderDevice *pRenderDevice,
IFDE_CanvasSet *pCanvasSet,
diff --git a/xfa/src/fdp/src/tto/fde_textout.cpp b/xfa/src/fdp/src/tto/fde_textout.cpp
index 7b7ea1c63b..966cc83fba 100644
--- a/xfa/src/fdp/src/tto/fde_textout.cpp
+++ b/xfa/src/fdp/src/tto/fde_textout.cpp
@@ -8,7 +8,7 @@
#include "fde_textout.h"
IFDE_TextOut* IFDE_TextOut::Create()
{
- return FDE_New CFDE_TextOut;
+ return new CFDE_TextOut;
}
CFDE_TextOut::CFDE_TextOut()
: m_pFont(NULL)
diff --git a/xfa/src/fdp/src/tto/fde_textout.h b/xfa/src/fdp/src/tto/fde_textout.h
index c7a46e3d73..f51f8b39c0 100644
--- a/xfa/src/fdp/src/tto/fde_textout.h
+++ b/xfa/src/fdp/src/tto/fde_textout.h
@@ -39,7 +39,7 @@ public:
~CFDE_TextOut();
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual void SetFont(IFX_Font *pFont);
virtual void SetFontSize(FX_FLOAT fFontSize);
diff --git a/xfa/src/fdp/src/xml/fde_xml.cpp b/xfa/src/fdp/src/xml/fde_xml.cpp
index 989969633b..6a8118a884 100644
--- a/xfa/src/fdp/src/xml/fde_xml.cpp
+++ b/xfa/src/fdp/src/xml/fde_xml.cpp
@@ -520,7 +520,7 @@ void CFDE_XMLNode::CloneChildren(CFDE_XMLNode* pClone)
}
IFDE_XMLInstruction* IFDE_XMLInstruction::Create(const CFX_WideString &wsTarget)
{
- return (IFDE_XMLInstruction*)FDE_New CFDE_XMLInstruction(wsTarget);
+ return (IFDE_XMLInstruction*)new CFDE_XMLInstruction(wsTarget);
}
CFDE_XMLInstruction::CFDE_XMLInstruction(const CFX_WideString &wsTarget)
: CFDE_XMLNode()
@@ -532,7 +532,7 @@ CFDE_XMLInstruction::CFDE_XMLInstruction(const CFX_WideString &wsTarget)
}
CFDE_XMLNode* CFDE_XMLInstruction::Clone(FX_BOOL bRecursive)
{
- CFDE_XMLInstruction* pClone = FDE_New CFDE_XMLInstruction(m_wsTarget);
+ CFDE_XMLInstruction* pClone = new CFDE_XMLInstruction(m_wsTarget);
if (!pClone) {
return pClone;
}
@@ -661,7 +661,7 @@ void CFDE_XMLInstruction::RemoveData(int32_t index)
}
IFDE_XMLElement* IFDE_XMLElement::Create(const CFX_WideString &wsTag)
{
- return (IFDE_XMLElement*)FDE_New CFDE_XMLElement(wsTag);
+ return (IFDE_XMLElement*)new CFDE_XMLElement(wsTag);
}
CFDE_XMLElement::CFDE_XMLElement(const CFX_WideString &wsTag)
: CFDE_XMLNode()
@@ -676,7 +676,7 @@ CFDE_XMLElement::~CFDE_XMLElement()
}
CFDE_XMLNode* CFDE_XMLElement::Clone(FX_BOOL bRecursive)
{
- CFDE_XMLElement* pClone = FDE_New CFDE_XMLElement(m_wsTag);
+ CFDE_XMLElement* pClone = new CFDE_XMLElement(m_wsTag);
if (!pClone) {
return NULL;
}
@@ -865,11 +865,11 @@ void CFDE_XMLElement::SetTextData(const CFX_WideString &wsText)
if (wsText.GetLength() < 1) {
return;
}
- InsertChildNode(FDE_New CFDE_XMLText(wsText));
+ InsertChildNode(new CFDE_XMLText(wsText));
}
IFDE_XMLText* IFDE_XMLText::Create(const CFX_WideString &wsText)
{
- return (IFDE_XMLText*)FDE_New CFDE_XMLText(wsText);
+ return (IFDE_XMLText*)new CFDE_XMLText(wsText);
}
CFDE_XMLText::CFDE_XMLText(const CFX_WideString &wsText)
: CFDE_XMLNode()
@@ -878,12 +878,12 @@ CFDE_XMLText::CFDE_XMLText(const CFX_WideString &wsText)
}
CFDE_XMLNode* CFDE_XMLText::Clone(FX_BOOL bRecursive)
{
- CFDE_XMLText* pClone = FDE_New CFDE_XMLText(m_wsText);
+ CFDE_XMLText* pClone = new CFDE_XMLText(m_wsText);
return pClone;
}
IFDE_XMLCharData* IFDE_XMLCharData::Create(const CFX_WideString &wsCData)
{
- return (IFDE_XMLCharData*)FDE_New CFDE_XMLCharData(wsCData);
+ return (IFDE_XMLCharData*)new CFDE_XMLCharData(wsCData);
}
CFDE_XMLCharData::CFDE_XMLCharData(const CFX_WideString &wsCData)
: CFDE_XMLDeclaration()
@@ -892,12 +892,12 @@ CFDE_XMLCharData::CFDE_XMLCharData(const CFX_WideString &wsCData)
}
CFDE_XMLNode* CFDE_XMLCharData::Clone(FX_BOOL bRecursive)
{
- CFDE_XMLCharData* pClone = FDE_New CFDE_XMLCharData(m_wsCharData);
+ CFDE_XMLCharData* pClone = new CFDE_XMLCharData(m_wsCharData);
return pClone;
}
IFDE_XMLDoc* IFDE_XMLDoc::Create()
{
- return (IFDE_XMLDoc*)FDE_New CFDE_XMLDoc;
+ return (IFDE_XMLDoc*)new CFDE_XMLDoc;
}
CFDE_XMLDoc::CFDE_XMLDoc()
: m_pRoot(NULL)
@@ -905,7 +905,7 @@ CFDE_XMLDoc::CFDE_XMLDoc()
, m_pXMLParser(NULL)
{
Reset(TRUE);
- CFDE_XMLInstruction *pXML = FDE_New CFDE_XMLInstruction(L"xml");
+ CFDE_XMLInstruction *pXML = new CFDE_XMLInstruction(L"xml");
m_pRoot->InsertChildNode(pXML);
}
CFDE_XMLDoc::~CFDE_XMLDoc()
@@ -918,7 +918,7 @@ void CFDE_XMLDoc::Reset(FX_BOOL bInitRoot)
m_pStream = NULL;
if (bInitRoot) {
if (m_pRoot == NULL) {
- m_pRoot = FDE_New CFDE_XMLNode;
+ m_pRoot = new CFDE_XMLNode;
} else {
m_pRoot->DeleteChildren();
}
@@ -974,9 +974,9 @@ FX_BOOL CFDE_XMLDoc::LoadXML(IFX_Stream *pXMLStream, int32_t iXMLPlaneSize , int
}
m_pSyntaxParser->Init(m_pStream, iXMLPlaneSize, iTextDataSize);
if (pHandler == NULL) {
- m_pXMLParser = FDE_New CFDE_XMLDOMParser(m_pRoot, m_pSyntaxParser);
+ m_pXMLParser = new CFDE_XMLDOMParser(m_pRoot, m_pSyntaxParser);
} else {
- m_pXMLParser = FDE_New CFDE_XMLSAXParser(pHandler, m_pSyntaxParser);
+ m_pXMLParser = new CFDE_XMLSAXParser(pHandler, m_pSyntaxParser);
}
return m_pXMLParser != NULL;
}
@@ -1201,13 +1201,13 @@ int32_t CFDE_XMLDOMParser::DoParser(IFX_Pause *pPause)
break;
case FDE_XMLSYNTAXSTATUS_TargetName:
m_pParser->GetTargetName(m_ws1);
- m_pChild = FDE_New CFDE_XMLInstruction(m_ws1);
+ m_pChild = new CFDE_XMLInstruction(m_ws1);
m_pParent->InsertChildNode(m_pChild);
m_ws1.Empty();
break;
case FDE_XMLSYNTAXSTATUS_TagName:
m_pParser->GetTagName(m_ws1);
- m_pChild = FDE_New CFDE_XMLElement(m_ws1);
+ m_pChild = new CFDE_XMLElement(m_ws1);
m_pParent->InsertChildNode(m_pChild);
m_NodeStack.Push(m_pChild);
m_pParent = m_pChild;
@@ -1230,13 +1230,13 @@ int32_t CFDE_XMLDOMParser::DoParser(IFX_Pause *pPause)
break;
case FDE_XMLSYNTAXSTATUS_Text:
m_pParser->GetTextData(m_ws1);
- m_pChild = FDE_New CFDE_XMLText(m_ws1);
+ m_pChild = new CFDE_XMLText(m_ws1);
m_pParent->InsertChildNode(m_pChild);
m_pChild = m_pParent;
break;
case FDE_XMLSYNTAXSTATUS_CData:
m_pParser->GetTextData(m_ws1);
- m_pChild = FDE_New CFDE_XMLCharData(m_ws1);
+ m_pChild = new CFDE_XMLCharData(m_ws1);
m_pParent->InsertChildNode(m_pChild);
m_pChild = m_pParent;
break;
@@ -1534,7 +1534,7 @@ void CFDE_BlockBuffer::ClearBuffer()
#endif
IFDE_XMLSyntaxParser* IFDE_XMLSyntaxParser::Create()
{
- return FDE_New CFDE_XMLSyntaxParser;
+ return new CFDE_XMLSyntaxParser;
}
#ifdef _FDE_BLOCK_BUFFER
CFDE_XMLSyntaxParser::CFDE_XMLSyntaxParser()
diff --git a/xfa/src/fdp/src/xml/fde_xml.h b/xfa/src/fdp/src/xml/fde_xml.h
index b158e0d80c..ddb94743d9 100644
--- a/xfa/src/fdp/src/xml/fde_xml.h
+++ b/xfa/src/fdp/src/xml/fde_xml.h
@@ -25,7 +25,7 @@ public:
CFDE_XMLNode();
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual FDE_XMLNODETYPE GetType() const
{
@@ -58,7 +58,7 @@ public:
CFDE_XMLInstruction(const CFX_WideString &wsTarget);
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual FDE_XMLNODETYPE GetType() const
{
@@ -95,7 +95,7 @@ public:
CFDE_XMLElement(const CFX_WideString &wsTag);
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual FDE_XMLNODETYPE GetType() const
{
@@ -129,7 +129,7 @@ public:
CFDE_XMLText(const CFX_WideString &wsText);
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual FDE_XMLNODETYPE GetType() const
{
@@ -160,7 +160,7 @@ public:
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual FDE_XMLNODETYPE GetType() const
{
@@ -188,7 +188,7 @@ public:
~CFDE_XMLDoc();
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual FX_BOOL LoadXML(IFX_Stream *pXMLStream, int32_t iXMLPlaneSize = 8192, int32_t iTextDataSize = 256, FDE_LPXMLREADERHANDLER pHandler = NULL);
virtual FX_BOOL LoadXML(IFDE_XMLParser *pXMLParser);
@@ -218,7 +218,7 @@ public:
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual int32_t DoParser(IFX_Pause *pPause);
private:
@@ -247,7 +247,7 @@ public:
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual int32_t DoParser(IFX_Pause *pPause);
private:
@@ -274,7 +274,7 @@ public:
}
void ReleaseBuffer()
{
- FDE_Delete this;
+ delete this;
}
FX_WCHAR* GetAvailableBlock(int32_t& iIndexInBlock);
inline int32_t GetAllocStep() const
@@ -332,7 +332,7 @@ public:
~CFDE_XMLSyntaxParser();
virtual void Release()
{
- FDE_Delete this;
+ delete this;
}
virtual void Init(IFX_Stream *pStream, int32_t iXMLPlaneSize, int32_t iTextDataSize = 256);
virtual FX_DWORD DoSyntaxParse();
diff --git a/xfa/src/fgas/include/fx_mem.h b/xfa/src/fgas/include/fx_mem.h
index 265c582884..c8875e185d 100644
--- a/xfa/src/fgas/include/fx_mem.h
+++ b/xfa/src/fgas/include/fx_mem.h
@@ -51,8 +51,6 @@ public:
}
void operator delete(void *p, void *place) {}
};
-#define FXTARGET_New new
#define FXTARGET_NewWith(__allocator__) new(__allocator__)
-#define FXTARGET_Delete delete
#define FXTARGET_DeleteWith(__class__, __allocator__, pointer) {(pointer)->~__class__(); (pointer)->operator delete((pointer), (__allocator__));}
#endif
diff --git a/xfa/src/fgas/include/fx_utl.h b/xfa/src/fgas/include/fx_utl.h
index 38342a8cc8..2e4ad41842 100644
--- a/xfa/src/fgas/include/fx_utl.h
+++ b/xfa/src/fgas/include/fx_utl.h
@@ -132,7 +132,7 @@ public:
{
int32_t index = CFX_BaseArray::GetSize();
baseType *p = (baseType*)CFX_BaseArray::AddSpaceTo(index);
- FXTARGET_New ((void*)p)baseType(element);
+ new ((void*)p) baseType(element);
return index;
}
baseType& GetAt(int32_t index) const
@@ -194,7 +194,7 @@ public:
int32_t iBlockSize = CFX_BaseArray::GetBlockSize();
iSize = iStart + iCount;
for (int32_t i = iStart; i < iSize; i ++) {
- FXTARGET_New ((void*)pStart)baseType(src.GetAt(i));
+ new ((void*)pStart)baseType(src.GetAt(i));
pStart += iBlockSize;
}
return iCount;
@@ -312,7 +312,7 @@ public:
{
int32_t index = CFX_BaseMassArray::GetSize();
baseType *p = (baseType*)CFX_BaseMassArray::AddSpaceTo(index);
- FXTARGET_New ((void*)p)baseType(element);
+ new ((void*)p)baseType(element);
return index;
}
baseType& GetAt(int32_t index) const
@@ -483,7 +483,7 @@ public:
{
int32_t index = CFX_BaseStack::GetSize();
baseType *p = (baseType*)CFX_BaseStack::Push();
- FXTARGET_New ((void*)p)baseType(element);
+ new ((void*)p)baseType(element);
return index;
}
void Pop()
@@ -780,7 +780,7 @@ public:
if (pParent == NULL) {
pParent = &m_Root;
}
- CPLTreeNode *pChild = FXTARGET_New CPLTreeNode;
+ CPLTreeNode *pChild = new CPLTreeNode;
pChild->SetParentNode(pParent);
pChild->SetData(data);
if (pParent->m_pChildNode == NULL) {
diff --git a/xfa/src/fgas/src/crt/fx_memory.cpp b/xfa/src/fgas/src/crt/fx_memory.cpp
index 6d34a03e0c..69960e13ae 100644
--- a/xfa/src/fgas/src/crt/fx_memory.cpp
+++ b/xfa/src/fgas/src/crt/fx_memory.cpp
@@ -12,14 +12,14 @@ IFX_MEMAllocator* FX_CreateAllocator(FX_ALLOCTYPE eType, size_t chunkSize, size_
switch (eType) {
#ifndef _FXEMB
case FX_ALLOCTYPE_Dynamic:
- return FXTARGET_New CFX_DynamicStore(chunkSize);
+ return new CFX_DynamicStore(chunkSize);
#endif
case FX_ALLOCTYPE_Default:
- return FXTARGET_New CFX_DefStore();
+ return new CFX_DefStore();
case FX_ALLOCTYPE_Static:
- return FXTARGET_New CFX_StaticStore(chunkSize);
+ return new CFX_StaticStore(chunkSize);
case FX_ALLOCTYPE_Fixed:
- return FXTARGET_New CFX_FixedStore(blockSize, chunkSize);
+ return new CFX_FixedStore(blockSize, chunkSize);
default:
return NULL;
}
diff --git a/xfa/src/fgas/src/crt/fx_memory.h b/xfa/src/fgas/src/crt/fx_memory.h
index 9ce8d2f11c..eabfec559a 100644
--- a/xfa/src/fgas/src/crt/fx_memory.h
+++ b/xfa/src/fgas/src/crt/fx_memory.h
@@ -17,7 +17,7 @@ public:
~CFX_DefStore() {}
virtual void Release()
{
- FXTARGET_Delete this;
+ delete this;
}
virtual void* Alloc(size_t size)
{
@@ -63,7 +63,7 @@ public:
~CFX_StaticStore();
virtual void Release()
{
- FXTARGET_Delete this;
+ delete this;
}
virtual void* Alloc(size_t size);
virtual void Free(void* pBlock) {}
@@ -115,7 +115,7 @@ public:
virtual ~CFX_FixedStore();
virtual void Release()
{
- FXTARGET_Delete this;
+ delete this;
}
virtual void* Alloc(size_t size);
virtual void Free(void* pBlock);
@@ -174,7 +174,7 @@ public:
virtual ~CFX_DynamicStore();
virtual void Release()
{
- FXTARGET_Delete this;
+ delete this;
}
virtual void* Alloc(size_t size);
virtual void Free(void* pBlock);
diff --git a/xfa/src/fgas/src/crt/fx_utils.cpp b/xfa/src/fgas/src/crt/fx_utils.cpp
index 85f650b1d1..a4b18779b1 100644
--- a/xfa/src/fgas/src/crt/fx_utils.cpp
+++ b/xfa/src/fgas/src/crt/fx_utils.cpp
@@ -30,7 +30,7 @@ typedef FX_BASEARRAYDATA const * FX_LPCBASEARRAYDATA;
CFX_BaseArray::CFX_BaseArray(int32_t iGrowSize, int32_t iBlockSize)
{
FXSYS_assert(iGrowSize > 0 && iBlockSize > 0);
- m_pData = FXTARGET_New FX_BASEARRAYDATA;
+ m_pData = new FX_BASEARRAYDATA;
FX_memset(m_pData, 0, sizeof(FX_BASEARRAYDATA));
((FX_LPBASEARRAYDATA)m_pData)->iGrowSize = iGrowSize;
((FX_LPBASEARRAYDATA)m_pData)->iBlockSize = iBlockSize;
@@ -41,7 +41,7 @@ CFX_BaseArray::~CFX_BaseArray()
if (pData->pBuffer != NULL) {
FX_Free(pData->pBuffer);
}
- FXTARGET_Delete pData;
+ delete pData;
}
int32_t CFX_BaseArray::GetSize() const
{
@@ -306,11 +306,11 @@ void CFX_BaseMassArrayImp::RemoveAll(FX_BOOL bLeaveMemory)
}
CFX_BaseMassArray::CFX_BaseMassArray(int32_t iChunkSize, int32_t iBlockSize)
{
- m_pData = FXTARGET_New CFX_BaseMassArrayImp(iChunkSize, iBlockSize);
+ m_pData = new CFX_BaseMassArrayImp(iChunkSize, iBlockSize);
}
CFX_BaseMassArray::~CFX_BaseMassArray()
{
- FXTARGET_Delete m_pData;
+ delete m_pData;
}
int32_t CFX_BaseMassArray::GetSize() const
{
@@ -416,11 +416,11 @@ void CFX_BaseDiscreteArray::RemoveAll()
}
CFX_BaseStack::CFX_BaseStack(int32_t iChunkSize, int32_t iBlockSize)
{
- m_pData = FXTARGET_New CFX_BaseMassArrayImp(iChunkSize, iBlockSize);
+ m_pData = new CFX_BaseMassArrayImp(iChunkSize, iBlockSize);
}
CFX_BaseStack::~CFX_BaseStack()
{
- FXTARGET_Delete (CFX_BaseMassArrayImp*)m_pData;
+ delete (CFX_BaseMassArrayImp*)m_pData;
}
uint8_t* CFX_BaseStack::Push()
{
diff --git a/xfa/src/fgas/src/font/fx_gefont.cpp b/xfa/src/fgas/src/font/fx_gefont.cpp
index c9948cfa4f..e0ad4a9260 100644
--- a/xfa/src/fgas/src/font/fx_gefont.cpp
+++ b/xfa/src/fgas/src/font/fx_gefont.cpp
@@ -155,10 +155,10 @@ CFX_GEFont::~CFX_GEFont()
delete m_pFontEncoding;
}
if (m_pCharWidthMap != NULL) {
- FXTARGET_Delete m_pCharWidthMap;
+ delete m_pCharWidthMap;
}
if (m_pRectArray != NULL) {
- FXTARGET_Delete m_pRectArray;
+ delete m_pRectArray;
}
if (m_pBBoxMap != NULL) {
delete m_pBBoxMap;
@@ -339,10 +339,10 @@ void CFX_GEFont::InitFont()
#endif
}
if (m_pCharWidthMap == NULL) {
- m_pCharWidthMap = FXTARGET_New CFX_WordDiscreteArray(1024);
+ m_pCharWidthMap = new CFX_WordDiscreteArray(1024);
}
if (m_pRectArray == NULL) {
- m_pRectArray = FXTARGET_New CFX_RectMassArray(16);
+ m_pRectArray = new CFX_RectMassArray(16);
}
if (m_pBBoxMap == NULL) {
m_pBBoxMap = FX_NEW CFX_MapPtrToPtr(16);
diff --git a/xfa/src/fgas/src/layout/fx_textbreak.h b/xfa/src/fgas/src/layout/fx_textbreak.h
index 13e79dae60..310be133c1 100644
--- a/xfa/src/fgas/src/layout/fx_textbreak.h
+++ b/xfa/src/fgas/src/layout/fx_textbreak.h
@@ -16,13 +16,13 @@ public:
, m_iArabicChars(0)
{
m_pLineChars = FX_NEW CFX_TxtCharArray;
- m_pLinePieces = FXTARGET_New CFX_TxtPieceArray(16);
+ m_pLinePieces = new CFX_TxtPieceArray(16);
}
~CFX_TxtLine()
{
RemoveAll();
delete m_pLineChars;
- FXTARGET_Delete m_pLinePieces;
+ delete m_pLinePieces;
}
int32_t CountChars() const
{