Cleanup: Get this rid of "this->" in fpdfsdk/
[pdfium.git] / fpdfsdk / src / formfiller / FFL_ListBox.cpp
index 87ae552..6ee608a 100644 (file)
@@ -45,11 +45,6 @@ PWL_CREATEPARAM      CFFL_ListBox::GetCreateParam()
                cp.dwFlags |= PLBS_MULTIPLESEL;
        }
 
-       if (dwFieldFlag & FIELDFLAG_COMMITONSELCHANGE)
-       {
-               //cp.dwFlags |= PLBS_COMMITSELECTEDVALUE;
-       }
-
        cp.dwFlags |= PWS_VSCROLL;
 
        if (cp.dwFlags & PWS_AUTOFONTSIZE)
@@ -57,8 +52,7 @@ PWL_CREATEPARAM       CFFL_ListBox::GetCreateParam()
 
        if (!m_pFontMap)
        {
-               ASSERT(this->m_pApp != NULL);
-               m_pFontMap = new CBA_FontMap(m_pWidget,m_pApp->GetSysHandler());//, ISystemHandle::GetSystemHandler(m_pApp));
+               m_pFontMap = new CBA_FontMap(m_pWidget, m_pApp->GetSysHandler());
                m_pFontMap->Initial();
        }
        cp.pFontMap = m_pFontMap;
@@ -76,17 +70,15 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView
        CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
        pWnd->SetFillerNotify(pIFormFiller);
 
-       ASSERT(m_pWidget != NULL);
-       
-       for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
-               pWnd->AddString(m_pWidget->GetOptionLabel(i));
-       
+       for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
+               pWnd->AddString(m_pWidget->GetOptionLabel(i).c_str());
+
        if (pWnd->HasFlag(PLBS_MULTIPLESEL))
        {
                m_OriginSelections.RemoveAll();
                
                FX_BOOL bSetCaret = FALSE;
-               for (FX_INT32 i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
+               for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++)
                {
                        if (m_pWidget->IsOptionSelected(i))
                        {
@@ -132,7 +124,7 @@ FX_BOOL     CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView)
                if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT)
                {
                        int nSelCount = 0;
-                       for (FX_INT32 i=0,sz=pListBox->GetCount(); i<sz; i++)
+                       for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
                        {
                                if (pListBox->IsItemSelected(i))
                                {
@@ -174,13 +166,13 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView)
                }
 
                
-               FX_INT32 nNewTopIndex = pListBox->GetTopVisibleIndex();
+               int32_t nNewTopIndex = pListBox->GetTopVisibleIndex();
 
                m_pWidget->ClearSelection(FALSE);       
 
                if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT)
                {
-                       for (FX_INT32 i=0,sz=pListBox->GetCount(); i<sz; i++)
+                       for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
                        {
                                if (pListBox->IsItemSelected(i))
                                {
@@ -217,7 +209,7 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAct
                        if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
                        {
                                ASSERT(m_pWidget != NULL);
-                               FX_INT32 nCurSel = pListBox->GetCurSel();
+                               int32_t nCurSel = pListBox->GetCurSel();
                                if (nCurSel >= 0)
                                        fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
                        }
@@ -232,7 +224,7 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAct
                else
                {
                        ASSERT(m_pWidget != NULL);
-                       FX_INT32 nCurSel = m_pWidget->GetSelectedIndex(0);
+                       int32_t nCurSel = m_pWidget->GetSelectedIndex(0);
                        if (nCurSel >= 0)
                                fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
                }
@@ -254,7 +246,7 @@ void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView)
 
        if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
        {
-               for (FX_INT32 i=0,sz=pListBox->GetCount(); i<sz; i++)
+               for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++)
                {
                        if (pListBox->IsItemSelected(i))
                        {
@@ -285,10 +277,10 @@ CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRes
        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();
        
@@ -305,7 +297,7 @@ void CFFL_ListBox::OnKeyStroke(FX_BOOL bKeyDown, FX_DWORD nFlag)
        {
                if (m_bValid)
                {
-                       CPDFSDK_PageView* pPageView = this->GetCurPageView();
+                       CPDFSDK_PageView* pPageView = GetCurPageView();
                        ASSERT(pPageView != NULL);
 
                        if (CommitData(pPageView, nFlag))