diff options
Diffstat (limited to 'fpdfsdk/fsdk_annothandler.cpp')
-rw-r--r-- | fpdfsdk/fsdk_annothandler.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fpdfsdk/fsdk_annothandler.cpp b/fpdfsdk/fsdk_annothandler.cpp index cbcb53e169..eda3b49058 100644 --- a/fpdfsdk/fsdk_annothandler.cpp +++ b/fpdfsdk/fsdk_annothandler.cpp @@ -88,7 +88,7 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(CXFA_FFWidget* pAnnot, return pAnnotHandler->NewAnnot(pAnnot, pPageView); } - return NULL; + return nullptr; } #endif // PDF_ENABLE_XFA @@ -367,8 +367,8 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, #ifdef PDF_ENABLE_XFA CPDFSDK_PageView* pPageView = pSDKAnnot->GetPageView(); CPDFXFA_Page* pPage = pPageView->GetPDFXFAPage(); - if (pPage == NULL) - return NULL; + if (!pPage) + return nullptr; if (pPage->GetPDFPage()) { // for pdf annots. CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), pSDKAnnot->GetType(), ""); CPDFSDK_Annot* pNext = @@ -441,7 +441,7 @@ CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(CPDF_Annot* pAnnot, #ifdef PDF_ENABLE_XFA CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(CXFA_FFWidget* hWidget, CPDFSDK_PageView* pPage) { - return NULL; + return nullptr; } #endif // PDF_ENABLE_XFA @@ -653,7 +653,7 @@ void CPDFSDK_BFAnnotHandler::OnLoad(CPDFSDK_Annot* pAnnot) { CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; if (!pWidget->IsAppearanceValid()) - pWidget->ResetAppearance(NULL, FALSE); + pWidget->ResetAppearance(nullptr, FALSE); int nFieldType = pWidget->GetFieldType(); if (nFieldType == FIELDTYPE_TEXTFIELD || nFieldType == FIELDTYPE_COMBOBOX) { @@ -736,7 +736,7 @@ CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(CXFA_FFWidget* pAnnot, } FX_BOOL CPDFSDK_XFAAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot) { - return pAnnot->GetXFAWidget() != NULL; + return !!pAnnot->GetXFAWidget(); } void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, @@ -744,8 +744,8 @@ void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, uint32_t dwFlags) { - ASSERT(pPageView != NULL); - ASSERT(pAnnot != NULL); + ASSERT(pPageView); + ASSERT(pAnnot); CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); @@ -982,7 +982,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_BOOL CPDFSDK_XFAAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, CPDFSDK_Annot* pNewAnnot) { - CXFA_FFWidgetHandler* pWidgetHandler = NULL; + CXFA_FFWidgetHandler* pWidgetHandler = nullptr; if (pOldAnnot) pWidgetHandler = GetXFAWidgetHandler(pOldAnnot); @@ -991,7 +991,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, if (pWidgetHandler) { FX_BOOL bRet = TRUE; - CXFA_FFWidget* hWidget = pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL; + CXFA_FFWidget* hWidget = pNewAnnot ? pNewAnnot->GetXFAWidget() : nullptr; if (hWidget) { CXFA_FFPageView* pXFAPageView = hWidget->GetPageView(); if (pXFAPageView) { @@ -1009,23 +1009,23 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, CXFA_FFWidgetHandler* CPDFSDK_XFAAnnotHandler::GetXFAWidgetHandler( CPDFSDK_Annot* pAnnot) { if (!pAnnot) - return NULL; + return nullptr; CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); if (!pPageView) - return NULL; + return nullptr; CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); if (!pSDKDoc) - return NULL; + return nullptr; CPDFXFA_Document* pDoc = pSDKDoc->GetXFADocument(); if (!pDoc) - return NULL; + return nullptr; CXFA_FFDocView* pDocView = pDoc->GetXFADocView(); if (!pDocView) - return NULL; + return nullptr; return pDocView->GetWidgetHandler(); } |