From 8afe15a019c78a24168ebc42306342c25358ccdf Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 5 Oct 2016 12:00:34 -0700 Subject: Cleanup some CPDFSDK_PageView annotation code. This Cl cleans up the code regarding CPDFSDK_Annots in CPDFSDK_PageView. This includes: * Makes DeleteAnnot XFA only and wraps at the call site. * Removes unused methods * Replaces use of CountAnnots and GetAnnot with vector iteration * Removes {Set|Kill}FocusAnnot from CPDFSDK_PageView * Renames m_fxAnnotArray to m_SDKAnnotArray Review-Url: https://codereview.chromium.org/2384323005 --- fpdfsdk/cba_annotiterator.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'fpdfsdk/cba_annotiterator.h') diff --git a/fpdfsdk/cba_annotiterator.h b/fpdfsdk/cba_annotiterator.h index a896c862c7..5cbe8e3d57 100644 --- a/fpdfsdk/cba_annotiterator.h +++ b/fpdfsdk/cba_annotiterator.h @@ -31,13 +31,10 @@ class CBA_AnnotIterator { private: void GenerateResults(); - static CFX_FloatRect GetAnnotRect(const CPDFSDK_Annot* pAnnot); - - // Function signature compatible with std::sort(). - static bool CompareByLeftAscending(const CPDFSDK_Annot* p1, - const CPDFSDK_Annot* p2); - static bool CompareByTopDescending(const CPDFSDK_Annot* p1, - const CPDFSDK_Annot* p2); + void CollectAnnots(std::vector* pArray); + CFX_FloatRect AddToAnnotsList(std::vector* sa, size_t idx); + void AddSelectedToAnnots(std::vector* sa, + std::vector* aSelect); TabOrder m_eTabOrder; CPDFSDK_PageView* m_pPageView; -- cgit v1.2.3