summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-13 00:41:00 -0700
committerLei Zhang <thestig@chromium.org>2015-06-13 00:41:00 -0700
commit60f507ba36893edccb53aa13d7282144a1dd2499 (patch)
tree8855790710cffc564547e83ca5f755437a16088f /fpdfsdk/src/fsdk_baseform.cpp
parent4999f914be6c390bbc6d709c5b65d8955a827970 (diff)
downloadpdfium-60f507ba36893edccb53aa13d7282144a1dd2499.tar.xz
Merge to XFA: Cleanup: Get this rid of "this->" in fpdfsdk/
Also remove commented out code and trailing whitespaces. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1179653005. (cherry picked from commit eda202769e5c79eba1d2fb5090f6e9cf176e2d4a) Review URL: https://codereview.chromium.org/1187733002.
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp52
1 files changed, 21 insertions, 31 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 1744fb942c..d9449d892a 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -595,7 +595,7 @@ FX_BOOL CPDFSDK_Widget::IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode
{
CPDF_Dictionary* pSubDict = (CPDF_Dictionary*)psub;
- return pSubDict->GetStream(this->GetAppState()) != NULL;
+ return pSubDict->GetStream(GetAppState()) != NULL;
}
else
return FALSE;
@@ -694,7 +694,7 @@ CPDF_FormControl* CPDFSDK_Widget::GetFormControl(CPDF_InterForm* pInterForm, CPD
int CPDFSDK_Widget::GetRotate() const
{
- CPDF_FormControl* pCtrl = this->GetFormControl();
+ CPDF_FormControl* pCtrl = GetFormControl();
ASSERT(pCtrl != NULL);
return pCtrl->GetRotation() % 360;
@@ -1048,11 +1048,11 @@ void CPDFSDK_Widget::DrawAppearance(CFX_RenderDevice* pDevice, const CPDF_Matrix
if ((nFieldType == FIELDTYPE_CHECKBOX || nFieldType == FIELDTYPE_RADIOBUTTON) &&
mode == CPDF_Annot::Normal &&
- !this->IsWidgetAppearanceValid(CPDF_Annot::Normal))
+ !IsWidgetAppearanceValid(CPDF_Annot::Normal))
{
CFX_PathData pathData;
- CPDF_Rect rcAnnot = this->GetRect();
+ CPDF_Rect rcAnnot = GetRect();
pathData.AppendRect(rcAnnot.left, rcAnnot.bottom,
rcAnnot.right, rcAnnot.top);
@@ -1271,8 +1271,6 @@ void CPDFSDK_Widget::ResetAppearance_PushButton()
CPDF_IconFit iconFit = pControl->GetIconFit();
-// ASSERT(this->m_pBaseForm != NULL);
- ASSERT(this->m_pInterForm != NULL);
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
ASSERT(pDoc != NULL);
CPDFDoc_Environment* pEnv = pDoc->GetEnv();
@@ -1675,7 +1673,6 @@ void CPDFSDK_Widget::ResetAppearance_ComboBox(const FX_WCHAR* sValue)
{
pEdit->EnableRefresh(FALSE);
- ASSERT(this->m_pInterForm != NULL);
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
ASSERT(pDoc != NULL);
CPDFDoc_Environment* pEnv = pDoc->GetEnv();
@@ -1690,7 +1687,7 @@ void CPDFSDK_Widget::ResetAppearance_ComboBox(const FX_WCHAR* sValue)
pEdit->SetPlateRect(rcEdit);
pEdit->SetAlignmentV(1);
- FX_FLOAT fFontSize = this->GetFontSize();
+ FX_FLOAT fFontSize = GetFontSize();
if (IsFloatZero(fFontSize))
pEdit->SetAutoFontSize(TRUE);
else
@@ -1752,8 +1749,6 @@ void CPDFSDK_Widget::ResetAppearance_ListBox()
{
pEdit->EnableRefresh(FALSE);
-// ASSERT(this->m_pBaseForm != NULL);
- ASSERT(this->m_pInterForm != NULL);
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
ASSERT(pDoc != NULL);
CPDFDoc_Environment* pEnv = pDoc->GetEnv();
@@ -1844,8 +1839,6 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue)
{
pEdit->EnableRefresh(FALSE);
-// ASSERT(this->m_pBaseForm != NULL);
- ASSERT(this->m_pInterForm != NULL);
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
ASSERT(pDoc != NULL);
CPDFDoc_Environment* pEnv = pDoc->GetEnv();
@@ -2304,7 +2297,7 @@ CPDF_Action CPDFSDK_Widget::GetAAction(CPDF_AAction::AActionType eAAT)
case CPDF_AAction::Validate:
case CPDF_AAction::Calculate:
{
- CPDF_FormField* pField = this->GetFormField();
+ CPDF_FormField* pField = GetFormField();
if (CPDF_AAction aa = pField->GetAdditionalAction())
return aa.GetAction(eAAT);
return CPDFSDK_BAAnnot::GetAAction(eAAT);
@@ -2685,7 +2678,7 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField)
m_bBusy = TRUE;
- if (this->IsCalculateEnabled())
+ if (IsCalculateEnabled())
{
IFXJS_Runtime* pRuntime = m_pDocument->GetJsRuntime();
ASSERT(pRuntime != NULL);
@@ -3301,14 +3294,14 @@ int CPDFSDK_InterForm::AfterValueChange(const CPDF_FormField* pField)
if (nType == FIELDTYPE_COMBOBOX || nType == FIELDTYPE_TEXTFIELD)
{
- this->OnCalculate(pFormField);
+ OnCalculate(pFormField);
FX_BOOL bFormated = FALSE;
- CFX_WideString sValue = this->OnFormat(pFormField, bFormated);
+ CFX_WideString sValue = OnFormat(pFormField, bFormated);
if (bFormated)
- this->ResetFieldAppearance(pFormField, sValue.c_str(), TRUE);
+ ResetFieldAppearance(pFormField, sValue.c_str(), TRUE);
else
- this->ResetFieldAppearance(pFormField, NULL, TRUE);
- this->UpdateField(pFormField);
+ ResetFieldAppearance(pFormField, NULL, TRUE);
+ UpdateField(pFormField);
}
return 0;
@@ -3349,9 +3342,9 @@ int CPDFSDK_InterForm::AfterSelectionChange(const CPDF_FormField* pField)
if (nType == FIELDTYPE_LISTBOX)
{
- this->OnCalculate(pFormField);
- this->ResetFieldAppearance(pFormField, NULL, TRUE);
- this->UpdateField(pFormField);
+ OnCalculate(pFormField);
+ ResetFieldAppearance(pFormField, NULL, TRUE);
+ UpdateField(pFormField);
}
return 0;
@@ -3366,9 +3359,8 @@ int CPDFSDK_InterForm::AfterCheckedStatusChange(const CPDF_FormField* pField, co
if (nType == FIELDTYPE_CHECKBOX || nType == FIELDTYPE_RADIOBUTTON)
{
- this->OnCalculate(pFormField);
- //this->ResetFieldAppearance(pFormField, NULL);
- this->UpdateField(pFormField);
+ OnCalculate(pFormField);
+ UpdateField(pFormField);
}
return 0;
@@ -3381,9 +3373,8 @@ int CPDFSDK_InterForm::BeforeFormReset(const CPDF_InterForm* pForm)
int CPDFSDK_InterForm::AfterFormReset(const CPDF_InterForm* pForm)
{
- this->OnCalculate(NULL);
-
- return 0;
+ OnCalculate(nullptr);
+ return 0;
}
int CPDFSDK_InterForm::BeforeFormImportData(const CPDF_InterForm* pForm)
@@ -3393,9 +3384,8 @@ int CPDFSDK_InterForm::BeforeFormImportData(const CPDF_InterForm* pForm)
int CPDFSDK_InterForm::AfterFormImportData(const CPDF_InterForm* pForm)
{
- this->OnCalculate(NULL);
-
- return 0;
+ OnCalculate(nullptr);
+ return 0;
}
FX_BOOL CPDFSDK_InterForm::IsNeedHighLight(int nFieldType)