summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/cpdfsdk_annot.cpp2
-rw-r--r--fpdfsdk/cpdfsdk_annot.h2
-rw-r--r--fpdfsdk/cpdfsdk_xfawidget.cpp4
-rw-r--r--fpdfsdk/cpdfsdk_xfawidget.h6
-rw-r--r--fpdfsdk/cpdfsdk_xfawidgethandler.cpp4
5 files changed, 8 insertions, 10 deletions
diff --git a/fpdfsdk/cpdfsdk_annot.cpp b/fpdfsdk/cpdfsdk_annot.cpp
index 75967a301f..4657368798 100644
--- a/fpdfsdk/cpdfsdk_annot.cpp
+++ b/fpdfsdk/cpdfsdk_annot.cpp
@@ -33,7 +33,7 @@ CPDFSDK_BAAnnot* CPDFSDK_Annot::AsBAAnnot() {
#ifdef PDF_ENABLE_XFA
-bool CPDFSDK_Annot::IsXFAField() {
+bool CPDFSDK_Annot::IsXFAField() const {
return false;
}
diff --git a/fpdfsdk/cpdfsdk_annot.h b/fpdfsdk/cpdfsdk_annot.h
index 708a223a50..5f7d2ed947 100644
--- a/fpdfsdk/cpdfsdk_annot.h
+++ b/fpdfsdk/cpdfsdk_annot.h
@@ -35,7 +35,7 @@ class CPDFSDK_Annot : public Observable<CPDFSDK_Annot> {
virtual CPDFSDK_BAAnnot* AsBAAnnot();
#ifdef PDF_ENABLE_XFA
- virtual bool IsXFAField();
+ virtual bool IsXFAField() const;
virtual CXFA_FFWidget* GetXFAWidget() const;
#endif // PDF_ENABLE_XFA
diff --git a/fpdfsdk/cpdfsdk_xfawidget.cpp b/fpdfsdk/cpdfsdk_xfawidget.cpp
index af08023ef8..7c9089a29a 100644
--- a/fpdfsdk/cpdfsdk_xfawidget.cpp
+++ b/fpdfsdk/cpdfsdk_xfawidget.cpp
@@ -16,9 +16,9 @@ CPDFSDK_XFAWidget::CPDFSDK_XFAWidget(CXFA_FFWidget* pAnnot,
m_pInterForm(pInterForm),
m_hXFAWidget(pAnnot) {}
-CPDFSDK_XFAWidget::~CPDFSDK_XFAWidget() {}
+CPDFSDK_XFAWidget::~CPDFSDK_XFAWidget() = default;
-bool CPDFSDK_XFAWidget::IsXFAField() {
+bool CPDFSDK_XFAWidget::IsXFAField() const {
return true;
}
diff --git a/fpdfsdk/cpdfsdk_xfawidget.h b/fpdfsdk/cpdfsdk_xfawidget.h
index 5878051c8d..2eaa29bb14 100644
--- a/fpdfsdk/cpdfsdk_xfawidget.h
+++ b/fpdfsdk/cpdfsdk_xfawidget.h
@@ -24,7 +24,7 @@ class CPDFSDK_XFAWidget final : public CPDFSDK_Annot {
~CPDFSDK_XFAWidget() override;
// CPDFSDK_Annot:
- bool IsXFAField() override;
+ bool IsXFAField() const override;
CXFA_FFWidget* GetXFAWidget() const override;
CPDF_Annot::Subtype GetAnnotSubtype() const override;
CFX_FloatRect GetRect() const override;
@@ -32,8 +32,8 @@ class CPDFSDK_XFAWidget final : public CPDFSDK_Annot {
CPDFSDK_InterForm* GetInterForm() const { return m_pInterForm.Get(); }
private:
- UnownedPtr<CPDFSDK_InterForm> m_pInterForm;
- UnownedPtr<CXFA_FFWidget> m_hXFAWidget;
+ UnownedPtr<CPDFSDK_InterForm> const m_pInterForm;
+ UnownedPtr<CXFA_FFWidget> const m_hXFAWidget;
};
inline CPDFSDK_XFAWidget* ToXFAWidget(CPDFSDK_Annot* pAnnot) {
diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
index eeccf21584..75a5c12ba2 100644
--- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
@@ -70,9 +70,7 @@ void CPDFSDK_XFAWidgetHandler::OnLoad(CPDFSDK_Annot* pAnnot) {}
void CPDFSDK_XFAWidgetHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) {
CPDFSDK_XFAWidget* pWidget = ToXFAWidget(pAnnot);
- CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm();
- pInterForm->RemoveXFAMap(pWidget->GetXFAWidget());
-
+ pWidget->GetInterForm()->RemoveXFAMap(pWidget->GetXFAWidget());
delete pWidget;
}