diff options
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r-- | xfa/fxfa/app/xfa_ffchoicelist.cpp | 11 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_ffdocview.cpp | 5 | ||||
-rw-r--r-- | xfa/fxfa/app/xfa_ffwidgetacc.cpp | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp index 72284d6ef7..d19fd6876b 100644 --- a/xfa/fxfa/app/xfa_ffchoicelist.cpp +++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp @@ -6,7 +6,10 @@ #include "xfa/fxfa/app/xfa_ffchoicelist.h" +#include <vector> + #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #include "xfa/fwl/cfwl_app.h" #include "xfa/fwl/cfwl_combobox.h" #include "xfa/fwl/cfwl_edit.h" @@ -50,9 +53,9 @@ bool CXFA_FFListBox::LoadWidget() { m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); - CFX_WideStringArray wsLabelArray; + std::vector<CFX_WideString> wsLabelArray; m_pDataAcc->GetChoiceListItems(wsLabelArray, false); - int32_t iItems = wsLabelArray.GetSize(); + int32_t iItems = pdfium::CollectionSize<int32_t>(wsLabelArray); for (int32_t i = 0; i < iItems; i++) { pListBox->AddString(wsLabelArray[i].AsStringC()); } @@ -247,9 +250,9 @@ bool CXFA_FFComboBox::LoadWidget() { m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); - CFX_WideStringArray wsLabelArray; + std::vector<CFX_WideString> wsLabelArray; m_pDataAcc->GetChoiceListItems(wsLabelArray, false); - int32_t iItems = wsLabelArray.GetSize(); + int32_t iItems = pdfium::CollectionSize<int32_t>(wsLabelArray); for (int32_t i = 0; i < iItems; i++) { pComboBox->AddString(wsLabelArray[i].AsStringC()); } diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp index 477bd54457..78b690afc1 100644 --- a/xfa/fxfa/app/xfa_ffdocview.cpp +++ b/xfa/fxfa/app/xfa_ffdocview.cpp @@ -7,6 +7,7 @@ #include "xfa/fxfa/xfa_ffdocview.h" #include "core/fxcrt/fx_ext.h" +#include "third_party/base/stl_util.h" #include "xfa/fxfa/app/xfa_ffbarcode.h" #include "xfa/fxfa/app/xfa_ffcheckbutton.h" #include "xfa/fxfa/app/xfa_ffchoicelist.h" @@ -146,7 +147,7 @@ int32_t CXFA_FFDocView::GetLayoutStatus() { return m_iStatus; } void CXFA_FFDocView::ShowNullTestMsg() { - int32_t iCount = m_arrNullTestMsg.GetSize(); + int32_t iCount = pdfium::CollectionSize<int32_t>(m_arrNullTestMsg); CXFA_FFApp* pApp = m_pDoc->GetApp(); IXFA_AppProvider* pAppProvider = pApp->GetAppProvider(); if (pAppProvider && iCount) { @@ -169,7 +170,7 @@ void CXFA_FFDocView::ShowNullTestMsg() { pAppProvider->LoadString(XFA_IDS_AppName, wsTitle); pAppProvider->MsgBox(wsMsg, wsTitle, XFA_MBICON_Status, XFA_MB_OK); } - m_arrNullTestMsg.RemoveAll(); + m_arrNullTestMsg.clear(); } void CXFA_FFDocView::UpdateDocView() { if (IsUpdateLocked()) { diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp index 64d76a6d2a..d63a4f5151 100644 --- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp +++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp @@ -476,7 +476,7 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate, } if (!wsNullMsg.IsEmpty()) { if (eNullTest != XFA_ATTRIBUTEENUM_Disabled) { - m_pDocView->m_arrNullTestMsg.Add(wsNullMsg); + m_pDocView->m_arrNullTestMsg.push_back(wsNullMsg); return XFA_EVENTERROR_Error; } return XFA_EVENTERROR_Success; |