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

Unified Diff: core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix a bad merge Created 4 years, 6 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/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp ('k') | core/fpdfapi/fpdf_edit/include/cpdf_creator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
diff --git a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
index 08bdb5bb0766cd02d9702321f4fdb4303ed994aa..6698a8e9ffa2d7cec5d0db70bba66d2166384153 100644
--- a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
@@ -47,11 +47,11 @@ void CPDF_PageContentGenerator::GenerateContent() {
ProcessImage(buf, pPageObj->AsImage());
}
CPDF_Object* pContent =
- pPageDict ? pPageDict->GetDirectObjectBy("Contents") : NULL;
+ pPageDict ? pPageDict->GetDirectObjectBy("Contents") : nullptr;
if (pContent) {
pPageDict->RemoveAt("Contents");
}
- CPDF_Stream* pStream = new CPDF_Stream(NULL, 0, NULL);
+ CPDF_Stream* pStream = new CPDF_Stream(nullptr, 0, nullptr);
pStream->SetData(buf.GetBuffer(), buf.GetLength(), FALSE, FALSE);
m_pDocument->AddIndirectObject(pStream);
pPageDict->SetAtReference("Contents", m_pDocument, pStream->GetObjNum());
@@ -108,7 +108,7 @@ void CPDF_PageContentGenerator::ProcessForm(CFX_ByteTextBuf& buf,
if (!data || !size) {
return;
}
- CPDF_Stream* pStream = new CPDF_Stream(NULL, 0, NULL);
+ CPDF_Stream* pStream = new CPDF_Stream(nullptr, 0, nullptr);
CPDF_Dictionary* pFormDict = new CPDF_Dictionary;
pFormDict->SetAtName("Type", "XObject");
pFormDict->SetAtName("Subtype", "Form");
@@ -122,7 +122,8 @@ void CPDF_PageContentGenerator::ProcessForm(CFX_ByteTextBuf& buf,
}
void CPDF_PageContentGenerator::TransformContent(CFX_Matrix& matrix) {
CPDF_Dictionary* pDict = m_pPage->m_pFormDict;
- CPDF_Object* pContent = pDict ? pDict->GetDirectObjectBy("Contents") : NULL;
+ CPDF_Object* pContent =
+ pDict ? pDict->GetDirectObjectBy("Contents") : nullptr;
if (!pContent)
return;
@@ -159,7 +160,7 @@ void CPDF_PageContentGenerator::TransformContent(CFX_Matrix& matrix) {
contentStream.LoadAllData(pStream);
ProcessForm(buf, contentStream.GetData(), contentStream.GetSize(), matrix);
}
- CPDF_Stream* pStream = new CPDF_Stream(NULL, 0, NULL);
+ CPDF_Stream* pStream = new CPDF_Stream(nullptr, 0, nullptr);
pStream->SetData(buf.GetBuffer(), buf.GetLength(), FALSE, FALSE);
m_pDocument->AddIndirectObject(pStream);
m_pPage->m_pFormDict->SetAtReference("Contents", m_pDocument,
« no previous file with comments | « core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp ('k') | core/fpdfapi/fpdf_edit/include/cpdf_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698