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

Unified Diff: fpdfsdk/fsdk_baseform.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/fsdk_baseannot.cpp ('k') | fpdfsdk/fsdk_mgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fsdk_baseform.cpp
diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp
index 0f1a0ad0d182956c16a4aa3e461e9a0eeef9a937..65be7c8c5d26517f9ab1064299aa79632c611292 100644
--- a/fpdfsdk/fsdk_baseform.cpp
+++ b/fpdfsdk/fsdk_baseform.cpp
@@ -41,8 +41,8 @@ CPDFSDK_Widget::CPDFSDK_Widget(CPDF_Annot* pAnnot,
m_nValueAge(0)
#ifdef PDF_ENABLE_XFA
,
- m_hMixXFAWidget(NULL),
- m_pWidgetHandler(NULL)
+ m_hMixXFAWidget(nullptr),
+ m_pWidgetHandler(nullptr)
#endif // PDF_ENABLE_XFA
{
}
@@ -72,7 +72,7 @@ CXFA_FFWidget* CPDFSDK_Widget::GetMixXFAWidget() const {
return m_hMixXFAWidget;
}
- return NULL;
+ return nullptr;
}
CXFA_FFWidget* CPDFSDK_Widget::GetGroupMixXFAWidget() {
@@ -101,7 +101,7 @@ CXFA_FFWidgetHandler* CPDFSDK_Widget::GetXFAWidgetHandler() const {
return m_pWidgetHandler;
}
- return NULL;
+ return nullptr;
}
static XFA_EVENTTYPE GetXFAEventType(PDFSDK_XFAAActionType eXFAAAT) {
@@ -774,7 +774,7 @@ CFX_WideString CPDFSDK_Widget::OnFormat(FX_BOOL& bFormated) {
void CPDFSDK_Widget::ResetFieldAppearance(FX_BOOL bValueChanged) {
CPDF_FormField* pFormField = GetFormField();
ASSERT(pFormField);
- m_pInterForm->ResetFieldAppearance(pFormField, NULL, bValueChanged);
+ m_pInterForm->ResetFieldAppearance(pFormField, nullptr, bValueChanged);
}
void CPDFSDK_Widget::DrawAppearance(CFX_RenderDevice* pDevice,
@@ -932,9 +932,9 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() {
csDownCaption = pControl->GetDownCaption();
}
- CPDF_Stream* pNormalIcon = NULL;
- CPDF_Stream* pRolloverIcon = NULL;
- CPDF_Stream* pDownIcon = NULL;
+ CPDF_Stream* pNormalIcon = nullptr;
+ CPDF_Stream* pRolloverIcon = nullptr;
+ CPDF_Stream* pDownIcon = nullptr;
if (pControl->HasMKEntry("I")) {
pNormalIcon = pControl->GetNormalIcon();
@@ -1571,7 +1571,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue) {
CFX_FloatRect rcContent = pEdit->GetContentRect();
CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(
- pEdit, CFX_FloatPoint(0.0f, 0.0f), NULL, !bCharArray, subWord);
+ pEdit, CFX_FloatPoint(0.0f, 0.0f), nullptr, !bCharArray, subWord);
if (sEdit.GetLength() > 0) {
sBody << "/Tx BMC\n"
@@ -2487,10 +2487,8 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination,
pEnv->JS_docSubmitForm(pBuffer, nBufSize, sDestination.c_str());
- if (bUrlEncoded) {
+ if (bUrlEncoded)
FX_Free(pBuffer);
- pBuffer = NULL;
- }
return TRUE;
}
@@ -2586,7 +2584,7 @@ int CPDFSDK_InterForm::BeforeSelectionChange(CPDF_FormField* pField,
void CPDFSDK_InterForm::AfterSelectionChange(CPDF_FormField* pField) {
if (pField->GetFieldType() == FIELDTYPE_LISTBOX) {
OnCalculate(pField);
- ResetFieldAppearance(pField, NULL, TRUE);
+ ResetFieldAppearance(pField, nullptr, TRUE);
UpdateField(pField);
}
}
« no previous file with comments | « fpdfsdk/fsdk_baseannot.cpp ('k') | fpdfsdk/fsdk_mgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698