summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfdoc/doc_utils.cpp')
-rw-r--r--core/src/fpdfdoc/doc_utils.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/src/fpdfdoc/doc_utils.cpp b/core/src/fpdfdoc/doc_utils.cpp
index 7db2887834..a2c0454bc9 100644
--- a/core/src/fpdfdoc/doc_utils.cpp
+++ b/core/src/fpdfdoc/doc_utils.cpp
@@ -678,17 +678,17 @@ FX_BOOL CPDF_IconFit::GetFittingBounds() {
}
return m_pDict->GetBooleanBy("FB");
}
-void SaveCheckedFieldStatus(CPDF_FormField* pField,
- CFX_ByteArray& statusArray) {
+
+std::vector<bool> SaveCheckedFieldStatus(CPDF_FormField* pField) {
+ std::vector<bool> result;
int iCount = pField->CountControls();
- for (int i = 0; i < iCount; i++) {
- CPDF_FormControl* pControl = pField->GetControl(i);
- if (!pControl) {
- continue;
- }
- statusArray.Add(pControl->IsChecked() ? 1 : 0);
+ for (int i = 0; i < iCount; ++i) {
+ if (CPDF_FormControl* pControl = pField->GetControl(i))
+ result.push_back(pControl->IsChecked());
}
+ return result;
}
+
CPDF_Object* FPDF_GetFieldAttr(CPDF_Dictionary* pFieldDict,
const FX_CHAR* name,
int nLevel) {