From ced4c2bf1d0d1bab14a6145b35b3baecb175a691 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 20 Apr 2015 16:33:30 -0700 Subject: Merge to XFA: Remove Release() combo patch. Includes: Original Review URL: https://codereview.chromium.org/1098043002 Original Review URL: https://codereview.chromium.org/1097843003 Original Review URL: https://codereview.chromium.org/1093213002 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1092033004 --- fpdfsdk/include/fsdk_baseform.h | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'fpdfsdk/include/fsdk_baseform.h') diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h index ff9dfa163d..615be4507c 100644 --- a/fpdfsdk/include/fsdk_baseform.h +++ b/fpdfsdk/include/fsdk_baseform.h @@ -333,32 +333,27 @@ private: #define CPDFSDK_Annots CFX_ArrayTemplate #define CPDFSDK_SortAnnots CGW_ArrayTemplate -class CBA_AnnotIterator +class CBA_AnnotIterator { public: CBA_AnnotIterator(CPDFSDK_PageView* pPageView, const CFX_ByteString& sType, const CFX_ByteString& sSubType); - virtual ~CBA_AnnotIterator(); - - virtual CPDFSDK_Annot* GetFirstAnnot(); - virtual CPDFSDK_Annot* GetLastAnnot(); - virtual CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pAnnot); - virtual CPDFSDK_Annot* GetPrevAnnot(CPDFSDK_Annot* pAnnot); - - virtual void Release(){delete this;} - + ~CBA_AnnotIterator(); + + CPDFSDK_Annot* GetFirstAnnot(); + CPDFSDK_Annot* GetLastAnnot(); + CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pAnnot); + CPDFSDK_Annot* GetPrevAnnot(CPDFSDK_Annot* pAnnot); + private: void GenerateResults(); static int CompareByLeft(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2); static int CompareByTop(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2); - static CPDF_Rect GetAnnotRect(CPDFSDK_Annot* pAnnot); - -private: + CPDFSDK_PageView* m_pPageView; CFX_ByteString m_sType; CFX_ByteString m_sSubType; int m_nTabs; - CPDFSDK_Annots m_Annots; }; -- cgit v1.2.3