diff options
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp | 17 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_CheckBox.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_IFormFiller.cpp | 16 | ||||
-rw-r--r-- | fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp | 8 | ||||
-rw-r--r-- | fpdfsdk/src/fsdk_annothandler.cpp | 98 | ||||
-rw-r--r-- | fpdfsdk/src/fsdk_baseform.cpp | 22 | ||||
-rw-r--r-- | fpdfsdk/src/fsdk_mgr.cpp | 7 |
7 files changed, 28 insertions, 142 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp index 96f727eee6..bba44ab639 100644 --- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp +++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp @@ -59,7 +59,7 @@ void CBA_FontMap::Initialize() { void CBA_FontMap::SetDefaultFont(CPDF_Font* pFont, const CFX_ByteString& sFontName) { - ASSERT(pFont != NULL); + ASSERT(pFont); if (m_pDefaultFont) return; @@ -75,12 +75,8 @@ void CBA_FontMap::SetDefaultFont(CPDF_Font* pFont, CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset) { - ASSERT(m_pAnnotDict != NULL); - if (m_pAnnotDict->GetStringBy("Subtype") == "Widget") { CPDF_Document* pDocument = GetDocument(); - ASSERT(pDocument != NULL); - CPDF_Dictionary* pRootDict = pDocument->GetRoot(); if (!pRootDict) return NULL; @@ -109,15 +105,12 @@ CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict, if (!pResDict) return NULL; - CPDF_Document* pDocument = GetDocument(); - ASSERT(pDocument != NULL); - CPDF_Dictionary* pFonts = pResDict->GetDictBy("Font"); if (!pFonts) return NULL; + CPDF_Document* pDocument = GetDocument(); CPDF_Font* pFind = NULL; - for (const auto& it : *pFonts) { const CFX_ByteString& csKey = it.first; CPDF_Object* pObj = it.second; @@ -154,9 +147,6 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, if (!pFont) return; - ASSERT(m_pAnnotDict != NULL); - ASSERT(m_pDocument != NULL); - CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP"); if (!pAPDict) { @@ -205,9 +195,6 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, } CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) { - ASSERT(m_pAnnotDict != NULL); - ASSERT(m_pDocument != NULL); - CPDF_Dictionary* pAcroFormDict = NULL; FX_BOOL bWidget = (m_pAnnotDict->GetStringBy("Subtype") == "Widget"); diff --git a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp index c2e1b20253..f76613ed3f 100644 --- a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp +++ b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp @@ -100,8 +100,6 @@ void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView) { if (bNewChecked) { CPDF_FormField* pField = m_pWidget->GetFormField(); - ASSERT(pField != NULL); - for (int32_t i = 0, sz = pField->CountControls(); i < sz; i++) { if (CPDF_FormControl* pCtrl = pField->GetControl(i)) { if (pCtrl->IsChecked()) { diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp index 36b123e165..7049fe6a97 100644 --- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp +++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp @@ -747,8 +747,6 @@ void CFFL_IFormFiller::OnClick(CPDFSDK_Widget* pWidget, FX_BOOL& bReset, FX_BOOL& bExit, FX_UINT nFlag) { - ASSERT(pWidget != NULL); - if (!m_bNotifying) { if (pWidget->HasXFAAAction(PDFSDK_XFA_Click)) { m_bNotifying = TRUE; @@ -784,8 +782,6 @@ void CFFL_IFormFiller::OnFull(CPDFSDK_Widget* pWidget, FX_BOOL& bReset, FX_BOOL& bExit, FX_UINT nFlag) { - ASSERT(pWidget != NULL); - if (!m_bNotifying) { if (pWidget->HasXFAAAction(PDFSDK_XFA_Full)) { m_bNotifying = TRUE; @@ -819,9 +815,9 @@ void CFFL_IFormFiller::OnFull(CPDFSDK_Widget* pWidget, void CFFL_IFormFiller::OnPopupPreOpen(void* pPrivateData, FX_BOOL& bExit, FX_DWORD nFlag) { - ASSERT(pPrivateData != NULL); CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData; - ASSERT(pData->pWidget != NULL); + ASSERT(pData); + ASSERT(pData->pWidget); FX_BOOL bTempReset = FALSE; FX_BOOL bTempExit = FALSE; @@ -836,9 +832,9 @@ void CFFL_IFormFiller::OnPopupPreOpen(void* pPrivateData, void CFFL_IFormFiller::OnPopupPostOpen(void* pPrivateData, FX_BOOL& bExit, FX_DWORD nFlag) { - ASSERT(pPrivateData != NULL); CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData; - ASSERT(pData->pWidget != NULL); + ASSERT(pData); + ASSERT(pData->pWidget); FX_BOOL bTempReset = FALSE; FX_BOOL bTempExit = FALSE; @@ -855,8 +851,6 @@ void CFFL_IFormFiller::OnPreOpen(CPDFSDK_Widget* pWidget, FX_BOOL& bReset, FX_BOOL& bExit, FX_UINT nFlag) { - ASSERT(pWidget != NULL); - if (!m_bNotifying) { if (pWidget->HasXFAAAction(PDFSDK_XFA_PreOpen)) { m_bNotifying = TRUE; @@ -892,8 +886,6 @@ void CFFL_IFormFiller::OnPostOpen(CPDFSDK_Widget* pWidget, FX_BOOL& bReset, FX_BOOL& bExit, FX_UINT nFlag) { - ASSERT(pWidget != NULL); - if (!m_bNotifying) { if (pWidget->HasXFAAAction(PDFSDK_XFA_PostOpen)) { m_bNotifying = TRUE; diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp index fab90a26d3..1f6aa12126 100644 --- a/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp +++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp @@ -118,8 +118,6 @@ FX_BOOL CPDFXFA_Page::LoadPDFPage(CPDF_Dictionary* pageDict) { } FX_FLOAT CPDFXFA_Page::GetPageWidth() { - ASSERT(m_pDocument != NULL); - if (!m_pPDFPage && !m_pXFAPageView) return 0.0f; @@ -145,8 +143,6 @@ FX_FLOAT CPDFXFA_Page::GetPageWidth() { } FX_FLOAT CPDFXFA_Page::GetPageHeight() { - ASSERT(m_pDocument != NULL); - if (!m_pPDFPage && !m_pXFAPageView) return 0.0f; @@ -180,8 +176,6 @@ void CPDFXFA_Page::DeviceToPage(int start_x, int device_y, double* page_x, double* page_y) { - ASSERT(m_pDocument != NULL); - if (!m_pPDFPage && !m_pXFAPageView) return; @@ -229,8 +223,6 @@ void CPDFXFA_Page::GetDisplayMatrix(CFX_Matrix& matrix, int xSize, int ySize, int iRotate) const { - ASSERT(m_pDocument != NULL); - if (!m_pPDFPage && !m_pXFAPageView) return; diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp index 2f204fe27d..661eaef1a1 100644 --- a/fpdfsdk/src/fsdk_annothandler.cpp +++ b/fpdfsdk/src/fsdk_annothandler.cpp @@ -72,8 +72,8 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(CPDF_Annot* pAnnot, #ifdef PDF_ENABLE_XFA CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView) { - ASSERT(pAnnot != NULL); - ASSERT(pPageView != NULL); + ASSERT(pAnnot); + ASSERT(pPageView); if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(FSDK_XFAWIDGET_TYPENAME)) { @@ -378,7 +378,7 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, IXFA_Widget* hNextFocus = NULL; hNextFocus = bNext ? pWidgetIterator->MoveToNext() : pWidgetIterator->MoveToPrevious(); - if (hNextFocus == NULL && pSDKAnnot != NULL) + if (!hNextFocus && pSDKAnnot) hNextFocus = pWidgetIterator->MoveToFirst(); pWidgetIterator->Release(); @@ -752,10 +752,7 @@ void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, ASSERT(pAnnot != NULL); CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); - ASSERT(pSDKDoc != NULL); - IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); CFX_Graphics gs; gs.Create(pDevice); @@ -773,12 +770,8 @@ void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, } void CPDFSDK_XFAAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { - ASSERT(pAnnot != NULL); - CPDFSDK_XFAWidget* pWidget = (CPDFSDK_XFAWidget*)pAnnot; CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm(); - ASSERT(pInterForm != NULL); - pInterForm->RemoveXFAMap(pWidget->GetXFAWidget()); delete pWidget; @@ -786,11 +779,9 @@ void CPDFSDK_XFAAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { CPDF_Rect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot) { - ASSERT(pAnnot != NULL); + ASSERT(pAnnot); IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - CFX_RectF rcBBox; XFA_ELEMENT eType = pWidgetHandler->GetDataAcc(pAnnot->GetXFAWidget())->GetUIType(); @@ -843,8 +834,6 @@ void CPDFSDK_XFAAnnotHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, if (!pPageView || !pAnnot) return; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - pWidgetHandler->OnMouseEnter(pAnnot->GetXFAWidget()); } @@ -855,8 +844,6 @@ void CPDFSDK_XFAAnnotHandler::OnMouseExit(CPDFSDK_PageView* pPageView, return; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - pWidgetHandler->OnMouseExit(pAnnot->GetXFAWidget()); } @@ -868,13 +855,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDown(CPDFSDK_PageView* pPageView, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnLButtonDown(pAnnot->GetXFAWidget(), + return pWidgetHandler->OnLButtonDown(pAnnot->GetXFAWidget(), GetFWLFlags(nFlags), point.x, point.y); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, @@ -885,13 +867,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonUp(CPDFSDK_PageView* pPageView, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnLButtonUp(pAnnot->GetXFAWidget(), + return pWidgetHandler->OnLButtonUp(pAnnot->GetXFAWidget(), GetFWLFlags(nFlags), point.x, point.y); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, @@ -902,13 +879,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnLButtonDblClk(CPDFSDK_PageView* pPageView, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnLButtonDblClk(pAnnot->GetXFAWidget(), + return pWidgetHandler->OnLButtonDblClk(pAnnot->GetXFAWidget(), GetFWLFlags(nFlags), point.x, point.y); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView, @@ -919,13 +891,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseMove(CPDFSDK_PageView* pPageView, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnMouseMove(pAnnot->GetXFAWidget(), + return pWidgetHandler->OnMouseMove(pAnnot->GetXFAWidget(), GetFWLFlags(nFlags), point.x, point.y); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, @@ -937,13 +904,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnMouseWheel(CPDFSDK_PageView* pPageView, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnMouseWheel( + return pWidgetHandler->OnMouseWheel( pAnnot->GetXFAWidget(), GetFWLFlags(nFlags), zDelta, point.x, point.y); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, @@ -954,13 +916,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDown(CPDFSDK_PageView* pPageView, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnRButtonDown(pAnnot->GetXFAWidget(), + return pWidgetHandler->OnRButtonDown(pAnnot->GetXFAWidget(), GetFWLFlags(nFlags), point.x, point.y); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, @@ -971,13 +928,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonUp(CPDFSDK_PageView* pPageView, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnRButtonUp(pAnnot->GetXFAWidget(), + return pWidgetHandler->OnRButtonUp(pAnnot->GetXFAWidget(), GetFWLFlags(nFlags), point.x, point.y); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView, @@ -988,13 +940,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnRButtonDblClk(pAnnot->GetXFAWidget(), + return pWidgetHandler->OnRButtonDblClk(pAnnot->GetXFAWidget(), GetFWLFlags(nFlags), point.x, point.y); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, @@ -1004,13 +951,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnChar(pAnnot->GetXFAWidget(), nChar, + return pWidgetHandler->OnChar(pAnnot->GetXFAWidget(), nChar, GetFWLFlags(nFlags)); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnKeyDown(CPDFSDK_Annot* pAnnot, @@ -1020,13 +962,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnKeyDown(CPDFSDK_Annot* pAnnot, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnKeyDown(pAnnot->GetXFAWidget(), nKeyCode, + return pWidgetHandler->OnKeyDown(pAnnot->GetXFAWidget(), nKeyCode, GetFWLFlags(nFlag)); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnKeyUp(CPDFSDK_Annot* pAnnot, @@ -1036,13 +973,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnKeyUp(CPDFSDK_Annot* pAnnot, return FALSE; IXFA_WidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); - ASSERT(pWidgetHandler != NULL); - - FX_BOOL bRet = FALSE; - bRet = pWidgetHandler->OnKeyUp(pAnnot->GetXFAWidget(), nKeyCode, + return pWidgetHandler->OnKeyUp(pAnnot->GetXFAWidget(), nKeyCode, GetFWLFlags(nFlag)); - - return bRet; } FX_BOOL CPDFSDK_XFAAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp index f05545a672..9da74036e1 100644 --- a/fpdfsdk/src/fsdk_baseform.cpp +++ b/fpdfsdk/src/fsdk_baseform.cpp @@ -260,15 +260,11 @@ void CPDFSDK_Widget::Synchronize(FX_BOOL bSynchronizeElse) { if (IXFA_Widget* hWidget = this->GetMixXFAWidget()) { if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler()) { CPDF_FormField* pFormField = GetFormField(); - ASSERT(pFormField != NULL); - if (CXFA_WidgetAcc* pWidgetAcc = pXFAWidgetHandler->GetDataAcc(hWidget)) { switch (GetFieldType()) { case FIELDTYPE_CHECKBOX: case FIELDTYPE_RADIOBUTTON: { CPDF_FormControl* pFormCtrl = GetFormControl(); - ASSERT(pFormCtrl != NULL); - XFA_CHECKSTATE eCheckState = pFormCtrl->IsChecked() ? XFA_CHECKSTATE_On : XFA_CHECKSTATE_Off; pWidgetAcc->SetCheckState(eCheckState); @@ -340,12 +336,10 @@ void CPDFSDK_Widget::SynchronizeXFAValue(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, CPDF_FormField* pFormField, CPDF_FormControl* pFormControl) { - ASSERT(pXFADocView != NULL); - ASSERT(hWidget != NULL); + ASSERT(hWidget); if (IXFA_WidgetHandler* pXFAWidgetHandler = pXFADocView->GetWidgetHandler()) { - ASSERT(pFormField != NULL); - ASSERT(pFormControl != NULL); + ASSERT(pFormControl); switch (pFormField->GetFieldType()) { case FIELDTYPE_CHECKBOX: { @@ -414,12 +408,9 @@ void CPDFSDK_Widget::SynchronizeXFAItems(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, CPDF_FormField* pFormField, CPDF_FormControl* pFormControl) { - ASSERT(pXFADocView != NULL); - ASSERT(hWidget != NULL); + ASSERT(hWidget); if (IXFA_WidgetHandler* pXFAWidgetHandler = pXFADocView->GetWidgetHandler()) { - ASSERT(pFormField != NULL); - switch (pFormField->GetFieldType()) { case FIELDTYPE_LISTBOX: { pFormField->ClearSelection(FALSE); @@ -2500,17 +2491,14 @@ FX_BOOL CPDFSDK_InterForm::ExportFieldsToFDFTextBuf( #ifdef PDF_ENABLE_XFA void CPDFSDK_InterForm::SynchronizeField(CPDF_FormField* pFormField, FX_BOOL bSynchronizeElse) { - ASSERT(pFormField != NULL); - int x = 0; if (m_FieldSynchronizeMap.Lookup(pFormField, x)) return; for (int i = 0, sz = pFormField->CountControls(); i < sz; i++) { CPDF_FormControl* pFormCtrl = pFormField->GetControl(i); - ASSERT(pFormCtrl != NULL); - - ASSERT(m_pInterForm != NULL); + ASSERT(pFormCtrl); + ASSERT(m_pInterForm); if (CPDFSDK_Widget* pWidget = GetWidget(pFormCtrl)) { pWidget->Synchronize(bSynchronizeElse); } diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp index fd30cf1f18..9e627167fe 100644 --- a/fpdfsdk/src/fsdk_mgr.cpp +++ b/fpdfsdk/src/fsdk_mgr.cpp @@ -1073,10 +1073,7 @@ void CPDFSDK_PageView::LoadFXAnnots() { #ifdef PDF_ENABLE_XFA m_page->AddRef(); if (m_pSDKDoc->GetXFADocument()->GetDocType() == DOCTYPE_DYNAMIC_XFA) { - IXFA_PageView* pageView = NULL; - pageView = m_page->GetXFAPageView(); - ASSERT(pageView != NULL); - + IXFA_PageView* pageView = m_page->GetXFAPageView(); IXFA_WidgetIterator* pWidgetHander = pageView->CreateWidgetIterator( XFA_TRAVERSEWAY_Form, XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_Viewable | @@ -1098,7 +1095,7 @@ void CPDFSDK_PageView::LoadFXAnnots() { pWidgetHander->Release(); } else { CPDF_Page* pPage = m_page->GetPDFPage(); - ASSERT(pPage != NULL); + ASSERT(pPage); FX_BOOL enableAPUpdate = CPDF_InterForm::UpdatingAPEnabled(); // Disable the default AP construction. CPDF_InterForm::EnableUpdateAP(FALSE); |