From 5c357a5d3d873be6b0ab01d7bec82f79d0a09f0e Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 16 Apr 2015 14:37:47 -0700 Subject: Replace FX_NEW with new, remove tests from fpdfapi Very few places where a change is required, but remove FX_NEW to show they've been audited. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1075953004 --- core/src/fpdfapi/fpdf_render/fpdf_render.cpp | 46 ++++++++++------------ core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp | 10 ++--- core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp | 10 ++--- .../fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 21 +++++----- .../fpdfapi/fpdf_render/fpdf_render_pattern.cpp | 2 +- core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp | 6 +-- 6 files changed, 44 insertions(+), 51 deletions(-) (limited to 'core/src/fpdfapi/fpdf_render') diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp index 490ceb9ee2..f8c4a41186 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp @@ -59,15 +59,15 @@ void CPDF_DocRenderData::Clear(FX_BOOL bRelease) } FX_BOOL CPDF_DocRenderData::Initialize() { - m_pFontCache = FX_NEW CFX_FontCache; + m_pFontCache = new CFX_FontCache; return TRUE; } CPDF_Type3Cache* CPDF_DocRenderData::GetCachedType3(CPDF_Type3Font* pFont) { CPDF_CountedObject* pCache; if (!m_Type3FaceMap.Lookup(pFont, pCache)) { - CPDF_Type3Cache* pType3 = FX_NEW CPDF_Type3Cache(pFont); - pCache = FX_NEW CPDF_CountedObject; + CPDF_Type3Cache* pType3 = new CPDF_Type3Cache(pFont); + pCache = new CPDF_CountedObject; pCache->m_Obj = pType3; pCache->m_nCount = 1; m_Type3FaceMap.SetAt(pFont, pCache); @@ -100,7 +100,7 @@ public: } virtual CPDF_PageRenderCache* CreatePageCache(CPDF_Page* pPage) { - return FX_NEW CPDF_PageRenderCache(pPage); + return new CPDF_PageRenderCache(pPage); } virtual void DestroyPageCache(CPDF_PageRenderCache* pCache); virtual CPDF_RenderConfig* GetConfig() @@ -113,7 +113,7 @@ private: }; CPDF_DocRenderData* CPDF_RenderModule::CreateDocData(CPDF_Document* pDoc) { - CPDF_DocRenderData* pData = FX_NEW CPDF_DocRenderData(pDoc); + CPDF_DocRenderData* pData = new CPDF_DocRenderData(pDoc); pData->Initialize(); return pData; } @@ -133,10 +133,8 @@ void CPDF_RenderModule::DestroyPageCache(CPDF_PageRenderCache* pCache) } void CPDF_ModuleMgr::InitRenderModule() { - if (m_pRenderModule) { - delete m_pRenderModule; - } - m_pRenderModule = FX_NEW CPDF_RenderModule; + delete m_pRenderModule; + m_pRenderModule = new CPDF_RenderModule; } CPDF_RenderOptions::CPDF_RenderOptions() : m_ColorMode(RENDER_COLOR_NORMAL) @@ -349,11 +347,10 @@ FX_BOOL CPDF_RenderStatus::ContinueSingleObject(const CPDF_PageObject* pObj, con } IPDF_ObjectRenderer* IPDF_ObjectRenderer::Create(int type) { - IPDF_ObjectRenderer* pRenderer = NULL; - if (type == PDFPAGE_IMAGE) { - pRenderer = FX_NEW CPDF_ImageRenderer; + if (type != PDFPAGE_IMAGE) { + return NULL; } - return pRenderer; + return new CPDF_ImageRenderer; } FX_BOOL CPDF_RenderStatus::GetObjectClippedRect(const CPDF_PageObject* pObj, const CFX_AffineMatrix* pObj2Device, FX_BOOL bLogical, FX_RECT &rect) const { @@ -668,7 +665,7 @@ void CPDF_RenderStatus::ProcessClipPath(CPDF_ClipPath ClipPath, const CFX_Affine } } else { if (pTextClippingPath == NULL) { - pTextClippingPath = FX_NEW CFX_PathData; + pTextClippingPath = new CFX_PathData; } ProcessText(pText, pObj2Device, pTextClippingPath); } @@ -803,7 +800,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj, CFX_FxgeDevice bitmap_device; CFX_DIBitmap* oriDevice = NULL; if (!isolated && (m_pDevice->GetRenderCaps() & FXRC_GET_BITS)) { - oriDevice = FX_NEW CFX_DIBitmap; + oriDevice = new CFX_DIBitmap; if (!m_pDevice->CreateCompatibleBitmap(oriDevice, width, height)) { return TRUE; } @@ -819,7 +816,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj, new_matrix.Scale(scaleX, scaleY); CFX_DIBitmap* pTextMask = NULL; if (bTextClip) { - pTextMask = FX_NEW CFX_DIBitmap; + pTextMask = new CFX_DIBitmap; if (!pTextMask->Create(width, height, FXDIB_8bppMask)) { delete pTextMask; return TRUE; @@ -884,7 +881,7 @@ CFX_DIBitmap* CPDF_RenderStatus::GetBackdrop(const CPDF_PageObject* pObj, const FX_FLOAT scaleY = FXSYS_fabs(deviceCTM.d); int width = FXSYS_round(bbox.Width() * scaleX); int height = FXSYS_round(bbox.Height() * scaleY); - CFX_DIBitmap* pBackdrop = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pBackdrop = new CFX_DIBitmap; if (bBackAlphaRequired && !m_bDropObjects) { pBackdrop->Create(width, height, FXDIB_Argb); } else { @@ -931,10 +928,7 @@ CPDF_GraphicStates* CPDF_RenderStatus::CloneObjStates(const CPDF_GraphicStates* if (!pSrcStates) { return NULL; } - CPDF_GraphicStates* pStates = FX_NEW CPDF_GraphicStates; - if (!pStates) { - return NULL; - } + CPDF_GraphicStates* pStates = new CPDF_GraphicStates; pStates->CopyStates(*pSrcStates); CPDF_Color* pObjColor = bStroke ? pSrcStates->m_ColorState.GetStrokeColor() : pSrcStates->m_ColorState.GetFillColor(); @@ -1119,7 +1113,7 @@ void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) if (m_pRenderer == NULL) { m_ObjectPos = pItem->m_pObjectList->GetFirstObjectPosition(); m_ObjectIndex = 0; - m_pRenderer = FX_NEW CPDF_RenderStatus(); + m_pRenderer = new CPDF_RenderStatus(); m_pRenderer->Initialize(m_pContext, m_pDevice, NULL, NULL, NULL, NULL, m_pOptions, pItem->m_pObjectList->m_Transparency, m_bDropObjects, NULL); m_pDevice->SaveState(); @@ -1221,9 +1215,9 @@ CPDF_TransferFunc* CPDF_DocRenderData::GetTransferFunc(CPDF_Object* pObj) return NULL; } } - pTransfer = FX_NEW CPDF_TransferFunc; + pTransfer = new CPDF_TransferFunc; pTransfer->m_pPDFDoc = m_pPDFDoc; - pTransferCounter = FX_NEW CPDF_CountedObject; + pTransferCounter = new CPDF_CountedObject; pTransferCounter->m_nCount = 1; pTransferCounter->m_Obj = pTransfer; m_TransferFuncMap.SetAt(pObj, pTransferCounter); @@ -1326,7 +1320,7 @@ FX_BOOL CPDF_DeviceBuffer::Initialize(CPDF_RenderContext* pContext, CFX_RenderDe CFX_FloatRect rect(*pRect); m_Matrix.TransformRect(rect); FX_RECT bitmap_rect = rect.GetOutterRect(); - m_pBitmap = FX_NEW CFX_DIBitmap; + m_pBitmap = new CFX_DIBitmap; m_pBitmap->Create(bitmap_rect.Width(), bitmap_rect.Height(), FXDIB_Argb); return TRUE; } @@ -1381,7 +1375,7 @@ FX_BOOL CPDF_ScaledRenderBuffer::Initialize(CPDF_RenderContext* pContext, CFX_Re m_Matrix.Scale(1.0f, (FX_FLOAT)(max_dpi) / (FX_FLOAT)dpiv); } } - m_pBitmapDevice = FX_NEW CFX_FxgeDevice; + m_pBitmapDevice = new CFX_FxgeDevice; FXDIB_Format dibFormat = FXDIB_Rgb; FX_INT32 bpp = 24; if (m_pDevice->GetDeviceCaps(FXDC_RENDER_CAPS) & FXRC_ALPHA_OUTPUT) { diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp index de2a409e1c..658fc47266 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp @@ -111,7 +111,7 @@ void CPDF_PageRenderCache::GetCachedBitmap(CPDF_Stream* pStream, CFX_DIBSource*& CPDF_ImageCache* pImageCache; FX_BOOL bFind = m_ImageCaches.Lookup(pStream, (FX_LPVOID&)pImageCache); if (!bFind) { - pImageCache = FX_NEW CPDF_ImageCache(m_pPage->m_pDocument, pStream); + pImageCache = new CPDF_ImageCache(m_pPage->m_pDocument, pStream); } m_nTimeCount ++; FX_BOOL bCached = pImageCache->GetCachedBitmap(pBitmap, pMask, MatteColor, m_pPage->m_pPageResources, bStdCS, GroupFamily, bLoadMask, pRenderStatus, downsampleWidth, downsampleHeight); @@ -126,7 +126,7 @@ FX_BOOL CPDF_PageRenderCache::StartGetCachedBitmap(CPDF_Stream* pStream, FX_BOOL { m_bCurFindCache = m_ImageCaches.Lookup(pStream, (FX_LPVOID&)m_pCurImageCache); if (!m_bCurFindCache) { - m_pCurImageCache = FX_NEW CPDF_ImageCache(m_pPage->m_pDocument, pStream); + m_pCurImageCache = new CPDF_ImageCache(m_pPage->m_pDocument, pStream); } int ret = m_pCurImageCache->StartGetCachedBitmap(pRenderStatus->m_pFormResource, m_pPage->m_pPageResources, bStdCS, GroupFamily, bLoadMask, pRenderStatus, downsampleWidth, downsampleHeight); if (ret == 2) { @@ -163,7 +163,7 @@ void CPDF_PageRenderCache::ResetBitmap(CPDF_Stream* pStream, const CFX_DIBitmap* if (pBitmap == NULL) { return; } - pImageCache = FX_NEW CPDF_ImageCache(m_pPage->m_pDocument, pStream); + pImageCache = new CPDF_ImageCache(m_pPage->m_pDocument, pStream); m_ImageCaches.SetAt(pStream, pImageCache); } int oldsize = pImageCache->EstimateSize(); @@ -240,7 +240,7 @@ FX_BOOL CPDF_ImageCache::GetCachedBitmap(CFX_DIBSource*& pBitmap, CFX_DIBSource* CPDF_RenderContext*pContext = pRenderStatus->GetContext(); CPDF_PageRenderCache* pPageRenderCache = pContext->m_pPageCache; m_dwTimeCount = pPageRenderCache->GetTimeCount(); - CPDF_DIBSource* pSrc = FX_NEW CPDF_DIBSource; + CPDF_DIBSource* pSrc = new CPDF_DIBSource; CPDF_DIBSource* pMaskSrc = NULL; if (!pSrc->Load(m_pDocument, m_pStream, &pMaskSrc, &MatteColor, pRenderStatus->m_pFormResource, pPageResources, bStdCS, GroupFamily, bLoadMask)) { delete pSrc; @@ -289,7 +289,7 @@ int CPDF_ImageCache::StartGetCachedBitmap(CPDF_Dictionary* pFormResources, CPDF_ return 0; } m_pRenderStatus = pRenderStatus; - m_pCurBitmap = FX_NEW CPDF_DIBSource; + m_pCurBitmap = new CPDF_DIBSource; int ret = ((CPDF_DIBSource*)m_pCurBitmap)->StartLoadDIBSource(m_pDocument, m_pStream, TRUE, pFormResources, pPageResources, bStdCS, GroupFamily, bLoadMask); if (ret == 2) { return ret; diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp index 663a74861a..9a11fa8798 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp @@ -103,7 +103,7 @@ void CPDF_RenderStatus::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, int left, int else pBackdrop->CompositeMask(left - back_left, top - back_top, pDIBitmap->GetWidth(), pDIBitmap->GetHeight(), pDIBitmap, mask_argb, 0, 0, blend_mode); - CFX_DIBitmap* pBackdrop1 = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pBackdrop1 = new CFX_DIBitmap; pBackdrop1->Create(pBackdrop->GetWidth(), pBackdrop->GetHeight(), FXDIB_Rgb32); pBackdrop1->Clear((FX_DWORD) - 1); pBackdrop1->CompositeBitmap(0, 0, pBackdrop->GetWidth(), pBackdrop->GetHeight(), pBackdrop, 0, 0); @@ -119,7 +119,7 @@ FX_COLORREF CPDF_TransferFunc::TranslateColor(FX_COLORREF rgb) } CFX_DIBSource* CPDF_TransferFunc::TranslateImage(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc) { - CPDF_DIBTransferFunc* pDest = FX_NEW CPDF_DIBTransferFunc(this); + CPDF_DIBTransferFunc* pDest = new CPDF_DIBTransferFunc(this); pDest->LoadSrc(pSrc, bAutoDropSrc); return pDest; } @@ -676,7 +676,7 @@ FX_BOOL CPDF_ImageRenderer::StartDIBSource() FX_RECT clip_box = m_pRenderStatus->m_pDevice->GetClipBox(); clip_box.Intersect(image_rect); m_Status = 2; - m_pTransformer = FX_NEW CFX_ImageTransformer; + m_pTransformer = new CFX_ImageTransformer; m_pTransformer->Start(m_pDIBSource, &m_ImageMatrix, m_Flags, &clip_box); return TRUE; } @@ -891,7 +891,7 @@ FX_BOOL CPDF_QuickStretcher::Start(CPDF_ImageObject* pImageObj, CFX_AffineMatrix } m_pDecoder->DownScale(m_DestWidth, m_DestHeight); } - m_pBitmap = FX_NEW CFX_DIBitmap; + m_pBitmap = new CFX_DIBitmap; #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ m_pBitmap->Create(m_ResultWidth, m_ResultHeight, FXDIB_Rgb32); #else @@ -1043,7 +1043,7 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict, status.Initialize(m_pContext, &bitmap_device, NULL, NULL, NULL, NULL, &options, 0, m_bDropObjects, pFormResource, TRUE, NULL, 0, pCS ? pCS->GetFamily() : 0, bLuminosity); status.RenderObjectList(&form, &matrix); - pMask = FX_NEW CFX_DIBitmap; + pMask = new CFX_DIBitmap; if (!pMask->Create(width, height, FXDIB_8bppMask)) { delete pMask; return NULL; diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index 79d73518a1..72719d3618 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -59,7 +59,7 @@ FX_SAFE_DWORD CalculatePitch32(int bpp, int width) CFX_DIBSource* CPDF_Image::LoadDIBSource(CFX_DIBSource** ppMask, FX_DWORD* pMatteColor, FX_BOOL bStdCS, FX_DWORD GroupFamily, FX_BOOL bLoadMask) const { - CPDF_DIBSource* pSource = FX_NEW CPDF_DIBSource; + CPDF_DIBSource* pSource = new CPDF_DIBSource; if (pSource->Load(m_pDocument, m_pStream, (CPDF_DIBSource**)ppMask, pMatteColor, NULL, NULL, bStdCS, GroupFamily, bLoadMask)) { return pSource; } @@ -80,7 +80,7 @@ CFX_DIBSource* CPDF_Image::DetachMask() } FX_BOOL CPDF_Image::StartLoadDIBSource(CPDF_Dictionary* pFormResource, CPDF_Dictionary* pPageResource, FX_BOOL bStdCS, FX_DWORD GroupFamily, FX_BOOL bLoadMask) { - m_pDIBSource = FX_NEW CPDF_DIBSource; + m_pDIBSource = new CPDF_DIBSource; int ret = ((CPDF_DIBSource*)m_pDIBSource)->StartLoadDIBSource(m_pDocument, m_pStream, TRUE, pFormResource, pPageResource, bStdCS, GroupFamily, bLoadMask); if (ret == 2) { return TRUE; @@ -206,7 +206,7 @@ FX_BOOL CPDF_DIBSource::Load(CPDF_Document* pDoc, const CPDF_Stream* pStream, CP if (!src_pitch.IsValid()) { return FALSE; } - m_pStreamAcc = FX_NEW CPDF_StreamAcc; + m_pStreamAcc = new CPDF_StreamAcc; m_pStreamAcc->LoadAllData(pStream, FALSE, src_pitch.ValueOrDie(), TRUE); if (m_pStreamAcc->GetSize() == 0 || m_pStreamAcc->GetData() == NULL) { return FALSE; @@ -321,7 +321,7 @@ int CPDF_DIBSource::StartLoadDIBSource(CPDF_Document* pDoc, const CPDF_Stream* p if (!src_pitch.IsValid()) { return 0; } - m_pStreamAcc = FX_NEW CPDF_StreamAcc; + m_pStreamAcc = new CPDF_StreamAcc; m_pStreamAcc->LoadAllData(pStream, FALSE, src_pitch.ValueOrDie(), TRUE); if (m_pStreamAcc->GetSize() == 0 || m_pStreamAcc->GetData() == NULL) { return 0; @@ -367,7 +367,7 @@ int CPDF_DIBSource::ContinueLoadDIBSource(IFX_Pause* pPause) if (m_pStreamAcc->GetImageParam()) { CPDF_Stream* pGlobals = m_pStreamAcc->GetImageParam()->GetStream(FX_BSTRC("JBIG2Globals")); if (pGlobals) { - m_pGlobalStream = FX_NEW CPDF_StreamAcc; + m_pGlobalStream = new CPDF_StreamAcc; m_pGlobalStream->LoadAllData(pGlobals, FALSE); } } @@ -598,7 +598,7 @@ int CPDF_DIBSource::CreateDecoder() LoadJpxBitmap(); return m_pCachedBitmap != NULL ? 1 : 0; } else if (decoder == FX_BSTRC("JBIG2Decode")) { - m_pCachedBitmap = FX_NEW CFX_DIBitmap; + m_pCachedBitmap = new CFX_DIBitmap; if (!m_pCachedBitmap->Create(m_Width, m_Height, m_bImageMask ? FXDIB_1bppMask : FXDIB_1bppRgb)) { delete m_pCachedBitmap; m_pCachedBitmap = NULL; @@ -683,7 +683,7 @@ void CPDF_DIBSource::LoadJpxBitmap() width = (width * output_nComps + 2) / 3; format = FXDIB_Rgb; } - m_pCachedBitmap = FX_NEW CFX_DIBitmap; + m_pCachedBitmap = new CFX_DIBitmap; if (!m_pCachedBitmap->Create(width, height, format)) { delete m_pCachedBitmap; m_pCachedBitmap = NULL; @@ -798,7 +798,7 @@ CPDF_DIBSource* CPDF_DIBSource::DetachMask() } CPDF_DIBSource* CPDF_DIBSource::LoadMaskDIB(CPDF_Stream* pMask) { - CPDF_DIBSource* pMaskSource = FX_NEW CPDF_DIBSource; + CPDF_DIBSource* pMaskSource = new CPDF_DIBSource; if (!pMaskSource->Load(m_pDocument, pMask, NULL, NULL, NULL, NULL, TRUE)) { delete pMaskSource; return NULL; @@ -807,7 +807,7 @@ CPDF_DIBSource* CPDF_DIBSource::LoadMaskDIB(CPDF_Stream* pMask) } int CPDF_DIBSource::StartLoadMaskDIB() { - m_pMask = FX_NEW CPDF_DIBSource; + m_pMask = new CPDF_DIBSource; int ret = m_pMask->StartLoadDIBSource(m_pDocument, (CPDF_Stream*)m_pMaskStream, FALSE, NULL, NULL, TRUE); if (ret == 2) { if (m_Status == 0) { @@ -1498,8 +1498,7 @@ FX_BOOL CPDF_ImageLoader::StartLoadImage(const CPDF_ImageObject* pImage, CPDF_Pa { m_nDownsampleWidth = nDownsampleWidth; m_nDownsampleHeight = nDownsampleHeight; - CPDF_ProgressiveImageLoaderHandle* pLoaderHandle = NULL; - pLoaderHandle = FX_NEW CPDF_ProgressiveImageLoaderHandle; + CPDF_ProgressiveImageLoaderHandle* pLoaderHandle = new CPDF_ProgressiveImageLoaderHandle; FX_BOOL ret = pLoaderHandle->Start(this, pImage, pCache, bStdCS, GroupFamily, bLoadMask, pRenderStatus, m_nDownsampleWidth, m_nDownsampleHeight); LoadHandle = pLoaderHandle; return ret; diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp index 8024c991f4..7e2a13a406 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp @@ -887,7 +887,7 @@ static CFX_DIBitmap* DrawPatternBitmap(CPDF_Document* pDoc, CPDF_PageRenderCache CPDF_TilingPattern* pPattern, const CFX_AffineMatrix* pObject2Device, int width, int height, int flags) { - CFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap; + CFX_DIBitmap* pBitmap = new CFX_DIBitmap; if (!pBitmap->Create(width, height, pPattern->m_bColored ? FXDIB_Argb : FXDIB_8bppMask)) { delete pBitmap; return NULL; diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp index 0ea7ea1672..09843c9c62 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -29,7 +29,7 @@ CFX_GlyphBitmap* CPDF_Type3Cache::LoadGlyph(FX_DWORD charcode, const CFX_AffineM CFX_ByteStringC FaceGlyphsKey(keygen.m_Key, keygen.m_KeyLen); CPDF_Type3Glyphs* pSizeCache = NULL; if(!m_SizeMap.Lookup(FaceGlyphsKey, (void*&)pSizeCache)) { - pSizeCache = FX_NEW CPDF_Type3Glyphs; + pSizeCache = new CPDF_Type3Glyphs; m_SizeMap.SetAt(FaceGlyphsKey, pSizeCache); } CFX_GlyphBitmap* pGlyphBitmap; @@ -167,7 +167,7 @@ CFX_GlyphBitmap* CPDF_Type3Cache::RenderGlyph(CPDF_Type3Glyphs* pSize, FX_DWORD if (pResBitmap == NULL) { return NULL; } - CFX_GlyphBitmap* pGlyph = FX_NEW CFX_GlyphBitmap; + CFX_GlyphBitmap* pGlyph = new CFX_GlyphBitmap; pGlyph->m_Left = left; pGlyph->m_Top = -top; pGlyph->m_Bitmap.TakeOver(pResBitmap); @@ -689,7 +689,7 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj, { if (!bStroke) { CPDF_PathObject path; - CPDF_TextObject* pCopy = FX_NEW CPDF_TextObject; + CPDF_TextObject* pCopy = new CPDF_TextObject; pCopy->Copy(textobj); path.m_bStroke = FALSE; path.m_FillType = FXFILL_WINDING; -- cgit v1.2.3