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 --- core/fpdfdoc/cpdf_annot.cpp | 6 +++--- core/fpdfdoc/cpdf_annotlist.cpp | 2 +- core/fpdfdoc/include/cpdf_annot.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'core/fpdfdoc') diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp index e70ee27a98..10360eaf68 100644 --- a/core/fpdfdoc/cpdf_annot.cpp +++ b/core/fpdfdoc/cpdf_annot.cpp @@ -51,7 +51,7 @@ void CPDF_Annot::GenerateAPIfNeeded() { void CPDF_Annot::ClearCachedAP() { m_APMap.clear(); } -CFX_ByteString CPDF_Annot::GetSubType() const { +CFX_ByteString CPDF_Annot::GetSubtype() const { return m_sSubtype; } @@ -186,9 +186,9 @@ FX_BOOL CPDF_Annot::DrawInContext(const CPDF_Page* pPage, void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice, const CFX_Matrix* pUser2Device, const CPDF_RenderOptions* pOptions) { - if (GetSubType() == "Popup") { + if (GetSubtype() == "Popup") return; - } + uint32_t annot_flags = GetFlags(); if (annot_flags & ANNOTFLAG_HIDDEN) { return; diff --git a/core/fpdfdoc/cpdf_annotlist.cpp b/core/fpdfdoc/cpdf_annotlist.cpp index 153b25fac4..e6c93c1d1e 100644 --- a/core/fpdfdoc/cpdf_annotlist.cpp +++ b/core/fpdfdoc/cpdf_annotlist.cpp @@ -62,7 +62,7 @@ void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, CPDF_RenderOptions* pOptions, FX_RECT* clip_rect) { for (const auto& pAnnot : m_AnnotList) { - bool bWidget = pAnnot->GetSubType() == "Widget"; + bool bWidget = pAnnot->GetSubtype() == "Widget"; if ((bWidgetPass && !bWidget) || (!bWidgetPass && bWidget)) continue; diff --git a/core/fpdfdoc/include/cpdf_annot.h b/core/fpdfdoc/include/cpdf_annot.h index 9f8671633c..914393a818 100644 --- a/core/fpdfdoc/include/cpdf_annot.h +++ b/core/fpdfdoc/include/cpdf_annot.h @@ -42,7 +42,7 @@ class CPDF_Annot { CPDF_Annot(CPDF_Dictionary* pDict, CPDF_Document* pDocument); ~CPDF_Annot(); - CFX_ByteString GetSubType() const; + CFX_ByteString GetSubtype() const; uint32_t GetFlags() const; CFX_FloatRect GetRect() const; const CPDF_Dictionary* GetAnnotDict() const { return m_pAnnotDict; } -- cgit v1.2.3