diff options
author | jaepark <jaepark@google.com> | 2016-08-26 16:16:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-26 16:16:10 -0700 |
commit | 9ed91376d562f3c6e7ca0a99035a74502f648776 (patch) | |
tree | d164689b94d520448de46c8e4dbc9ea0abf788cf /fpdfsdk/cpdfsdk_annothandlermgr.cpp | |
parent | 987f3ee94c3cb8e4a6113ad05453a2948469386c (diff) | |
download | pdfium-9ed91376d562f3c6e7ca0a99035a74502f648776.tar.xz |
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
Diffstat (limited to 'fpdfsdk/cpdfsdk_annothandlermgr.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_annothandlermgr.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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 } |