Remove |CPDF_FormField::m_bReadOnly|.
It is never read from.
Change-Id: I0fde0de2dc92cbd22d3f85ea8d728a20cf4f5b55
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/59933
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfdoc/cpdf_formfield.cpp b/core/fpdfdoc/cpdf_formfield.cpp
index 7b1b6ff..3db9c86 100644
--- a/core/fpdfdoc/cpdf_formfield.cpp
+++ b/core/fpdfdoc/cpdf_formfield.cpp
@@ -120,10 +120,8 @@
const CPDF_Object* ff_attr =
FPDF_GetFieldAttr(m_pDict.Get(), pdfium::form_fields::kFf);
uint32_t flags = ff_attr ? ff_attr->GetInteger() : 0;
- if (flags & pdfium::form_flags::kReadOnly) {
+ if (flags & pdfium::form_flags::kReadOnly)
m_Flags |= pdfium::form_flags::kReadOnly;
- m_bReadOnly = true;
- }
if (flags & pdfium::form_flags::kRequired) {
m_Flags |= pdfium::form_flags::kRequired;
m_bRequired = true;
diff --git a/core/fpdfdoc/cpdf_formfield.h b/core/fpdfdoc/cpdf_formfield.h
index a07720f..a16f777 100644
--- a/core/fpdfdoc/cpdf_formfield.h
+++ b/core/fpdfdoc/cpdf_formfield.h
@@ -124,8 +124,6 @@
uint32_t GetFieldFlags() const;
ByteString GetDefaultStyle() const;
- // TODO(thestig): Figure out what to do with unused methods here.
- bool IsReadOnly() const { return m_bReadOnly; }
bool IsRequired() const { return m_bRequired; }
bool IsNoExport() const { return m_bNoExport; }
@@ -195,7 +193,6 @@
const std::vector<UnownedPtr<CPDF_FormControl>>& GetControls() const;
CPDF_FormField::Type m_Type = kUnknown;
- bool m_bReadOnly = false;
bool m_bRequired = false;
bool m_bNoExport = false;
uint32_t m_Flags = 0;