Chromium Code Reviews| Index: fpdfsdk/cpdfsdk_annothandlermgr.cpp |
| diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp |
| index 33c1ca95a905974320ccbea1143376d4550373c2..8f577899414f4ec5ec6119b1768e3274b407811e 100644 |
| --- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp |
| +++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp |
| @@ -46,7 +46,8 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(CXFA_FFWidget* pAnnot, |
| ASSERT(pAnnot); |
| ASSERT(pPageView); |
| - return GetAnnotHandler(FSDK_XFAWIDGET_TYPENAME)->NewAnnot(pAnnot, pPageView); |
|
dsinclair
2016/08/30 20:40:29
nit: Can this TYPENAME be removed now?
jaepark
2016/08/30 21:21:53
FSDK_XFAWIDGET_TYPENAME is used in CPDFSDK_XFAWidg
|
| + return GetAnnotHandler(CPDF_Annot::Subtype::XFAWIDGET) |
| + ->NewAnnot(pAnnot, pPageView); |
| } |
| #endif // PDF_ENABLE_XFA |
| @@ -77,12 +78,12 @@ IPDFSDK_AnnotHandler* CPDFSDK_AnnotHandlerMgr::GetAnnotHandler( |
| } |
| IPDFSDK_AnnotHandler* CPDFSDK_AnnotHandlerMgr::GetAnnotHandler( |
| - const CFX_ByteString& sType) const { |
| - if (sType == "Widget") |
| + CPDF_Annot::Subtype nAnnotSubtype) const { |
| + if (nAnnotSubtype == CPDF_Annot::Subtype::WIDGET) |
| return m_pBFAnnotHandler.get(); |
| #ifdef PDF_ENABLE_XFA |
| - if (sType == FSDK_XFAWIDGET_TYPENAME) |
| + if (nAnnotSubtype == CPDF_Annot::Subtype::XFAWIDGET) |
| return m_pXFAAnnotHandler.get(); |
| #endif // PDF_ENABLE_XFA |
| @@ -242,7 +243,7 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChangeFocus( |
| if (bXFA) { |
| if (IPDFSDK_AnnotHandler* pXFAAnnotHandler = |
| - GetAnnotHandler(FSDK_XFAWIDGET_TYPENAME)) |
| + GetAnnotHandler(CPDF_Annot::Subtype::XFAWIDGET)) |
| return pXFAAnnotHandler->OnXFAChangedFocus(pKillAnnot, pSetAnnot); |
| } |
| @@ -299,7 +300,7 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, |
| return pPageView->GetAnnotByXFAWidget(hNextFocus); |
| #else // PDF_ENABLE_XFA |
| - CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), "Widget"); |
| + CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), CPDF_Annot::Subtype::WIDGET); |
| return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot); |
| #endif // PDF_ENABLE_XFA |
| } |