Index: fpdfsdk/src/formfiller/FFL_TextField.cpp |
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp |
index 3490338a4d22ea71fd8887be9bc242ee994b8836..cc2d31827f78ce4aea29c4c07a4a5beb03954eb6 100644 |
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp |
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp |
@@ -11,10 +11,7 @@ |
* ------------------------------- */ |
CFFL_TextField::CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot) |
- : CFFL_FormFiller(pApp, pAnnot), |
- m_pFontMap(NULL) //, |
-// m_pSpellCheck(NULL) |
-{ |
+ : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(NULL) { |
m_State.nStart = m_State.nEnd = 0; |
} |
@@ -25,7 +22,6 @@ CFFL_TextField::~CFFL_TextField() { |
PWL_CREATEPARAM CFFL_TextField::GetCreateParam() { |
PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam(); |
- ASSERT(m_pWidget != NULL); |
int nFlags = m_pWidget->GetFieldFlags(); |
if (nFlags & FIELDFLAG_PASSWORD) { |
@@ -88,11 +84,9 @@ CPWL_Wnd* CFFL_TextField::NewPDFWindow(const PWL_CREATEPARAM& cp, |
pWnd->AttachFFLData(this); |
pWnd->Create(cp); |
- ASSERT(m_pApp != NULL); |
CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller(); |
pWnd->SetFillerNotify(pIFormFiller); |
- ASSERT(m_pWidget != NULL); |
int32_t nMaxLen = m_pWidget->GetMaxLen(); |
CFX_WideString swValue = m_pWidget->GetValue(); |
@@ -116,7 +110,7 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, |
case FWL_VKEY_Return: |
if (!(m_pWidget->GetFieldFlags() & FIELDFLAG_MULTILINE)) { |
CPDFSDK_PageView* pPageView = GetCurPageView(); |
- ASSERT(pPageView != NULL); |
+ ASSERT(pPageView); |
m_bValid = !m_bValid; |
CPDF_Rect rcAnnot = pAnnot->GetRect(); |
m_pApp->FFI_Invalidate(pAnnot->GetUnderlyingPage(), rcAnnot.left, |
@@ -136,7 +130,7 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, |
break; |
case FWL_VKEY_Escape: { |
CPDFSDK_PageView* pPageView = GetCurPageView(); |
- ASSERT(pPageView != NULL); |
+ ASSERT(pPageView); |
EscapeFiller(pPageView, TRUE); |
return TRUE; |
} |
@@ -146,8 +140,6 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot, |
} |
FX_BOOL CFFL_TextField::IsDataChanged(CPDFSDK_PageView* pPageView) { |
- ASSERT(m_pWidget != NULL); |
- |
if (CPWL_Edit* pEdit = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE)) |
return pEdit->GetText() != m_pWidget->GetValue(); |
@@ -155,8 +147,6 @@ FX_BOOL CFFL_TextField::IsDataChanged(CPDFSDK_PageView* pPageView) { |
} |
void CFFL_TextField::SaveData(CPDFSDK_PageView* pPageView) { |
- ASSERT(m_pWidget != NULL); |
- |
if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE)) { |
CFX_WideString sOldValue = m_pWidget->GetValue(); |
CFX_WideString sNewValue = pWnd->GetText(); |
@@ -191,7 +181,6 @@ void CFFL_TextField::GetActionData(CPDFSDK_PageView* pPageView, |
break; |
case CPDF_AAction::LoseFocus: |
case CPDF_AAction::GetFocus: |
- ASSERT(m_pWidget != NULL); |
fa.sValue = m_pWidget->GetValue(); |
break; |
default: |
@@ -231,7 +220,7 @@ FX_BOOL CFFL_TextField::IsActionDataChanged(CPDF_AAction::AActionType type, |
} |
void CFFL_TextField::SaveState(CPDFSDK_PageView* pPageView) { |
- ASSERT(pPageView != NULL); |
+ ASSERT(pPageView); |
if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE)) { |
pWnd->GetSel(m_State.nStart, m_State.nEnd); |
@@ -240,7 +229,7 @@ void CFFL_TextField::SaveState(CPDFSDK_PageView* pPageView) { |
} |
void CFFL_TextField::RestoreState(CPDFSDK_PageView* pPageView) { |
- ASSERT(pPageView != NULL); |
+ ASSERT(pPageView); |
if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, TRUE)) { |
pWnd->SetText(m_State.sValue.c_str()); |
@@ -279,10 +268,7 @@ FX_BOOL CFFL_TextField::IsFieldFull(CPDFSDK_PageView* pPageView) { |
#endif // PDF_ENABLE_XFA |
void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd) { |
- ASSERT(m_pApp != NULL); |
- |
- ASSERT(pWnd != NULL); |
- |
+ ASSERT(m_pApp); |
if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) { |
CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; |
pEdit->SetCharSet(134); |