From 9ed91376d562f3c6e7ca0a99035a74502f648776 Mon Sep 17 00:00:00 2001 From: jaepark Date: Fri, 26 Aug 2016 16:16:10 -0700 Subject: Rename CPDFSDK_Annot::GetType to CPDFSDK_Annot::GetAnnotSubtype. CPDFSDK_Annot::GetType should be renamed to GetAnnotSubtype as it returns annotation subtype. Also, CPDFSDK_Annot::GetSubType is only used to check if the annotation is signature widget. Thus, change the method to IsSignatureWidget. Lastly, rename CPDF_Annot::GetSubType to CPDF_Annot::GetSubtype to match with spec. Review-Url: https://codereview.chromium.org/2287703002 --- fpdfsdk/cpdfsdk_annothandlermgr.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'fpdfsdk/cpdfsdk_annothandlermgr.cpp') diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp index bca2c9baa9..e7744bfa46 100644 --- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp +++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp @@ -53,7 +53,7 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(CPDF_Annot* pAnnot, ASSERT(pPageView); if (IPDFSDK_AnnotHandler* pAnnotHandler = - GetAnnotHandler(pAnnot->GetSubType())) { + GetAnnotHandler(pAnnot->GetSubtype())) { return pAnnotHandler->NewAnnot(pAnnot, pPageView); } @@ -106,7 +106,7 @@ IPDFSDK_AnnotHandler* CPDFSDK_AnnotHandlerMgr::GetAnnotHandler( CPDFSDK_Annot* pAnnot) const { CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); if (pPDFAnnot) - return GetAnnotHandler(pPDFAnnot->GetSubType()); + return GetAnnotHandler(pPDFAnnot->GetSubtype()); #ifdef PDF_ENABLE_XFA if (pAnnot->GetXFAWidget()) return GetAnnotHandler(FSDK_XFAWIDGET_TYPENAME); @@ -359,7 +359,8 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, if (!pPage) return nullptr; if (pPage->GetPDFPage()) { // for pdf annots. - CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), pSDKAnnot->GetType(), ""); + CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), + pSDKAnnot->GetAnnotSubtype()); CPDFSDK_Annot* pNext = bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot); return pNext; @@ -381,7 +382,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(), "Widget"); return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot); #endif // PDF_ENABLE_XFA } -- cgit v1.2.3