diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2015-11-04 14:04:13 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2015-11-04 14:04:13 -0500 |
commit | bfe042a4c4f0bd739c568754ebee6d993e134ad3 (patch) | |
tree | 75143d8210e96f252fa51b734d7e1f684c131561 /fpdfsdk/src/fsdk_annothandler.cpp | |
parent | 5dbbc6bf047daceb952ae774346a2e74f002ec46 (diff) | |
download | pdfium-bfe042a4c4f0bd739c568754ebee6d993e134ad3.tar.xz |
Merge to XFA: Cleanup after syncing CPDFSDK_BAAnnot
This cleans up various things after syncing BAAnnot to master.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1418043007 .
(cherry picked from commit 110650e68e519e8cf14fe1119b77cf3309ed2d0b)
Review URL: https://codereview.chromium.org/1415933007 .
Diffstat (limited to 'fpdfsdk/src/fsdk_annothandler.cpp')
-rw-r--r-- | fpdfsdk/src/fsdk_annothandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp index e0c49411a9..bdfda15453 100644 --- a/fpdfsdk/src/fsdk_annothandler.cpp +++ b/fpdfsdk/src/fsdk_annothandler.cpp @@ -137,14 +137,15 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnDraw(CPDFSDK_PageView* pPageView, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, FX_DWORD dwFlags) { - ASSERT(pAnnot != NULL); + ASSERT(pAnnot); if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { pAnnotHandler->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); } else { - if (!pAnnot->IsXFAField()) - ((CPDFSDK_BAAnnot*)pAnnot) - ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + if (!pAnnot->IsXFAField()) { + static_cast<CPDFSDK_BAAnnot*>(pAnnot) + ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); + } } } @@ -449,12 +450,11 @@ void CPDFSDK_BFAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, FX_DWORD dwFlags) { - ASSERT(pAnnot != NULL); CFX_ByteString sSubType = pAnnot->GetSubType(); if (sSubType == BFFT_SIGNATURE) { - ((CPDFSDK_BAAnnot*)pAnnot) - ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + static_cast<CPDFSDK_BAAnnot*>(pAnnot) + ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); } else { if (m_pFormFiller) { m_pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); |