Use enum class for subtypes of CPDF_Annot.
Comparing CFX_ByteString for annotation subtypes is inefficient and
error-prone. This CL uses enum class to compare annotation subtypes.
Also, remove unused IPDFSDK_AnnotHandler::GetType() and
FSDK_XFAWIDGET_TYPENAME.
Review-Url: https://codereview.chromium.org/2295953002
diff --git a/fpdfsdk/cpdfsdk_xfawidget.cpp b/fpdfsdk/cpdfsdk_xfawidget.cpp
index 445abc5..b5e26d6 100644
--- a/fpdfsdk/cpdfsdk_xfawidget.cpp
+++ b/fpdfsdk/cpdfsdk_xfawidget.cpp
@@ -24,8 +24,8 @@
return m_hXFAWidget;
}
-CFX_ByteString CPDFSDK_XFAWidget::GetAnnotSubtype() const {
- return FSDK_XFAWIDGET_TYPENAME;
+CPDF_Annot::Subtype CPDFSDK_XFAWidget::GetAnnotSubtype() const {
+ return CPDF_Annot::Subtype::XFAWIDGET;
}
CFX_FloatRect CPDFSDK_XFAWidget::GetRect() const {