Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(680)

Unified Diff: core/src/reflow/layoutprocessor_reflow.cpp

Issue 1084613006: Fix all remaining instances of FX_NEW. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: std::min Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/reflow/autoreflow.cpp ('k') | core/src/reflow/layoutprovider_taggedpdf.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/reflow/layoutprocessor_reflow.cpp
diff --git a/core/src/reflow/layoutprocessor_reflow.cpp b/core/src/reflow/layoutprocessor_reflow.cpp
index d2fa7e937125ed74fb6a347615d36dbae975a13b..218d301f0fbb95950dbb65f91084b591e66da0aa 100644
--- a/core/src/reflow/layoutprocessor_reflow.cpp
+++ b/core/src/reflow/layoutprocessor_reflow.cpp
@@ -12,10 +12,7 @@ IPDF_LayoutProcessor* IPDF_LayoutProcessor::Create_LayoutProcessor_Reflow(FX_FLO
if(pReflowedPage == NULL || fWidth <= 20) {
return NULL;
}
- CPDF_LayoutProcessor_Reflow* pReflowEngine = FX_NEW CPDF_LayoutProcessor_Reflow();
- if (NULL == pReflowEngine) {
- return NULL;
- }
+ CPDF_LayoutProcessor_Reflow* pReflowEngine = new CPDF_LayoutProcessor_Reflow();
pReflowEngine->Init(TopIndent, fWidth, fHeight, (CPDF_ReflowedPage*)pReflowedPage, flags, lineSpace);
return pReflowEngine;
}
@@ -29,8 +26,8 @@ CPDF_LayoutProcessor_Reflow::CPDF_LayoutProcessor_Reflow()
m_fCurrLineHeight = 0;
m_bIllustration = FALSE;
m_pPreObj = NULL;
- m_pCurrLine = FX_NEW CRF_DataPtrArray(50);
- m_pTempLine = FX_NEW CRF_DataPtrArray(50);
+ m_pCurrLine = new CRF_DataPtrArray(50);
+ m_pTempLine = new CRF_DataPtrArray(50);
m_StartIndent = 0;
m_PausePosition = 0;
}
@@ -557,10 +554,7 @@ void CPDF_LayoutProcessor_Reflow::ProcessElement(IPDF_LayoutElement* pElement, F
}
switch(layoutType) {
case LayoutTable: {
- CRF_Table* pTable = FX_NEW CRF_Table;
- if (NULL == pTable) {
- break;
- }
+ CRF_Table* pTable = new CRF_Table;
m_TableArray.Add(pTable);
pTable->m_ReflowPageHeight = m_pReflowedPage->m_PageHeight;
pTable->m_TableWidth = GetElmWidth(pElement);
@@ -771,10 +765,7 @@ void CPDF_LayoutProcessor_Reflow::ProcessObject(CPDF_PageObject* pObj, FX_FLOAT
if(!(m_flags & RF_PARSER_IMAGE)) {
return;
}
- CPDF_PageObjects* pObjs = FX_NEW CPDF_PageObjects(FALSE);
- if (NULL == pObjs) {
- return;
- }
+ CPDF_PageObjects* pObjs = new CPDF_PageObjects(FALSE);
FX_POSITION pos = pObjs->GetLastObjectPosition();
pos = pObjs->InsertObject(pos, pObj);
CFX_AffineMatrix matrix;
« no previous file with comments | « core/src/reflow/autoreflow.cpp ('k') | core/src/reflow/layoutprovider_taggedpdf.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698