diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-08-05 12:34:06 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-08-05 12:34:06 -0700 |
commit | ae51c810a44844ef437393c1768be8f7766586b2 (patch) | |
tree | 373bbfa8c8720af43d58a9982beea3ebf10c5d6d /core/src | |
parent | e3166a8c39c8943f6cafb2ffe10bd9564e3eaf16 (diff) | |
download | pdfium-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 'core/src')
38 files changed, 124 insertions, 124 deletions
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp index e9df5e1d7e..e50e4057be 100644 --- a/core/src/fpdfdoc/doc_annot.cpp +++ b/core/src/fpdfdoc/doc_annot.cpp @@ -232,7 +232,7 @@ CPDF_Form* CPDF_Annot::GetAPForm(const CPDF_Page* pPage, AppearanceMode mode) { if (m_APMap.Lookup(pStream, (void*&)pForm)) { return pForm; } - pForm = FX_NEW CPDF_Form(m_pList->m_pDocument, pPage->m_pResources, pStream); + pForm = new CPDF_Form(m_pList->m_pDocument, pPage->m_pResources, pStream); if (pForm == NULL) { return NULL; } diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp index a921d4980a..d25fd27d13 100644 --- a/core/src/fpdfdoc/doc_form.cpp +++ b/core/src/fpdfdoc/doc_form.cpp @@ -101,7 +101,7 @@ CFieldTree::_Node* CFieldTree::AddChild(_Node* pParent, if (pParent == NULL) { return NULL; } - _Node* pNode = FX_NEW _Node; + _Node* pNode = new _Node; if (pNode == NULL) { return NULL; } @@ -241,7 +241,7 @@ CPDF_InterForm::CPDF_InterForm(CPDF_Document* pDocument, FX_BOOL bGenerateAP) m_bGenerateAP = bGenerateAP; m_pFormNotify = NULL; m_bUpdated = FALSE; - m_pFieldTree = FX_NEW CFieldTree; + m_pFieldTree = new CFieldTree; CPDF_Dictionary* pRoot = m_pDocument->GetRoot(); m_pFormDict = pRoot->GetDict("AcroForm"); if (m_pFormDict == NULL) { @@ -1289,7 +1289,7 @@ CPDF_FormField* CPDF_InterForm::AddTerminalField( } } } - pField = FX_NEW CPDF_FormField(this, pParent); + pField = new CPDF_FormField(this, pParent); CPDF_Object* pTObj = pDict->GetElement("T"); if (pTObj && pTObj->GetType() == PDFOBJ_REFERENCE) { CPDF_Object* pClone = pTObj->Clone(TRUE); @@ -1327,7 +1327,7 @@ CPDF_FormControl* CPDF_InterForm::AddControl( if (m_ControlMap.Lookup((CPDF_Dictionary*)pWidgetDict, rValue)) { return (CPDF_FormControl*)rValue; } - CPDF_FormControl* pControl = FX_NEW CPDF_FormControl( + CPDF_FormControl* pControl = new CPDF_FormControl( (CPDF_FormField*)pField, (CPDF_Dictionary*)pWidgetDict); if (pControl == NULL) { return NULL; diff --git a/core/src/fpdfdoc/doc_metadata.cpp b/core/src/fpdfdoc/doc_metadata.cpp index 2bc14d9c33..e350ea6f41 100644 --- a/core/src/fpdfdoc/doc_metadata.cpp +++ b/core/src/fpdfdoc/doc_metadata.cpp @@ -22,7 +22,7 @@ CPDF_Metadata::CPDF_Metadata() { m_pData = FX_Alloc(PDFDOC_METADATA, 1); CFX_CMapByteStringToPtr*& pStringMap = ((PDFDOC_LPMETADATA)m_pData)->m_pStringMap; - pStringMap = FX_NEW CFX_CMapByteStringToPtr; + pStringMap = new CFX_CMapByteStringToPtr; if (pStringMap != NULL) { CFX_ByteString bstr; for (int i = 0; i < 18; i += 2) { diff --git a/core/src/fpdfdoc/doc_tagged.cpp b/core/src/fpdfdoc/doc_tagged.cpp index fe7e5e13b9..d8e24c78b3 100644 --- a/core/src/fpdfdoc/doc_tagged.cpp +++ b/core/src/fpdfdoc/doc_tagged.cpp @@ -19,7 +19,7 @@ CPDF_StructTree* CPDF_StructTree::LoadPage(const CPDF_Document* pDoc, if (!IsTagged(pDoc)) { return NULL; } - CPDF_StructTreeImpl* pTree = FX_NEW CPDF_StructTreeImpl(pDoc); + CPDF_StructTreeImpl* pTree = new CPDF_StructTreeImpl(pDoc); if (pTree == NULL) { return NULL; } @@ -30,7 +30,7 @@ CPDF_StructTree* CPDF_StructTree::LoadDoc(const CPDF_Document* pDoc) { if (!IsTagged(pDoc)) { return NULL; } - CPDF_StructTreeImpl* pTree = FX_NEW CPDF_StructTreeImpl(pDoc); + CPDF_StructTreeImpl* pTree = new CPDF_StructTreeImpl(pDoc); if (pTree == NULL) { return NULL; } @@ -62,7 +62,7 @@ void CPDF_StructTreeImpl::LoadDocTree() { } if (pKids->GetType() == PDFOBJ_DICTIONARY) { CPDF_StructElementImpl* pStructElementImpl = - FX_NEW CPDF_StructElementImpl(this, NULL, (CPDF_Dictionary*)pKids); + new CPDF_StructElementImpl(this, NULL, (CPDF_Dictionary*)pKids); if (pStructElementImpl == NULL) { return; } @@ -76,7 +76,7 @@ void CPDF_StructTreeImpl::LoadDocTree() { 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); + new CPDF_StructElementImpl(this, NULL, pKid); if (pStructElementImpl == NULL) { return; } @@ -137,7 +137,7 @@ CPDF_StructElementImpl* CPDF_StructTreeImpl::AddPageNode(CPDF_Dictionary* pDict, if (map.Lookup(pDict, (void*&)pElement)) { return pElement; } - pElement = FX_NEW CPDF_StructElementImpl(this, NULL, pDict); + pElement = new CPDF_StructElementImpl(this, NULL, pDict); if (pElement == NULL) { return NULL; } @@ -321,7 +321,7 @@ void CPDF_StructElementImpl::LoadKid(FX_DWORD PageObjNum, 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); + new CPDF_StructElementImpl(m_pTree, this, pKidDict); } else { pKid->m_Element.m_pElement = NULL; } diff --git a/core/src/fpdfdoc/doc_vt.cpp b/core/src/fpdfdoc/doc_vt.cpp index b2eaa8a5fc..77afab81b9 100644 --- a/core/src/fpdfdoc/doc_vt.cpp +++ b/core/src/fpdfdoc/doc_vt.cpp @@ -69,7 +69,7 @@ void CSection::ResetLinePlace() { } CPVT_WordPlace CSection::AddWord(const CPVT_WordPlace& place, const CPVT_WordInfo& wordinfo) { - if (CPVT_WordInfo* pWord = FX_NEW CPVT_WordInfo(wordinfo)) { + if (CPVT_WordInfo* pWord = new CPVT_WordInfo(wordinfo)) { int32_t nWordIndex = FPDF_MAX(FPDF_MIN(place.nWordIndex, m_WordArray.GetSize()), 0); if (nWordIndex == m_WordArray.GetSize()) { @@ -815,8 +815,8 @@ void CPDF_VariableText::Initialize() { if (!m_bInitial) { CPVT_SectionInfo secinfo; if (m_bRichText) { - secinfo.pSecProps = FX_NEW CPVT_SecProps(0.0f, 0.0f, 0); - secinfo.pWordProps = FX_NEW CPVT_WordProps(GetDefaultFontIndex(), + secinfo.pSecProps = new CPVT_SecProps(0.0f, 0.0f, 0); + secinfo.pWordProps = new CPVT_WordProps(GetDefaultFontIndex(), PVT_DEFAULT_FONTSIZE, 0, 0, 0); } CPVT_WordPlace place; @@ -884,10 +884,10 @@ CPVT_WordPlace CPDF_VariableText::InsertSection( CPVT_SectionInfo secinfo; if (m_bRichText) { if (pSecProps) { - secinfo.pSecProps = FX_NEW CPVT_SecProps(*pSecProps); + secinfo.pSecProps = new CPVT_SecProps(*pSecProps); } if (pWordProps) { - secinfo.pWordProps = FX_NEW CPVT_WordProps(*pWordProps); + secinfo.pWordProps = new CPVT_WordProps(*pWordProps); } } AddSection(NewPlace, secinfo); @@ -976,10 +976,10 @@ void CPDF_VariableText::SetText(const FX_WCHAR* text, CPVT_SectionInfo secinfo; if (m_bRichText) { if (pSecProps) { - secinfo.pSecProps = FX_NEW CPVT_SecProps(*pSecProps); + secinfo.pSecProps = new CPVT_SecProps(*pSecProps); } if (pWordProps) { - secinfo.pWordProps = FX_NEW CPVT_WordProps(*pWordProps); + secinfo.pWordProps = new CPVT_WordProps(*pWordProps); } } if (CSection* pSection = m_SectionArray.GetAt(0)) { @@ -1662,7 +1662,7 @@ FX_BOOL CPDF_VariableText::IsLatinWord(FX_WORD word) { } IPDF_VariableText_Iterator* CPDF_VariableText::GetIterator() { if (!m_pVTIterator) { - return m_pVTIterator = FX_NEW CPDF_VariableText_Iterator(this); + return m_pVTIterator = new CPDF_VariableText_Iterator(this); } return m_pVTIterator; } diff --git a/core/src/fpdfdoc/doc_vtmodule.cpp b/core/src/fpdfdoc/doc_vtmodule.cpp index efb9d22dc5..834d459de3 100644 --- a/core/src/fpdfdoc/doc_vtmodule.cpp +++ b/core/src/fpdfdoc/doc_vtmodule.cpp @@ -8,7 +8,7 @@ #include "../../include/fpdfdoc/fpdf_vt.h" #include "pdf_vt.h" IPDF_VariableText* IPDF_VariableText::NewVariableText() { - return FX_NEW CPDF_VariableText(); + return new CPDF_VariableText(); } void IPDF_VariableText::DelVariableText(IPDF_VariableText* pVT) { delete (CPDF_VariableText*)pVT; diff --git a/core/src/fpdfdoc/pdf_vt.h b/core/src/fpdfdoc/pdf_vt.h index 728dbbfebb..81d9d6a879 100644 --- a/core/src/fpdfdoc/pdf_vt.h +++ b/core/src/fpdfdoc/pdf_vt.h @@ -85,14 +85,14 @@ struct CPVT_SectionInfo { if (pSecProps) { *pSecProps = *other.pSecProps; } else { - pSecProps = FX_NEW CPVT_SecProps(*other.pSecProps); + pSecProps = new CPVT_SecProps(*other.pSecProps); } } if (other.pWordProps) { if (pWordProps) { *pWordProps = *other.pWordProps; } else { - pWordProps = FX_NEW CPVT_WordProps(*other.pWordProps); + pWordProps = new CPVT_WordProps(*other.pWordProps); } } } @@ -162,7 +162,7 @@ struct CPVT_WordInfo { if (pWordProps) { *pWordProps = *word.pWordProps; } else { - pWordProps = FX_NEW CPVT_WordProps(*word.pWordProps); + pWordProps = new CPVT_WordProps(*word.pWordProps); } } } @@ -223,7 +223,7 @@ class CLines { } int32_t Add(const CPVT_LineInfo& lineinfo) { if (m_nTotal >= GetSize()) { - if (CLine* pLine = FX_NEW CLine) { + if (CLine* pLine = new CLine) { pLine->m_LineInfo = lineinfo; m_Lines.Add(pLine); return m_nTotal++; diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp index 48402df723..3da9a215a4 100644 --- a/core/src/fpdftext/fpdf_text.cpp +++ b/core/src/fpdftext/fpdf_text.cpp @@ -188,7 +188,7 @@ CTextBaseLine* CTextPage::InsertTextBox(CTextBaseLine* pBaseLine, } } if (pBaseLine == NULL) { - pBaseLine = FX_NEW CTextBaseLine; + pBaseLine = new CTextBaseLine; if (NULL == pBaseLine) { return NULL; } @@ -462,7 +462,7 @@ void CTextPage::FindColumns() { CTextBox* pTextBox = (CTextBox*)pBaseLine->m_TextList.GetAt(j); CTextColumn* pColumn = FindColumn(pTextBox->m_Right); if (pColumn == NULL) { - pColumn = FX_NEW CTextColumn; + pColumn = new CTextColumn; if (pColumn) { pColumn->m_Count = 1; pColumn->m_AvgPos = pTextBox->m_Right; @@ -541,7 +541,7 @@ void CTextBaseLine::InsertTextBox(FX_FLOAT leftx, break; } } - CTextBox* pText = FX_NEW CTextBox; + CTextBox* pText = new CTextBox; if (NULL == pText) { return; } diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp index 2f6a8db204..9d4555c27e 100644 --- a/core/src/fpdftext/fpdf_text_int.cpp +++ b/core/src/fpdftext/fpdf_text_int.cpp @@ -84,17 +84,17 @@ CPDFText_ParseOptions::CPDFText_ParseOptions() IPDF_TextPage* IPDF_TextPage::CreateTextPage( const CPDF_Page* pPage, CPDFText_ParseOptions ParserOptions) { - CPDF_TextPage* pTextPageEx = FX_NEW CPDF_TextPage(pPage, ParserOptions); + CPDF_TextPage* pTextPageEx = new CPDF_TextPage(pPage, ParserOptions); return pTextPageEx; } IPDF_TextPage* IPDF_TextPage::CreateTextPage(const CPDF_Page* pPage, int flags) { - CPDF_TextPage* pTextPage = FX_NEW CPDF_TextPage(pPage, flags); + CPDF_TextPage* pTextPage = new CPDF_TextPage(pPage, flags); return pTextPage; } IPDF_TextPage* IPDF_TextPage::CreateTextPage(const CPDF_PageObjects* pObjs, int flags) { - CPDF_TextPage* pTextPage = FX_NEW CPDF_TextPage(pObjs, flags); + CPDF_TextPage* pTextPage = new CPDF_TextPage(pObjs, flags); return pTextPage; } IPDF_TextPageFind* IPDF_TextPageFind::CreatePageFind( @@ -102,10 +102,10 @@ IPDF_TextPageFind* IPDF_TextPageFind::CreatePageFind( if (!pTextPage) { return NULL; } - return FX_NEW CPDF_TextPageFind(pTextPage); + return new CPDF_TextPageFind(pTextPage); } IPDF_LinkExtract* IPDF_LinkExtract::CreateLinkExtract() { - return FX_NEW CPDF_LinkExtract(); + return new CPDF_LinkExtract(); } #define TEXT_BLANK_CHAR L' ' #define TEXT_LINEFEED_CHAR L'\n' @@ -2737,7 +2737,7 @@ FX_BOOL CPDF_LinkExtract::AppendToLinkList(int start, int count, const CFX_WideString& strUrl) { CPDF_LinkExt* linkInfo = NULL; - linkInfo = FX_NEW CPDF_LinkExt; + linkInfo = new CPDF_LinkExt; if (!linkInfo) { return FALSE; } diff --git a/core/src/fxcrt/fx_arabic.cpp b/core/src/fxcrt/fx_arabic.cpp index 9d2d1bd3dd..ab736f9769 100644 --- a/core/src/fxcrt/fx_arabic.cpp +++ b/core/src/fxcrt/fx_arabic.cpp @@ -145,7 +145,7 @@ FX_WCHAR FX_GetArabicFromShaddaTable(FX_WCHAR shadda) { }; #endif IFX_ArabicChar* IFX_ArabicChar::Create() { - return FX_NEW CFX_ArabicChar; + return new CFX_ArabicChar; } FX_BOOL CFX_ArabicChar::IsArabicChar(FX_WCHAR wch) const { FX_DWORD dwRet = @@ -1055,7 +1055,7 @@ void FX_BidiLine(CFX_RTFCharArray& chars, int32_t iCount, int32_t iBaseLevel) { blt.FX_BidiLine(chars, iCount, iBaseLevel); } IFX_BidiChar* IFX_BidiChar::Create() { - return FX_NEW CFX_BidiChar; + return new CFX_BidiChar; } CFX_BidiChar::CFX_BidiChar() : m_bSeparateNeutral(TRUE), diff --git a/core/src/fxcrt/fx_basic_util.cpp b/core/src/fxcrt/fx_basic_util.cpp index f1512ff0cb..ed71d975c8 100644 --- a/core/src/fxcrt/fx_basic_util.cpp +++ b/core/src/fxcrt/fx_basic_util.cpp @@ -298,7 +298,7 @@ class CFindFileDataW : public CFindFileData { void* FX_OpenFolder(const FX_CHAR* path) { #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ #ifndef _WIN32_WCE - CFindFileDataA* pData = FX_NEW CFindFileDataA; + CFindFileDataA* pData = new CFindFileDataA; if (!pData) { return NULL; } @@ -311,7 +311,7 @@ void* FX_OpenFolder(const FX_CHAR* path) { &pData->m_FindData, FindExSearchNameMatch, NULL, 0); #endif #else - CFindFileDataW* pData = FX_NEW CFindFileDataW; + CFindFileDataW* pData = new CFindFileDataW; if (!pData) { return NULL; } @@ -331,7 +331,7 @@ void* FX_OpenFolder(const FX_CHAR* path) { } void* FX_OpenFolder(const FX_WCHAR* path) { #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ - CFindFileDataW* pData = FX_NEW CFindFileDataW; + CFindFileDataW* pData = new CFindFileDataW; if (!pData) { return NULL; } diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp index 004e39d5e2..402f86cecb 100644 --- a/core/src/fxcrt/fx_extension.cpp +++ b/core/src/fxcrt/fx_extension.cpp @@ -18,7 +18,7 @@ IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath) { return NULL; CFX_CRTFileAccess* pFA = NULL; - pFA = FX_NEW CFX_CRTFileAccess; + pFA = new CFX_CRTFileAccess; if (NULL == pFA) return NULL; @@ -34,7 +34,7 @@ IFX_FileStream* FX_CreateFileStream(const FX_CHAR* filename, FX_DWORD dwModes) { pFA->Release(); return NULL; } - return FX_NEW CFX_CRTFileStream(pFA); + return new CFX_CRTFileStream(pFA); } IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename, FX_DWORD dwModes) { @@ -46,7 +46,7 @@ IFX_FileStream* FX_CreateFileStream(const FX_WCHAR* filename, pFA->Release(); return NULL; } - return FX_NEW CFX_CRTFileStream(pFA); + return new CFX_CRTFileStream(pFA); } IFX_FileRead* FX_CreateFileRead(const FX_CHAR* filename) { return FX_CreateFileStream(filename, FX_FILEMODE_ReadOnly); @@ -57,10 +57,10 @@ IFX_FileRead* FX_CreateFileRead(const FX_WCHAR* filename) { IFX_MemoryStream* FX_CreateMemoryStream(uint8_t* pBuffer, size_t dwSize, FX_BOOL bTakeOver) { - return FX_NEW CFX_MemoryStream(pBuffer, dwSize, bTakeOver); + return new CFX_MemoryStream(pBuffer, dwSize, bTakeOver); } IFX_MemoryStream* FX_CreateMemoryStream(FX_BOOL bConsecutive) { - return FX_NEW CFX_MemoryStream(bConsecutive); + return new CFX_MemoryStream(bConsecutive); } #ifdef __cplusplus extern "C" { diff --git a/core/src/fxcrt/fx_xml_parser.cpp b/core/src/fxcrt/fx_xml_parser.cpp index 61e66fbc0e..6d3c429523 100644 --- a/core/src/fxcrt/fx_xml_parser.cpp +++ b/core/src/fxcrt/fx_xml_parser.cpp @@ -12,14 +12,14 @@ CXML_Parser::~CXML_Parser() { } } FX_BOOL CXML_Parser::Init(uint8_t* pBuffer, size_t size) { - m_pDataAcc = FX_NEW CXML_DataBufAcc(pBuffer, size); + m_pDataAcc = new CXML_DataBufAcc(pBuffer, size); if (!m_pDataAcc) { return FALSE; } return Init(TRUE); } FX_BOOL CXML_Parser::Init(IFX_FileRead* pFileRead) { - m_pDataAcc = FX_NEW CXML_DataStmAcc(pFileRead); + m_pDataAcc = new CXML_DataStmAcc(pFileRead); if (!m_pDataAcc) { return FALSE; } @@ -370,7 +370,7 @@ CXML_Element* CXML_Parser::ParseElement(CXML_Element* pParent, return NULL; } CXML_Element* pElement; - pElement = FX_NEW CXML_Element; + pElement = new CXML_Element; if (pElement) { pElement->m_pParent = pParent; pElement->SetTag(tag_space, tag_name); @@ -523,7 +523,7 @@ void CXML_Parser::InsertContentSegment(FX_BOOL bCDATA, return; } CXML_Content* pContent; - pContent = FX_NEW CXML_Content; + pContent = new CXML_Content; if (!pContent) { return; } @@ -805,7 +805,7 @@ void CXML_AttrMap::SetAt(const CFX_ByteStringC& space, } } if (!m_pMap) { - m_pMap = FX_NEW CFX_ObjectArray<CXML_AttrItem>; + m_pMap = new CFX_ObjectArray<CXML_AttrItem>; } if (!m_pMap) { return; diff --git a/core/src/fxcrt/fxcrt_platforms.cpp b/core/src/fxcrt/fxcrt_platforms.cpp index 93f78c7f51..a9f22d00c6 100644 --- a/core/src/fxcrt/fxcrt_platforms.cpp +++ b/core/src/fxcrt/fxcrt_platforms.cpp @@ -12,7 +12,7 @@ _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ && \ _FXM_PLATFORM_ != _FXM_PLATFORM_ANDROID_) IFXCRT_FileAccess* FXCRT_FileAccess_Create() { - return FX_NEW CFXCRT_FileAccess_CRT; + return new CFXCRT_FileAccess_CRT; } void FXCRT_GetFileModeString(FX_DWORD dwModes, CFX_ByteString& bsMode) { if (dwModes & FX_FILEMODE_ReadOnly) { diff --git a/core/src/fxcrt/fxcrt_posix.cpp b/core/src/fxcrt/fxcrt_posix.cpp index 03fd345900..88e3d8af1d 100644 --- a/core/src/fxcrt/fxcrt_posix.cpp +++ b/core/src/fxcrt/fxcrt_posix.cpp @@ -11,7 +11,7 @@ _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \ _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_ IFXCRT_FileAccess* FXCRT_FileAccess_Create() { - return FX_NEW CFXCRT_FileAccess_Posix; + return new CFXCRT_FileAccess_Posix; } void FXCRT_Posix_GetFileMode(FX_DWORD dwModes, int32_t& nFlags, diff --git a/core/src/fxcrt/fxcrt_windows.cpp b/core/src/fxcrt/fxcrt_windows.cpp index 906e8bd937..86077019af 100644 --- a/core/src/fxcrt/fxcrt_windows.cpp +++ b/core/src/fxcrt/fxcrt_windows.cpp @@ -23,7 +23,7 @@ FX_BOOL FX_File_Exist(const CFX_WideStringC& fileName) { return (dwAttri & FILE_ATTRIBUTE_DIRECTORY) == 0; } IFXCRT_FileAccess* FXCRT_FileAccess_Create() { - return FX_NEW CFXCRT_FileAccess_Win64; + return new CFXCRT_FileAccess_Win64; } void FXCRT_Windows_GetFileMode(FX_DWORD dwMode, FX_DWORD& dwAccess, diff --git a/core/src/fxge/agg/src/fx_agg_driver.cpp b/core/src/fxge/agg/src/fx_agg_driver.cpp index 61447ba267..993f50afad 100644 --- a/core/src/fxge/agg/src/fx_agg_driver.cpp +++ b/core/src/fxge/agg/src/fx_agg_driver.cpp @@ -186,7 +186,7 @@ IFX_RenderDeviceDriver* IFX_RenderDeviceDriver::CreateFxgeDriver( FX_BOOL bRgbByteOrder, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout) { - return FX_NEW CFX_AggDeviceDriver(pBitmap, 0, bRgbByteOrder, pOriDevice, + return new CFX_AggDeviceDriver(pBitmap, 0, bRgbByteOrder, pOriDevice, bGroupKnockout); } CFX_AggDeviceDriver::CFX_AggDeviceDriver(CFX_DIBitmap* pBitmap, @@ -266,7 +266,7 @@ int CFX_AggDeviceDriver::GetDeviceCaps(int caps_id) { void CFX_AggDeviceDriver::SaveState() { void* pClip = NULL; if (m_pClipRgn) { - pClip = FX_NEW CFX_ClipRgn(*m_pClipRgn); + pClip = new CFX_ClipRgn(*m_pClipRgn); if (!pClip) { return; } @@ -285,7 +285,7 @@ void CFX_AggDeviceDriver::RestoreState(FX_BOOL bKeepSaved) { m_pClipRgn = NULL; if (bKeepSaved) { if (pSavedClip) { - m_pClipRgn = FX_NEW CFX_ClipRgn(*pSavedClip); + m_pClipRgn = new CFX_ClipRgn(*pSavedClip); } } else { m_StateStack.RemoveAt(m_StateStack.GetSize() - 1); @@ -322,7 +322,7 @@ FX_BOOL CFX_AggDeviceDriver::SetClip_PathFill( int fill_mode) { m_FillFlags = fill_mode; if (m_pClipRgn == NULL) { - m_pClipRgn = FX_NEW CFX_ClipRgn(GetDeviceCaps(FXDC_PIXEL_WIDTH), + m_pClipRgn = new CFX_ClipRgn(GetDeviceCaps(FXDC_PIXEL_WIDTH), GetDeviceCaps(FXDC_PIXEL_HEIGHT)); if (!m_pClipRgn) { return FALSE; @@ -357,7 +357,7 @@ FX_BOOL CFX_AggDeviceDriver::SetClip_PathStroke( const CFX_AffineMatrix* pObject2Device, const CFX_GraphStateData* pGraphState) { if (m_pClipRgn == NULL) { - m_pClipRgn = FX_NEW CFX_ClipRgn(GetDeviceCaps(FXDC_PIXEL_WIDTH), + m_pClipRgn = new CFX_ClipRgn(GetDeviceCaps(FXDC_PIXEL_WIDTH), GetDeviceCaps(FXDC_PIXEL_HEIGHT)); if (!m_pClipRgn) { return FALSE; @@ -1744,7 +1744,7 @@ FX_BOOL CFX_AggDeviceDriver::StartDIBits(const CFX_DIBSource* pSource, if (m_pBitmap->GetBuffer() == NULL) { return TRUE; } - CFX_ImageRenderer* pRenderer = FX_NEW CFX_ImageRenderer; + CFX_ImageRenderer* pRenderer = new CFX_ImageRenderer; if (!pRenderer) { return FALSE; } @@ -1777,7 +1777,7 @@ FX_BOOL CFX_FxgeDevice::Attach(CFX_DIBitmap* pBitmap, return FALSE; } SetBitmap(pBitmap); - IFX_RenderDeviceDriver* pDriver = FX_NEW CFX_AggDeviceDriver( + IFX_RenderDeviceDriver* pDriver = new CFX_AggDeviceDriver( pBitmap, dither_bits, bRgbByteOrder, pOriDevice, bGroupKnockout); if (!pDriver) { return FALSE; @@ -1791,7 +1791,7 @@ FX_BOOL CFX_FxgeDevice::Create(int width, int dither_bits, CFX_DIBitmap* pOriDevice) { m_bOwnedBitmap = TRUE; - CFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pBitmap = new CFX_DIBitmap; if (!pBitmap) { return FALSE; } @@ -1800,7 +1800,7 @@ FX_BOOL CFX_FxgeDevice::Create(int width, return FALSE; } SetBitmap(pBitmap); - IFX_RenderDeviceDriver* pDriver = FX_NEW CFX_AggDeviceDriver( + IFX_RenderDeviceDriver* pDriver = new CFX_AggDeviceDriver( pBitmap, dither_bits, FALSE, pOriDevice, FALSE); if (!pDriver) { return FALSE; diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp index 59fbcb5f58..303ba97709 100644 --- a/core/src/fxge/android/fpf_skiafontmgr.cpp +++ b/core/src/fxge/android/fpf_skiafontmgr.cpp @@ -332,7 +332,7 @@ IFPF_Font* CFPF_SkiaFontMgr::CreateFont(const CFX_ByteStringC& bsFamilyname, CFPF_SkiaFontDescriptor* pFontDes = (CFPF_SkiaFontDescriptor*)m_FontFaces.ElementAt(nItem); <<<<<<< HEAD - CFPF_SkiaFont* pFont = FX_NEW CFPF_SkiaFont; + CFPF_SkiaFont* pFont = new CFPF_SkiaFont; if (pFont) { if (pFont->InitFont(this, pFontDes, bsFamilyname, dwStyle, uCharset)) { m_FamilyFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont); @@ -449,7 +449,7 @@ void CFPF_SkiaFontMgr::ScanPath(const CFX_ByteStringC& path) { void CFPF_SkiaFontMgr::ScanFile(const CFX_ByteStringC& file) { FXFT_Face face = GetFontFace(file); if (face) { - CFPF_SkiaPathFont* pFontDesc = FX_NEW CFPF_SkiaPathFont; + CFPF_SkiaPathFont* pFontDesc = new CFPF_SkiaPathFont; if (!pFontDesc) { return; } diff --git a/core/src/fxge/android/fpf_skiamodule.cpp b/core/src/fxge/android/fpf_skiamodule.cpp index 98036a110a..a421a0e944 100644 --- a/core/src/fxge/android/fpf_skiamodule.cpp +++ b/core/src/fxge/android/fpf_skiamodule.cpp @@ -11,7 +11,7 @@ static IFPF_DeviceModule* gs_pPFModule = NULL; IFPF_DeviceModule* FPF_GetDeviceModule() { if (!gs_pPFModule) { - gs_pPFModule = FX_NEW CFPF_SkiaDeviceModule; + gs_pPFModule = new CFPF_SkiaDeviceModule; } return gs_pPFModule; } @@ -24,7 +24,7 @@ void CFPF_SkiaDeviceModule::Destroy() { } IFPF_FontMgr* CFPF_SkiaDeviceModule::GetFontMgr() { if (!m_pFontMgr) { - m_pFontMgr = FX_NEW CFPF_SkiaFontMgr; + m_pFontMgr = new CFPF_SkiaFontMgr; if (!m_pFontMgr) { return NULL; } diff --git a/core/src/fxge/android/fx_android_imp.cpp b/core/src/fxge/android/fx_android_imp.cpp index 1927358983..43fe3b197f 100644 --- a/core/src/fxge/android/fx_android_imp.cpp +++ b/core/src/fxge/android/fx_android_imp.cpp @@ -13,7 +13,7 @@ void CFX_GEModule::InitPlatform() { } IFPF_FontMgr* pFontMgr = pDeviceModule->GetFontMgr(); if (pFontMgr) { - CFX_AndroidFontInfo* pFontInfo = FX_NEW CFX_AndroidFontInfo; + CFX_AndroidFontInfo* pFontInfo = new CFX_AndroidFontInfo; if (!pFontInfo) { return; } diff --git a/core/src/fxge/apple/fx_mac_imp.cpp b/core/src/fxge/apple/fx_mac_imp.cpp index 9af8804d48..e08f6224d8 100644 --- a/core/src/fxge/apple/fx_mac_imp.cpp +++ b/core/src/fxge/apple/fx_mac_imp.cpp @@ -94,7 +94,7 @@ void* CFX_MacFontInfo::MapFont(int weight, return NULL; } IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault() { - CFX_MacFontInfo* pInfo = FX_NEW CFX_MacFontInfo; + CFX_MacFontInfo* pInfo = new CFX_MacFontInfo; if (!pInfo) { return NULL; } @@ -104,7 +104,7 @@ IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault() { return pInfo; } void CFX_GEModule::InitPlatform() { - m_pPlatformData = FX_NEW CApplePlatform; + m_pPlatformData = new CApplePlatform; m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault()); } void CFX_GEModule::DestroyPlatform() { diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp index 80b9517629..323b8eac3c 100644 --- a/core/src/fxge/apple/fx_quartz_device.cpp +++ b/core/src/fxge/apple/fx_quartz_device.cpp @@ -1024,7 +1024,7 @@ FX_BOOL CFX_QuartzDevice::Attach(CGContextRef context, int32_t nDeviceClass) { m_pContext = context; CGContextRetain(m_pContext); IFX_RenderDeviceDriver* pDriver = - FX_NEW CFX_QuartzDeviceDriver(m_pContext, nDeviceClass); + new CFX_QuartzDeviceDriver(m_pContext, nDeviceClass); if (!pDriver) { return FALSE; } @@ -1038,7 +1038,7 @@ FX_BOOL CFX_QuartzDevice::Attach(CFX_DIBitmap* pBitmap) { return FALSE; } IFX_RenderDeviceDriver* pDriver = - FX_NEW CFX_QuartzDeviceDriver(m_pContext, FXDC_DISPLAY); + new CFX_QuartzDeviceDriver(m_pContext, FXDC_DISPLAY); if (!pDriver) { return FALSE; } @@ -1051,7 +1051,7 @@ FX_BOOL CFX_QuartzDevice::Create(int32_t width, if ((uint8_t)format < 32) { return FALSE; } - CFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pBitmap = new CFX_DIBitmap; if (!pBitmap) { return FALSE; } diff --git a/core/src/fxge/dib/fx_dib_convert.cpp b/core/src/fxge/dib/fx_dib_convert.cpp index 52169b946d..950f72925a 100644 --- a/core/src/fxge/dib/fx_dib_convert.cpp +++ b/core/src/fxge/dib/fx_dib_convert.cpp @@ -1105,7 +1105,7 @@ CFX_DIBitmap* CFX_DIBSource::CloneConvert(FXDIB_Format dest_format, } return pClone; } - CFX_DIBitmap* pClone = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pClone = new CFX_DIBitmap; if (!pClone) { return NULL; } diff --git a/core/src/fxge/dib/fx_dib_engine.cpp b/core/src/fxge/dib/fx_dib_engine.cpp index 02e4dbcd42..86d495f28e 100644 --- a/core/src/fxge/dib/fx_dib_engine.cpp +++ b/core/src/fxge/dib/fx_dib_engine.cpp @@ -851,7 +851,7 @@ FX_BOOL CFX_ImageStretcher::Continue(IFX_Pause* pPause) { #define MAX_PROGRESSIVE_STRETCH_PIXELS 1000000 FX_BOOL CFX_ImageStretcher::StartStretch() { m_pStretchEngine = - FX_NEW CStretchEngine(m_pDest, m_DestFormat, m_DestWidth, m_DestHeight, + new CStretchEngine(m_pDest, m_DestFormat, m_DestWidth, m_DestHeight, m_ClipRect, m_pSource, m_Flags); if (!m_pStretchEngine) { return FALSE; diff --git a/core/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp index 2d6d217b46..ce55640cb3 100644 --- a/core/src/fxge/dib/fx_dib_main.cpp +++ b/core/src/fxge/dib/fx_dib_main.cpp @@ -161,7 +161,7 @@ CFX_DIBitmap* CFX_DIBSource::Clone(const FX_RECT* pClip) const { return NULL; } } - CFX_DIBitmap* pNewBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pNewBitmap = new CFX_DIBitmap; if (!pNewBitmap) { return NULL; } @@ -226,7 +226,7 @@ FX_BOOL CFX_DIBSource::BuildAlphaMask() { if (m_pAlphaMask) { return TRUE; } - m_pAlphaMask = FX_NEW CFX_DIBitmap; + m_pAlphaMask = new CFX_DIBitmap; if (!m_pAlphaMask) { return FALSE; } @@ -591,7 +591,7 @@ CFX_DIBitmap* CFX_DIBSource::GetAlphaMask(const FX_RECT* pClip) const { return NULL; } } - CFX_DIBitmap* pMask = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pMask = new CFX_DIBitmap; if (!pMask) { return NULL; } @@ -925,7 +925,7 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform) { int b = (uint8_t)m_pPalette[i]; gray[i] = (uint8_t)FXRGB2GRAY(r, g, b); } - CFX_DIBitmap* pMask = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pMask = new CFX_DIBitmap; if (!pMask) { return FALSE; } @@ -959,7 +959,7 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform) { int b = (uint8_t)m_pPalette[i]; gray[i] = (uint8_t)FXRGB2GRAY(r, g, b); } - CFX_DIBitmap* pMask = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pMask = new CFX_DIBitmap; if (!pMask) { return FALSE; } @@ -979,7 +979,7 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform) { break; } case FXDIB_Rgb: { - CFX_DIBitmap* pMask = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pMask = new CFX_DIBitmap; if (!pMask) { return FALSE; } @@ -1000,7 +1000,7 @@ FX_BOOL CFX_DIBitmap::GetGrayData(void* pIccTransform) { break; } case FXDIB_Rgb32: { - CFX_DIBitmap* pMask = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pMask = new CFX_DIBitmap; if (!pMask) { return FALSE; } @@ -1443,7 +1443,7 @@ FX_BOOL CFX_DIBitmap::DitherFS(const FX_DWORD* pPalette, return TRUE; } CFX_DIBitmap* CFX_DIBSource::FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const { - CFX_DIBitmap* pFlipped = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pFlipped = new CFX_DIBitmap; if (!pFlipped) { return NULL; } @@ -1521,7 +1521,7 @@ CFX_DIBExtractor::CFX_DIBExtractor(const CFX_DIBSource* pSrc) { if (pSrc->GetBuffer() == NULL) { m_pBitmap = pSrc->Clone(); } else { - m_pBitmap = FX_NEW CFX_DIBitmap; + m_pBitmap = new CFX_DIBitmap; if (!m_pBitmap) { return; } @@ -1644,7 +1644,7 @@ FX_BOOL CFX_ImageRenderer::Start(CFX_DIBitmap* pDevice, return TRUE; } m_Status = 2; - m_pTransformer = FX_NEW CFX_ImageTransformer; + m_pTransformer = new CFX_ImageTransformer; if (!m_pTransformer) { return FALSE; } @@ -1752,7 +1752,7 @@ FX_BOOL CFX_BitmapStorer::SetInfo(int width, int height, FXDIB_Format src_format, FX_DWORD* pSrcPalette) { - m_pBitmap = FX_NEW CFX_DIBitmap; + m_pBitmap = new CFX_DIBitmap; if (!m_pBitmap) { return FALSE; } diff --git a/core/src/fxge/dib/fx_dib_transform.cpp b/core/src/fxge/dib/fx_dib_transform.cpp index 35f8bfe8bc..cbf3bdc82c 100644 --- a/core/src/fxge/dib/fx_dib_transform.cpp +++ b/core/src/fxge/dib/fx_dib_transform.cpp @@ -77,7 +77,7 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, if (dest_clip.IsEmpty()) { return NULL; } - CFX_DIBitmap* pTransBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pTransBitmap = new CFX_DIBitmap; if (!pTransBitmap) { return NULL; } @@ -422,7 +422,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { stretch_buf_mask = m_Storer.GetBitmap()->m_pAlphaMask->GetBuffer(); } int stretch_pitch = m_Storer.GetBitmap()->GetPitch(); - CFX_DIBitmap* pTransformed = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pTransformed = new CFX_DIBitmap; if (!pTransformed) { return FALSE; } diff --git a/core/src/fxge/ge/fx_ge.cpp b/core/src/fxge/ge/fx_ge.cpp index b92e1ba773..607c9ee559 100644 --- a/core/src/fxge/ge/fx_ge.cpp +++ b/core/src/fxge/ge/fx_ge.cpp @@ -25,11 +25,11 @@ CFX_GEModule* CFX_GEModule::Get() { return g_pGEModule; } void CFX_GEModule::Create() { - g_pGEModule = FX_NEW CFX_GEModule; + g_pGEModule = new CFX_GEModule; if (!g_pGEModule) { return; } - g_pGEModule->m_pFontMgr = FX_NEW CFX_FontMgr; + g_pGEModule->m_pFontMgr = new CFX_FontMgr; g_pGEModule->InitPlatform(); g_pGEModule->SetTextGamma(2.2f); } @@ -42,7 +42,7 @@ void CFX_GEModule::Destroy() { } CFX_FontCache* CFX_GEModule::GetFontCache() { if (m_pFontCache == NULL) { - m_pFontCache = FX_NEW CFX_FontCache(); + m_pFontCache = new CFX_FontCache(); } return m_pFontCache; } diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp index 36bbec0498..d428494913 100644 --- a/core/src/fxge/ge/fx_ge_font.cpp +++ b/core/src/fxge/ge/fx_ge_font.cpp @@ -34,7 +34,7 @@ FX_BOOL CFX_Font::LoadClone(const CFX_Font* pFont) { } m_bLogic = TRUE; if (pFont->m_pSubstFont) { - m_pSubstFont = FX_NEW CFX_SubstFont; + m_pSubstFont = new CFX_SubstFont; if (!m_pSubstFont) { return FALSE; } @@ -102,7 +102,7 @@ FX_BOOL CFX_Font::LoadSubst(const CFX_ByteString& face_name, FX_BOOL bVertical) { m_bEmbedded = FALSE; m_bVertical = bVertical; - m_pSubstFont = FX_NEW CFX_SubstFont; + m_pSubstFont = new CFX_SubstFont; if (!m_pSubstFont) { return FALSE; } @@ -468,7 +468,7 @@ FX_DWORD CFX_UnicodeEncoding::GlyphFromCharCodeEx(FX_DWORD charcode, } IFX_FontEncoding* FXGE_CreateUnicodeEncoding(CFX_Font* pFont) { CFX_UnicodeEncoding* pEncoding = NULL; - pEncoding = FX_NEW CFX_UnicodeEncoding(pFont); + pEncoding = new CFX_UnicodeEncoding(pFont); return pEncoding; } CFX_FontEncodingEX::CFX_FontEncodingEX() { @@ -603,7 +603,7 @@ static IFX_FontEncodingEx* _FXFM_CreateFontEncoding(CFX_Font* pFont, if (error) { return NULL; } - CFX_FontEncodingEX* pFontEncoding = FX_NEW CFX_FontEncodingEX; + CFX_FontEncodingEX* pFontEncoding = new CFX_FontEncodingEX; if (pFontEncoding && !pFontEncoding->Init(pFont, nEncodingID)) { delete pFontEncoding; pFontEncoding = NULL; diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp index b3f6b7de73..2e591cd986 100644 --- a/core/src/fxge/ge/fx_ge_fontmap.cpp +++ b/core/src/fxge/ge/fx_ge_fontmap.cpp @@ -124,7 +124,7 @@ FXFT_Face CFX_FontMgr::AddCachedFace(const CFX_ByteString& face_name, uint8_t* pData, FX_DWORD size, int face_index) { - CTTFontDesc* pFontDesc = FX_NEW CTTFontDesc; + CTTFontDesc* pFontDesc = new CTTFontDesc; if (!pFontDesc) { return NULL; } @@ -330,7 +330,7 @@ FXFT_Face CFX_FontMgr::AddCachedTTCFace(int ttc_size, int font_offset) { CFX_ByteString key; key.Format("%d:%d", ttc_size, checksum); - CTTFontDesc* pFontDesc = FX_NEW CTTFontDesc; + CTTFontDesc* pFontDesc = new CTTFontDesc; if (!pFontDesc) { return NULL; } @@ -1493,7 +1493,7 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path, if (m_FontList.Lookup(facename, p)) { return; } - CFontFaceInfo* pInfo = FX_NEW CFontFaceInfo; + CFontFaceInfo* pInfo = new CFontFaceInfo; if (!pInfo) { return; } diff --git a/core/src/fxge/ge/fx_ge_linux.cpp b/core/src/fxge/ge/fx_ge_linux.cpp index c194adf3a1..cb8a0add76 100644 --- a/core/src/fxge/ge/fx_ge_linux.cpp +++ b/core/src/fxge/ge/fx_ge_linux.cpp @@ -228,7 +228,7 @@ void* CFX_LinuxFontInfo::FindFont(int weight, return pFind; } IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault() { - CFX_LinuxFontInfo* pInfo = FX_NEW CFX_LinuxFontInfo; + CFX_LinuxFontInfo* pInfo = new CFX_LinuxFontInfo; if (!pInfo) { return NULL; } diff --git a/core/src/fxge/ge/fx_ge_ps.cpp b/core/src/fxge/ge/fx_ge_ps.cpp index 2e3af36527..5a97d5b18b 100644 --- a/core/src/fxge/ge/fx_ge_ps.cpp +++ b/core/src/fxge/ge/fx_ge_ps.cpp @@ -572,7 +572,7 @@ void CFX_PSRenderer::FindPSFontGlyph(CFX_FaceCache* pFaceCache, } if (m_PSFontList.GetSize() == 0 || m_PSFontList[m_PSFontList.GetSize() - 1]->m_nGlyphs == 256) { - CPSFont* pPSFont = FX_NEW CPSFont; + CPSFont* pPSFont = new CPSFont; if (!pPSFont) { return; } diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp index 5535eb247c..124ee7d88d 100644 --- a/core/src/fxge/ge/fx_ge_text.cpp +++ b/core/src/fxge/ge/fx_ge_text.cpp @@ -1226,7 +1226,7 @@ CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap( int anti_alias) { CFX_SizeGlyphCache* pSizeCache = NULL; if (!m_SizeMap.Lookup(FaceGlyphsKey, (void*&)pSizeCache)) { - pSizeCache = FX_NEW CFX_SizeGlyphCache; + pSizeCache = new CFX_SizeGlyphCache; if (pSizeCache == NULL) { return NULL; } @@ -1571,7 +1571,7 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, return NULL; } int dib_width = bmwidth; - CFX_GlyphBitmap* pGlyphBitmap = FX_NEW CFX_GlyphBitmap; + CFX_GlyphBitmap* pGlyphBitmap = new CFX_GlyphBitmap; if (!pGlyphBitmap) { return NULL; } @@ -1923,7 +1923,7 @@ CFX_PathData* CFX_Font::LoadGlyphPath(FX_DWORD glyph_index, int dest_width) { if (params.m_PointCount == 0) { return NULL; } - CFX_PathData* pPath = FX_NEW CFX_PathData; + CFX_PathData* pPath = new CFX_PathData; if (!pPath) { return NULL; } diff --git a/core/src/fxge/skia/fx_skia_device.cpp b/core/src/fxge/skia/fx_skia_device.cpp index 8f98293673..a13c21889c 100644 --- a/core/src/fxge/skia/fx_skia_device.cpp +++ b/core/src/fxge/skia/fx_skia_device.cpp @@ -265,7 +265,7 @@ CFX_SkiaDeviceDriver::CFX_SkiaDeviceDriver(CFX_DIBitmap* pBitmap, FX_BOOL bRgbByteOrder, CFX_DIBitmap* pOriDevice, FX_BOOL bGroupKnockout) { - m_pAggDriver = FX_NEW CFX_AggDeviceDriver(pBitmap, dither_bits, bRgbByteOrder, + m_pAggDriver = new CFX_AggDeviceDriver(pBitmap, dither_bits, bRgbByteOrder, pOriDevice, bGroupKnockout); } CFX_SkiaDeviceDriver::~CFX_SkiaDeviceDriver() { @@ -335,7 +335,7 @@ FX_BOOL CFX_SkiaDeviceDriver::SetClip_PathFill( int fill_mode // fill mode, WINDING or ALTERNATE ) { if (m_pAggDriver->m_pClipRgn == NULL) - m_pAggDriver->m_pClipRgn = FX_NEW CFX_ClipRgn( + m_pAggDriver->m_pClipRgn = new CFX_ClipRgn( GetDeviceCaps(FXDC_PIXEL_WIDTH), GetDeviceCaps(FXDC_PIXEL_HEIGHT)); if (pPathData->GetPointCount() == 5 || pPathData->GetPointCount() == 4) { @@ -372,7 +372,7 @@ FX_BOOL CFX_SkiaDeviceDriver::SetClip_PathStroke( const CFX_GraphStateData* pGraphState // graphic state, for pen attributes ) { if (m_pAggDriver->m_pClipRgn == NULL) - m_pAggDriver->m_pClipRgn = FX_NEW CFX_ClipRgn( + m_pAggDriver->m_pClipRgn = new CFX_ClipRgn( GetDeviceCaps(FXDC_PIXEL_WIDTH), GetDeviceCaps(FXDC_PIXEL_HEIGHT)); // build path data @@ -598,7 +598,7 @@ FX_BOOL CFX_SkiaDevice::Attach(CFX_DIBitmap* pBitmap, if (pBitmap == NULL) return FALSE; SetBitmap(pBitmap); - CFX_SkiaDeviceDriver* pDriver = FX_NEW CFX_SkiaDeviceDriver( + CFX_SkiaDeviceDriver* pDriver = new CFX_SkiaDeviceDriver( pBitmap, dither_bits, bRgbByteOrder, pOriDevice, bGroupKnockout); SetDeviceDriver(pDriver); return TRUE; @@ -610,13 +610,13 @@ FX_BOOL CFX_SkiaDevice::Create(int width, int dither_bits, CFX_DIBitmap* pOriDevice) { m_bOwnedBitmap = TRUE; - CFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pBitmap = new CFX_DIBitmap; if (!pBitmap->Create(width, height, format)) { delete pBitmap; return FALSE; } SetBitmap(pBitmap); - CFX_SkiaDeviceDriver* pDriver = FX_NEW CFX_SkiaDeviceDriver( + CFX_SkiaDeviceDriver* pDriver = new CFX_SkiaDeviceDriver( pBitmap, dither_bits, FALSE, pOriDevice, FALSE); SetDeviceDriver(pDriver); return TRUE; diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp index d0d13b1018..295a6e94ca 100644 --- a/core/src/fxge/win32/fx_win32_device.cpp +++ b/core/src/fxge/win32/fx_win32_device.cpp @@ -405,7 +405,7 @@ IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault() { return new CFX_Win32FontInfo; } void CFX_GEModule::InitPlatform() { - CWin32Platform* pPlatformData = FX_NEW CWin32Platform; + CWin32Platform* pPlatformData = new CWin32Platform; if (!pPlatformData) { return; } @@ -1251,7 +1251,7 @@ CFX_WindowsDevice::CFX_WindowsDevice(HDC hDC, m_bForcePSOutput = bForcePSOutput; m_psLevel = psLevel; if (bForcePSOutput) { - IFX_RenderDeviceDriver* pDriver = FX_NEW CPSPrinterDriver; + IFX_RenderDeviceDriver* pDriver = new CPSPrinterDriver; if (!pDriver) { return; } @@ -1280,9 +1280,9 @@ IFX_RenderDeviceDriver* CFX_WindowsDevice::CreateDriver(HDC hDC, device_class = FXDC_DISPLAY; } if (device_class == FXDC_PRINTER) { - return FX_NEW CGdiPrinterDriver(hDC); + return new CGdiPrinterDriver(hDC); } - return FX_NEW CGdiDisplayDriver(hDC); + return new CGdiDisplayDriver(hDC); } CFX_WinBitmapDevice::CFX_WinBitmapDevice(int width, int height, @@ -1300,7 +1300,7 @@ CFX_WinBitmapDevice::CFX_WinBitmapDevice(int width, if (m_hBitmap == NULL) { return; } - CFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pBitmap = new CFX_DIBitmap; if (!pBitmap) { return; } @@ -1308,7 +1308,7 @@ CFX_WinBitmapDevice::CFX_WinBitmapDevice(int width, SetBitmap(pBitmap); m_hDC = ::CreateCompatibleDC(NULL); m_hOldBitmap = (HBITMAP)SelectObject(m_hDC, m_hBitmap); - IFX_RenderDeviceDriver* pDriver = FX_NEW CGdiDisplayDriver(m_hDC); + IFX_RenderDeviceDriver* pDriver = new CGdiDisplayDriver(m_hDC); if (!pDriver) { return; } diff --git a/core/src/fxge/win32/fx_win32_dib.cpp b/core/src/fxge/win32/fx_win32_dib.cpp index d7dd912d14..f6230f6ce0 100644 --- a/core/src/fxge/win32/fx_win32_dib.cpp +++ b/core/src/fxge/win32/fx_win32_dib.cpp @@ -59,7 +59,7 @@ CFX_DIBitmap* _FX_WindowsDIB_LoadFromBuf(BITMAPINFO* pbmi, bBottomUp = FALSE; } int pitch = (width * pbmi->bmiHeader.biBitCount + 31) / 32 * 4; - CFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pBitmap = new CFX_DIBitmap; if (!pBitmap) { return NULL; } @@ -131,7 +131,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromFile(const FX_WCHAR* filename) { HDC hDC = CreateCompatibleDC(NULL); int width, height; GetBitmapSize(hBitmap, width, height); - CFX_DIBitmap* pDIBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pDIBitmap = new CFX_DIBitmap; if (!pDIBitmap) { DeleteDC(hDC); return NULL; @@ -168,7 +168,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadDIBitmap(WINDIB_Open_Args_ args) { HDC hDC = CreateCompatibleDC(NULL); int width, height; GetBitmapSize(hBitmap, width, height); - CFX_DIBitmap* pDIBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pDIBitmap = new CFX_DIBitmap; if (!pDIBitmap) { DeleteDC(hDC); return NULL; @@ -204,7 +204,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromDDB(HDC hDC, int height = abs(bmih.biHeight); bmih.biHeight = -height; bmih.biCompression = BI_RGB; - CFX_DIBitmap* pDIBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pDIBitmap = new CFX_DIBitmap; if (!pDIBitmap) { return NULL; } diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp index cf54e0ccaa..f4f6d91fbc 100644 --- a/core/src/fxge/win32/fx_win32_dwrite.cpp +++ b/core/src/fxge/win32/fx_win32_dwrite.cpp @@ -63,7 +63,7 @@ class CDwFontFileLoader final : public IDWriteFontFileLoader { static IDWriteFontFileLoader* GetLoader() { if (instance_ == NULL) { - instance_ = FX_NEW CDwFontFileLoader(); + instance_ = new CDwFontFileLoader(); return instance_; } return instance_; @@ -190,7 +190,7 @@ FX_BOOL CDWriteExt::DwCreateRenderingTarget(CFX_DIBitmap* pBitmap, goto failed; } *(CDwGdiTextRenderer**)renderTarget = - FX_NEW CDwGdiTextRenderer(pBitmap, pBitmapRenderTarget, pRenderingParams); + new CDwGdiTextRenderer(pBitmap, pBitmapRenderTarget, pRenderingParams); if (*(CDwGdiTextRenderer**)renderTarget == NULL) { goto failed; } @@ -336,7 +336,7 @@ HRESULT STDMETHODCALLTYPE CDwFontFileLoader::CreateStreamFromKey( OUT IDWriteFontFileStream** fontFileStream) { *fontFileStream = NULL; CDwFontFileStream* stream = - FX_NEW CDwFontFileStream(fontFileReferenceKey, fontFileReferenceKeySize); + new CDwFontFileStream(fontFileReferenceKey, fontFileReferenceKeySize); if (stream == NULL) { return E_OUTOFMEMORY; } diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp index bfaccc78bd..9dbc7b4289 100644 --- a/core/src/fxge/win32/fx_win32_gdipext.cpp +++ b/core/src/fxge/win32/fx_win32_gdipext.cpp @@ -475,7 +475,7 @@ static CFX_DIBitmap* _StretchMonoToGray(int dest_width, int result_width = pClipRect->Width(); int result_height = pClipRect->Height(); int result_pitch = (result_width + 3) / 4 * 4; - CFX_DIBitmap* pStretched = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pStretched = new CFX_DIBitmap; if (!pStretched) { return NULL; } @@ -1416,7 +1416,7 @@ static PREVIEW3_DIBITMAP* LoadDIBitmap(WINDIB_Open_Args_ args) { if (args.memory_size == 0 || !args.memory_base) { return NULL; } - pStream = FX_NEW GpStream; + pStream = new GpStream; if (!pStream) { return NULL; } diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp index 1b3ba4eee5..aa8eefd1bb 100644 --- a/core/src/fxge/win32/fx_win32_print.cpp +++ b/core/src/fxge/win32/fx_win32_print.cpp @@ -169,7 +169,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, CPDF_FixedMatrix result2src_fix(result2src, 8); int result_width = result_rect.Width(); int result_height = result_rect.Height(); - CFX_DIBitmap* pTempBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pTempBitmap = new CFX_DIBitmap; if (!pTempBitmap) { if (pSrcBitmap != src_bitmap) { delete pSrcBitmap; @@ -325,7 +325,7 @@ FX_BOOL CPSPrinterDriver::Init(HDC hDC, int pslevel, FX_BOOL bCmykOutput) { m_Width = ::GetDeviceCaps(m_hDC, HORZRES); m_Height = ::GetDeviceCaps(m_hDC, VERTRES); m_nBitsPerPixel = ::GetDeviceCaps(m_hDC, BITSPIXEL); - m_pPSOutput = FX_NEW CPSOutput(hDC); + m_pPSOutput = new CPSOutput(hDC); if (!m_pPSOutput) { return FALSE; } |