summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_edit
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-07 10:46:22 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-07 10:46:23 -0700
commit4997b22f84307521a62838f874928bf56cd3423c (patch)
treead11d99ac0a491ee222e9d0a42ec3b6ad3354e2a /core/fpdfapi/fpdf_edit
parent0687e76dc259c678b3f29a6608331f07ffd8f1e2 (diff)
downloadpdfium-4997b22f84307521a62838f874928bf56cd3423c.tar.xz
Get rid of NULLs in core/
Review-Url: https://codereview.chromium.org/2032613003
Diffstat (limited to 'core/fpdfapi/fpdf_edit')
-rw-r--r--core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp11
-rw-r--r--core/fpdfapi/fpdf_edit/include/cpdf_creator.h2
2 files changed, 7 insertions, 6 deletions
diff --git a/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/fpdf_edit/cpdf_pagecontentgenerator.cpp
index 2907ebe71c..20ae34349b 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,
diff --git a/core/fpdfapi/fpdf_edit/include/cpdf_creator.h b/core/fpdfapi/fpdf_edit/include/cpdf_creator.h
index 8782c54f86..285efff4b0 100644
--- a/core/fpdfapi/fpdf_edit/include/cpdf_creator.h
+++ b/core/fpdfapi/fpdf_edit/include/cpdf_creator.h
@@ -33,7 +33,7 @@ class CPDF_Creator {
void RemoveSecurity();
bool Create(IFX_StreamWrite* pFile, uint32_t flags = 0);
- int32_t Continue(IFX_Pause* pPause = NULL);
+ int32_t Continue(IFX_Pause* pPause = nullptr);
FX_BOOL SetFileVersion(int32_t fileVersion = 17);
private: