Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1326)

Unified Diff: core/src/fpdfdoc/doc_form.cpp

Issue 1701883004: Banish CFX_ByteStringArray and CFX_WideStringArray to the XFA side. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix non-xfa build. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfdoc/doc_form.cpp
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp
index 5cfad3f068b2571d92b6c396c2a3db04080a077c..8d3dc6221fdd4817a5d766f8f7bf6d38ad79f380 100644
--- a/core/src/fpdfdoc/doc_form.cpp
+++ b/core/src/fpdfdoc/doc_form.cpp
@@ -663,15 +663,14 @@ CPDF_FormField* CPDF_InterForm::GetField(FX_DWORD index,
CFieldTree::_Node* pNode = m_pFieldTree->FindNode(csFieldName);
return pNode ? pNode->GetField(index) : nullptr;
}
-void CPDF_InterForm::GetAllFieldNames(CFX_WideStringArray& allFieldNames) {
- allFieldNames.RemoveAll();
+
+void CPDF_InterForm::GetAllFieldNames(
Lei Zhang 2016/02/17 02:17:21 Dead code, BTW.
Tom Sepez 2016/02/17 18:07:47 And its gone.
+ std::vector<CFX_WideString>& allFieldNames) {
+ allFieldNames.clear();
int nCount = m_pFieldTree->m_Root.CountFields();
for (int i = 0; i < nCount; i++) {
- CPDF_FormField* pField = m_pFieldTree->m_Root.GetField(i);
- if (pField) {
- CFX_WideString full_name = GetFullName(pField->GetFieldDict());
- allFieldNames.Add(full_name);
- }
+ if (CPDF_FormField* pField = m_pFieldTree->m_Root.GetField(i))
+ allFieldNames.push_back(GetFullName(pField->GetFieldDict()));
}
}

Powered by Google App Engine
This is Rietveld 408576698