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

Unified Diff: xfa/fxfa/app/xfa_fffield.cpp

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: 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 | « xfa/fxfa/app/xfa_fffield.h ('k') | xfa/fxfa/app/xfa_ffimage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_fffield.cpp
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp
index 72fb14380f9ea25c9c5e850689c0d6de5d21b085..1eb38dd6fbc25ef8ca6d80f53a8437ba3d89a22a 100644
--- a/xfa/fxfa/app/xfa_fffield.cpp
+++ b/xfa/fxfa/app/xfa_fffield.cpp
@@ -22,7 +22,7 @@
#include "xfa/fxgraphics/cfx_path.h"
CXFA_FFField::CXFA_FFField(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc)
- : CXFA_FFWidget(pPageView, pDataAcc), m_pNormalWidget(NULL) {
+ : CXFA_FFWidget(pPageView, pDataAcc), m_pNormalWidget(nullptr) {
m_rtUI.Set(0, 0, 0, 0);
m_rtCaption.Set(0, 0, 0, 0);
}
@@ -167,12 +167,12 @@ void CXFA_FFField::CapPlacement() {
mgWidget.GetRightInset(fRightInset);
mgWidget.GetTopInset(fTopInset);
mgWidget.GetBottomInset(fBottomInset);
- if (pItem->GetPrev() == NULL && pItem->GetNext() == NULL) {
+ if (!pItem->GetPrev() && !pItem->GetNext()) {
rtWidget.Deflate(fLeftInset, fTopInset, fRightInset, fBottomInset);
} else {
- if (pItem->GetPrev() == NULL) {
+ if (!pItem->GetPrev()) {
rtWidget.Deflate(fLeftInset, fTopInset, fRightInset, 0);
- } else if (pItem->GetNext() == NULL) {
+ } else if (!pItem->GetNext()) {
rtWidget.Deflate(fLeftInset, 0, fRightInset, fBottomInset);
} else {
rtWidget.Deflate(fLeftInset, 0, fRightInset, 0);
@@ -191,7 +191,7 @@ void CXFA_FFField::CapPlacement() {
} else {
fCapReserve = caption.GetReserve();
CXFA_LayoutItem* pItem = this;
- if (pItem->GetPrev() == NULL && pItem->GetNext() == NULL) {
+ if (!pItem->GetPrev() && !pItem->GetNext()) {
m_rtCaption.Set(rtWidget.left, rtWidget.top, rtWidget.width,
rtWidget.height);
} else {
@@ -351,7 +351,7 @@ FX_BOOL CXFA_FFField::OnMouseEnter() {
CFWL_MsgMouse ms;
ms.m_dwCmd = FWL_MouseCommand::Enter;
ms.m_pDstTarget = m_pNormalWidget->m_pIface;
- ms.m_pSrcTarget = NULL;
+ ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
return TRUE;
}
@@ -530,7 +530,7 @@ FX_BOOL CXFA_FFField::OnSetFocus(CXFA_FFWidget* pOldWidget) {
}
CFWL_MsgSetFocus ms;
ms.m_pDstTarget = m_pNormalWidget->m_pIface;
- ms.m_pSrcTarget = NULL;
+ ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
m_dwStatus |= XFA_WidgetStatus_Focused;
AddInvalidateRect();
@@ -542,7 +542,7 @@ FX_BOOL CXFA_FFField::OnKillFocus(CXFA_FFWidget* pNewWidget) {
}
CFWL_MsgKillFocus ms;
ms.m_pDstTarget = m_pNormalWidget->m_pIface;
- ms.m_pSrcTarget = NULL;
+ ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
m_dwStatus &= ~XFA_WidgetStatus_Focused;
AddInvalidateRect();
@@ -558,7 +558,7 @@ FX_BOOL CXFA_FFField::OnKeyDown(uint32_t dwKeyCode, uint32_t dwFlags) {
ms.m_dwFlags = dwFlags;
ms.m_dwKeyCode = dwKeyCode;
ms.m_pDstTarget = m_pNormalWidget->m_pIface;
- ms.m_pSrcTarget = NULL;
+ ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
return TRUE;
}
@@ -571,7 +571,7 @@ FX_BOOL CXFA_FFField::OnKeyUp(uint32_t dwKeyCode, uint32_t dwFlags) {
ms.m_dwFlags = dwFlags;
ms.m_dwKeyCode = dwKeyCode;
ms.m_pDstTarget = m_pNormalWidget->m_pIface;
- ms.m_pSrcTarget = NULL;
+ ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
return TRUE;
}
@@ -593,7 +593,7 @@ FX_BOOL CXFA_FFField::OnChar(uint32_t dwChar, uint32_t dwFlags) {
ms.m_dwFlags = dwFlags;
ms.m_dwKeyCode = dwChar;
ms.m_pDstTarget = m_pNormalWidget->m_pIface;
- ms.m_pSrcTarget = NULL;
+ ms.m_pSrcTarget = nullptr;
TranslateFWLMessage(&ms);
return TRUE;
}
@@ -690,7 +690,7 @@ int32_t CXFA_FFField::CalculateOverride() {
if (!pNode) {
return 1;
}
- CXFA_WidgetAcc* pWidgetAcc = NULL;
+ CXFA_WidgetAcc* pWidgetAcc = nullptr;
while (pNode) {
pWidgetAcc = (CXFA_WidgetAcc*)pNode->GetWidgetData();
if (!pWidgetAcc) {
« no previous file with comments | « xfa/fxfa/app/xfa_fffield.h ('k') | xfa/fxfa/app/xfa_ffimage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698