Cleanup: Get this rid of "this->" in fpdfsdk/
[pdfium.git] / fpdfsdk / src / formfiller / FFL_ComboBox.cpp
index 012ed4a..e10c981 100644 (file)
@@ -16,7 +16,6 @@
 CFFL_ComboBox::CFFL_ComboBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot) :
        CFFL_FormFiller(pApp, pAnnot), m_pFontMap( NULL )
 {
-       //m_pFontMap = new CBA_FontMap( pAnnot, GetSystemHandler() );
         m_State.nIndex = 0;
         m_State.nStart = 0;
         m_State.nEnd   = 0;
@@ -29,13 +28,6 @@ CFFL_ComboBox::~CFFL_ComboBox()
                delete m_pFontMap;
                m_pFontMap = NULL;
        }
-
-//     for (int i=0,sz=m_IMBox.GetSize(); i<sz; i++)
-//     {
-//             delete m_IMBox.GetAt(i);
-//     }
-// 
-//     m_IMBox.RemoveAll();
 }
 
 PWL_CREATEPARAM CFFL_ComboBox::GetCreateParam()
@@ -51,16 +43,8 @@ PWL_CREATEPARAM CFFL_ComboBox::GetCreateParam()
                cp.dwFlags |= PCBS_ALLOWCUSTOMTEXT;
        }
 
-       /*
-       if (nFlags & FIELDFLAG_COMMITONSELCHANGE)
-       {               
-               m_bCommitOnSelectChange = TRUE;
-       }
-       */
-
        if (!m_pFontMap)
        {
-               ASSERT(this->m_pApp != NULL);
                m_pFontMap = new CBA_FontMap(m_pWidget, GetSystemHandler());
                m_pFontMap->Initial();
        }
@@ -80,14 +64,14 @@ CPWL_Wnd* CFFL_ComboBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVie
        CFFL_IFormFiller* pFormFiller = m_pApp->GetIFormFiller();
        pWnd->SetFillerNotify(pFormFiller);
 
-       FX_INT32 nCurSel = m_pWidget->GetSelectedIndex(0);
+       int32_t nCurSel = m_pWidget->GetSelectedIndex(0);
        CFX_WideString swText;
        if (nCurSel < 0)
                swText = m_pWidget->GetValue();
        else
                swText = m_pWidget->GetOptionLabel(nCurSel);
 
-       for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
+       for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
        {
                pWnd->AddString(m_pWidget->GetOptionLabel(i).c_str());
        }
@@ -107,7 +91,7 @@ FX_BOOL      CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView)
 {
        if (CPWL_ComboBox * pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
        {
-               FX_INT32 nCurSel = pWnd->GetSelect();
+               int32_t nCurSel = pWnd->GetSelect();
 
                ASSERT(m_pWidget != NULL);
 
@@ -138,7 +122,7 @@ void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
        if (CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
        {
                CFX_WideString swText = pWnd->GetText();
-               FX_INT32 nCurSel = pWnd->GetSelect();
+               int32_t nCurSel = pWnd->GetSelect();
 
                //mantis:0004157
                FX_BOOL bSetValue = TRUE;
@@ -311,10 +295,10 @@ CPWL_Wnd* CFFL_ComboBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRe
        if (bRestoreValue)
        {
                RestoreState(pPageView);
-               pRet = this->GetPDFWindow(pPageView, FALSE);
+               pRet = GetPDFWindow(pPageView, FALSE);
        }
        else
-               pRet = this->GetPDFWindow(pPageView, TRUE);
+               pRet = GetPDFWindow(pPageView, TRUE);
        
        m_pWidget->UpdateField();
        
@@ -331,7 +315,7 @@ void CFFL_ComboBox::OnKeyStroke(FX_BOOL bKeyDown, FX_UINT nFlag)
        {
                if (m_bValid)
                {
-                       CPDFSDK_PageView* pPageView = this->GetCurPageView();
+                       CPDFSDK_PageView* pPageView = GetCurPageView();
                        ASSERT(pPageView != NULL);
 
                        if (CommitData(pPageView, nFlag))