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

Unified Diff: fpdfsdk/javascript/Field.cpp

Issue 2031653003: Get rid of NULLs in fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_core
Patch Set: rebase 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 | « fpdfsdk/javascript/Document.cpp ('k') | fpdfsdk/javascript/Icon.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/Field.cpp
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 5808982b433b4dfc74ef52bafbd5c5521d91b9a3..43bc89e26e53897434652e0ed37dbef3b0a73e14 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -122,12 +122,12 @@ void CJS_Field::InitInstance(IJS_Runtime* pIRuntime) {
Field::Field(CJS_Object* pJSObject)
: CJS_EmbedObj(pJSObject),
- m_pJSDoc(NULL),
- m_pDocument(NULL),
+ m_pJSDoc(nullptr),
+ m_pDocument(nullptr),
m_nFormControlIndex(-1),
m_bCanSet(FALSE),
m_bDelay(FALSE),
- m_isolate(NULL) {}
+ m_isolate(nullptr) {}
Field::~Field() {}
@@ -262,16 +262,16 @@ void Field::UpdateFormControl(CPDFSDK_Document* pDocument,
if (bFormated)
pWidget->ResetAppearance(sValue.c_str(), FALSE);
else
- pWidget->ResetAppearance(NULL, FALSE);
+ pWidget->ResetAppearance(nullptr, FALSE);
} else {
- pWidget->ResetAppearance(NULL, FALSE);
+ pWidget->ResetAppearance(nullptr, FALSE);
}
}
if (bRefresh) {
CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm();
CPDFSDK_Document* pDoc = pInterForm->GetDocument();
- pDoc->UpdateAllViews(NULL, pWidget);
+ pDoc->UpdateAllViews(nullptr, pWidget);
}
}
@@ -299,7 +299,7 @@ FX_BOOL Field::ValueIsOccur(CPDF_FormField* pFormField,
CPDF_FormControl* Field::GetSmartFieldControl(CPDF_FormField* pFormField) {
if (!pFormField->CountControls() ||
m_nFormControlIndex >= pFormField->CountControls())
- return NULL;
+ return nullptr;
if (m_nFormControlIndex < 0)
return pFormField->GetControl(0);
@@ -2956,7 +2956,7 @@ FX_BOOL Field::buttonGetIcon(IJS_Context* cc,
CJS_Icon* pJS_Icon = (CJS_Icon*)FXJS_GetPrivate(pRuntime->GetIsolate(), pObj);
Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject();
- CPDF_Stream* pIconStream = NULL;
+ CPDF_Stream* pIconStream = nullptr;
if (nface == 0)
pIconStream = pFormControl->GetNormalIcon();
else if (nface == 1)
@@ -3254,7 +3254,7 @@ FX_BOOL Field::setFocus(IJS_Context* cc,
CPDFSDK_InterForm* pInterForm =
(CPDFSDK_InterForm*)m_pDocument->GetInterForm();
- CPDFSDK_Widget* pWidget = NULL;
+ CPDFSDK_Widget* pWidget = nullptr;
if (nCount == 1) {
pWidget = pInterForm->GetWidget(pFormField->GetControl(0));
} else {
@@ -3343,7 +3343,7 @@ FX_BOOL Field::source(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
if (vp.IsGetting()) {
- vp << (CJS_Object*)NULL;
+ vp << (CJS_Object*)nullptr;
}
return TRUE;
« no previous file with comments | « fpdfsdk/javascript/Document.cpp ('k') | fpdfsdk/javascript/Icon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698