From c88c42f317c0e94c4c7b98949bfe1a495aef07a9 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 30 Oct 2015 23:42:33 -0700 Subject: Clean up CPDF_AnnotList. - Remove dead code - Stop using CFX_PtrArray - Mark more things const - Fix style nits R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425093003 . --- fpdfsdk/include/fsdk_baseform.h | 2 +- fpdfsdk/include/fsdk_define.h | 2 +- fpdfsdk/include/fsdk_mgr.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/include') diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h index bc0edf2fa2..f402aae76f 100644 --- a/fpdfsdk/include/fsdk_baseform.h +++ b/fpdfsdk/include/fsdk_baseform.h @@ -123,7 +123,7 @@ class CPDFSDK_Widget : public CPDFSDK_Annot { CPDF_FormField* GetFormField() const; CPDF_FormControl* GetFormControl() const; static CPDF_FormControl* GetFormControl(CPDF_InterForm* pInterForm, - CPDF_Dictionary* pAnnotDict); + const CPDF_Dictionary* pAnnotDict); void DrawShadow(CFX_RenderDevice* pDevice, CPDFSDK_PageView* pPageView); diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h index 6e3c718948..4177f76d72 100644 --- a/fpdfsdk/include/fsdk_define.h +++ b/fpdfsdk/include/fsdk_define.h @@ -73,7 +73,7 @@ void FPDF_RenderPage_Retail(CRenderContext* pContext, IFSDK_PAUSE_Adapter* pause); void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code); -void CheckUnSupportAnnot(CPDF_Document* pDoc, CPDF_Annot* pPDFAnnot); +void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot); void ProcessParseError(FX_DWORD err_code); #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h index ae4e16368c..7502133dd0 100644 --- a/fpdfsdk/include/fsdk_mgr.h +++ b/fpdfsdk/include/fsdk_mgr.h @@ -292,9 +292,9 @@ class CPDFSDK_PageView final { void PageView_OnDraw(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device, CPDF_RenderOptions* pOptions); - CPDF_Annot* GetPDFAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); + const CPDF_Annot* GetPDFAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); CPDFSDK_Annot* GetFXAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); - CPDF_Annot* GetPDFWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); + const CPDF_Annot* GetPDFWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); CPDFSDK_Annot* GetFXWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY); CPDFSDK_Annot* GetFocusAnnot(); void SetFocusAnnot(CPDFSDK_Annot* pSDKAnnot, FX_UINT nFlag = 0) { @@ -327,7 +327,7 @@ class CPDFSDK_PageView final { double deltaY, const CPDF_Point& point, int nFlag); - FX_BOOL IsValidAnnot(CPDF_Annot* p) const; + bool IsValidAnnot(const CPDF_Annot* p) const; void GetCurrentMatrix(CPDF_Matrix& matrix) { matrix = m_curMatrix; } void UpdateRects(CFX_RectArray& rects); void UpdateView(CPDFSDK_Annot* pAnnot); -- cgit v1.2.3