summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-02-23 11:21:48 -0800
committerLei Zhang <thestig@chromium.org>2016-02-23 11:21:48 -0800
commit9976672977d39fc5fe9df2b0110ed977d79609a8 (patch)
tree192a3238fa9587c77843812dc90f1884dc506689 /fpdfsdk
parentd21cddaa7548584bfcebefe9a03e857fee3a846b (diff)
downloadpdfium-9976672977d39fc5fe9df2b0110ed977d79609a8.tar.xz
Remove uses of this->foo.
R=weili@chromium.org Review URL: https://codereview.chromium.org/1722913002 .
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/src/formfiller/FFL_IFormFiller.cpp6
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp41
2 files changed, 21 insertions, 26 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
index 7049fe6a97..a5100f6904 100644
--- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
@@ -821,8 +821,7 @@ void CFFL_IFormFiller::OnPopupPreOpen(void* pPrivateData,
FX_BOOL bTempReset = FALSE;
FX_BOOL bTempExit = FALSE;
- this->OnPreOpen(pData->pWidget, pData->pPageView, bTempReset, bTempExit,
- nFlag);
+ OnPreOpen(pData->pWidget, pData->pPageView, bTempReset, bTempExit, nFlag);
if (bTempReset || bTempExit) {
bExit = TRUE;
@@ -838,8 +837,7 @@ void CFFL_IFormFiller::OnPopupPostOpen(void* pPrivateData,
FX_BOOL bTempReset = FALSE;
FX_BOOL bTempExit = FALSE;
- this->OnPostOpen(pData->pWidget, pData->pPageView, bTempReset, bTempExit,
- nFlag);
+ OnPostOpen(pData->pWidget, pData->pPageView, bTempReset, bTempExit, nFlag);
if (bTempReset || bTempExit) {
bExit = TRUE;
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 9da74036e1..1bae4dd5a1 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -52,8 +52,8 @@ IXFA_Widget* CPDFSDK_Widget::GetMixXFAWidget() const {
if (!m_hMixXFAWidget) {
if (IXFA_DocView* pDocView = pDoc->GetXFADocView()) {
CFX_WideString sName;
- if (this->GetFieldType() == FIELDTYPE_RADIOBUTTON) {
- sName = this->GetAnnotName();
+ if (GetFieldType() == FIELDTYPE_RADIOBUTTON) {
+ sName = GetAnnotName();
if (sName.IsEmpty())
sName = GetName();
} else
@@ -174,8 +174,8 @@ static XFA_EVENTTYPE GetXFAEventType(CPDF_AAction::AActionType eAAT,
}
FX_BOOL CPDFSDK_Widget::HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT) {
- if (IXFA_Widget* hWidget = this->GetMixXFAWidget()) {
- if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler()) {
+ if (IXFA_Widget* hWidget = GetMixXFAWidget()) {
+ if (IXFA_WidgetHandler* pXFAWidgetHandler = GetXFAWidgetHandler()) {
XFA_EVENTTYPE eEventType = GetXFAEventType(eXFAAAT);
if ((eEventType == XFA_EVENT_Click || eEventType == XFA_EVENT_Change) &&
@@ -206,7 +206,7 @@ FX_BOOL CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT,
XFA_EVENTTYPE eEventType = GetXFAEventType(eXFAAAT);
if (eEventType != XFA_EVENT_Unknown) {
- if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler()) {
+ if (IXFA_WidgetHandler* pXFAWidgetHandler = GetXFAWidgetHandler()) {
CXFA_EventParam param;
param.m_eType = eEventType;
param.m_wsChange = data.sChange;
@@ -257,8 +257,8 @@ FX_BOOL CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT,
}
void CPDFSDK_Widget::Synchronize(FX_BOOL bSynchronizeElse) {
- if (IXFA_Widget* hWidget = this->GetMixXFAWidget()) {
- if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler()) {
+ if (IXFA_Widget* hWidget = GetMixXFAWidget()) {
+ if (IXFA_WidgetHandler* pXFAWidgetHandler = GetXFAWidgetHandler()) {
CPDF_FormField* pFormField = GetFormField();
if (CXFA_WidgetAcc* pWidgetAcc = pXFAWidgetHandler->GetDataAcc(hWidget)) {
switch (GetFieldType()) {
@@ -589,8 +589,8 @@ FX_FLOAT CPDFSDK_Widget::GetFontSize() const {
int CPDFSDK_Widget::GetSelectedIndex(int nIndex) const {
#ifdef PDF_ENABLE_XFA
- if (IXFA_Widget* hWidget = this->GetMixXFAWidget()) {
- if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler()) {
+ if (IXFA_Widget* hWidget = GetMixXFAWidget()) {
+ if (IXFA_WidgetHandler* pXFAWidgetHandler = GetXFAWidgetHandler()) {
if (CXFA_WidgetAcc* pWidgetAcc = pXFAWidgetHandler->GetDataAcc(hWidget)) {
if (nIndex < pWidgetAcc->CountSelectedItems())
return pWidgetAcc->GetSelectedItem(nIndex);
@@ -604,8 +604,8 @@ int CPDFSDK_Widget::GetSelectedIndex(int nIndex) const {
#ifdef PDF_ENABLE_XFA
CFX_WideString CPDFSDK_Widget::GetValue(FX_BOOL bDisplay) const {
- if (IXFA_Widget* hWidget = this->GetMixXFAWidget()) {
- if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler()) {
+ if (IXFA_Widget* hWidget = GetMixXFAWidget()) {
+ if (IXFA_WidgetHandler* pXFAWidgetHandler = GetXFAWidgetHandler()) {
if (CXFA_WidgetAcc* pWidgetAcc = pXFAWidgetHandler->GetDataAcc(hWidget)) {
CFX_WideString sValue;
pWidgetAcc->GetValue(sValue, bDisplay ? XFA_VALUEPICTURE_Display
@@ -638,8 +638,8 @@ int CPDFSDK_Widget::CountOptions() const {
FX_BOOL CPDFSDK_Widget::IsOptionSelected(int nIndex) const {
#ifdef PDF_ENABLE_XFA
- if (IXFA_Widget* hWidget = this->GetMixXFAWidget()) {
- if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler()) {
+ if (IXFA_Widget* hWidget = GetMixXFAWidget()) {
+ if (IXFA_WidgetHandler* pXFAWidgetHandler = GetXFAWidgetHandler()) {
if (CXFA_WidgetAcc* pWidgetAcc = pXFAWidgetHandler->GetDataAcc(hWidget)) {
if (nIndex > -1 && nIndex < pWidgetAcc->CountChoiceListItems())
return pWidgetAcc->GetItemState(nIndex);
@@ -660,8 +660,8 @@ int CPDFSDK_Widget::GetTopVisibleIndex() const {
FX_BOOL CPDFSDK_Widget::IsChecked() const {
#ifdef PDF_ENABLE_XFA
- if (IXFA_WidgetHandler* pXFAWidgetHandler = this->GetXFAWidgetHandler()) {
- if (IXFA_Widget* hWidget = this->GetMixXFAWidget()) {
+ if (IXFA_WidgetHandler* pXFAWidgetHandler = GetXFAWidgetHandler()) {
+ if (IXFA_Widget* hWidget = GetMixXFAWidget()) {
if (CXFA_WidgetAcc* pWidgetAcc = pXFAWidgetHandler->GetDataAcc(hWidget)) {
FX_BOOL bChecked = pWidgetAcc->GetCheckState() == XFA_CHECKSTATE_On;
return bChecked;
@@ -746,14 +746,11 @@ void CPDFSDK_Widget::ResetAppearance(FX_BOOL bValueChanged) {
case FIELDTYPE_TEXTFIELD:
case FIELDTYPE_COMBOBOX: {
FX_BOOL bFormated = FALSE;
- CFX_WideString sValue = this->OnFormat(bFormated);
- if (bFormated)
- this->ResetAppearance(sValue, TRUE);
- else
- this->ResetAppearance(NULL, TRUE);
+ CFX_WideString sValue = OnFormat(bFormated);
+ ResetAppearance(bFormated ? sValue : nullptr, TRUE);
} break;
default:
- this->ResetAppearance(NULL, FALSE);
+ ResetAppearance(nullptr, FALSE);
break;
}
}
@@ -1575,7 +1572,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue) {
#ifdef PDF_ENABLE_XFA
CFX_WideString sValueTmp;
- if (!sValue && (NULL != this->GetMixXFAWidget())) {
+ if (!sValue && GetMixXFAWidget()) {
sValueTmp = GetValue(TRUE);
sValue = sValueTmp;
}