summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_formcontrol.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-15 18:51:11 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-15 18:51:11 +0000
commite4f2f4a3f4fd3e9f372912f4151d7c7843f9556f (patch)
treed88a221b657d7e09bd0fd7460644fd5c048515fb /core/fpdfdoc/cpdf_formcontrol.h
parent98ac76ec09ce72526134ad75f1921a1691804dd1 (diff)
downloadpdfium-e4f2f4a3f4fd3e9f372912f4151d7c7843f9556f.tar.xz
Use more UnownedPtr in CPDF_FormControl.
To make this work, remove an UnownedPtr vector in CPDF_FormField and make CPDF_InteractiveForm manage it instead. Also simplify some code within CPDF_FormControl and CPDF_InteractiveForm. Change-Id: Ifc3a979dcdb992376a48db7a40840d2e76078500 Reviewed-on: https://pdfium-review.googlesource.com/c/43938 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_formcontrol.h')
-rw-r--r--core/fpdfdoc/cpdf_formcontrol.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfdoc/cpdf_formcontrol.h b/core/fpdfdoc/cpdf_formcontrol.h
index 7288651a73..d66ae0ab6f 100644
--- a/core/fpdfdoc/cpdf_formcontrol.h
+++ b/core/fpdfdoc/cpdf_formcontrol.h
@@ -48,7 +48,7 @@ class CPDF_FormControl {
const CPDF_InteractiveForm* GetInteractiveForm() const {
return m_pForm.Get();
}
- CPDF_FormField* GetField() const { return m_pField; }
+ CPDF_FormField* GetField() const { return m_pField.Get(); }
CPDF_Dictionary* GetWidget() const { return m_pWidgetDict.Get(); }
CFX_FloatRect GetRect() const;
@@ -115,7 +115,7 @@ class CPDF_FormControl {
CPDF_Stream* GetIcon(const ByteString& csEntry);
CPDF_ApSettings GetMK() const;
- CPDF_FormField* const m_pField;
+ UnownedPtr<CPDF_FormField> const m_pField;
UnownedPtr<CPDF_Dictionary> const m_pWidgetDict;
UnownedPtr<const CPDF_InteractiveForm> const m_pForm;
};