From 3db875920a253a8541642a2aa913f474b125d67f Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 2 Jun 2017 12:48:22 -0700 Subject: Remove dead CPDFSDK_Annot code. Change-Id: Ied77912f0f657ebc8e36469365de230e552e4956 Reviewed-on: https://pdfium-review.googlesource.com/6233 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- fpdfsdk/cpdfsdk_annot.cpp | 14 +------------- fpdfsdk/cpdfsdk_annot.h | 11 +---------- fpdfsdk/cpdfsdk_baannot.cpp | 8 -------- fpdfsdk/cpdfsdk_baannot.h | 3 --- 4 files changed, 2 insertions(+), 34 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/cpdfsdk_annot.cpp b/fpdfsdk/cpdfsdk_annot.cpp index dcfcac92fc..e105ed90fb 100644 --- a/fpdfsdk/cpdfsdk_annot.cpp +++ b/fpdfsdk/cpdfsdk_annot.cpp @@ -23,7 +23,7 @@ const float kMinHeight = 1.0f; } // namespace CPDFSDK_Annot::CPDFSDK_Annot(CPDFSDK_PageView* pPageView) - : m_pPageView(pPageView), m_bSelected(false) {} + : m_pPageView(pPageView) {} CPDFSDK_Annot::~CPDFSDK_Annot() {} @@ -73,18 +73,6 @@ CFX_FloatRect CPDFSDK_Annot::GetRect() const { return CFX_FloatRect(); } -void CPDFSDK_Annot::Annot_OnDraw(CFX_RenderDevice* pDevice, - CFX_Matrix* pUser2Device, - CPDF_RenderOptions* pOptions) {} - -bool CPDFSDK_Annot::IsSelected() { - return m_bSelected; -} - -void CPDFSDK_Annot::SetSelected(bool bSelected) { - m_bSelected = bSelected; -} - UnderlyingPageType* CPDFSDK_Annot::GetUnderlyingPage() { #ifdef PDF_ENABLE_XFA return GetPDFXFAPage(); diff --git a/fpdfsdk/cpdfsdk_annot.h b/fpdfsdk/cpdfsdk_annot.h index abcdc2ebae..3ab7981051 100644 --- a/fpdfsdk/cpdfsdk_annot.h +++ b/fpdfsdk/cpdfsdk_annot.h @@ -40,11 +40,7 @@ class CPDFSDK_Annot : public CFX_Observable { virtual CPDF_Annot::Subtype GetAnnotSubtype() const; virtual bool IsSignatureWidget() const; virtual CFX_FloatRect GetRect() const; - virtual void SetRect(const CFX_FloatRect& rect); - virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, - CFX_Matrix* pUser2Device, - CPDF_RenderOptions* pOptions); UnderlyingPageType* GetUnderlyingPage(); CPDF_Page* GetPDFPage(); @@ -52,15 +48,10 @@ class CPDFSDK_Annot : public CFX_Observable { CPDFXFA_Page* GetPDFXFAPage(); #endif // PDF_ENABLE_XFA - void SetPage(CPDFSDK_PageView* pPageView); CPDFSDK_PageView* GetPageView() const { return m_pPageView.Get(); } - bool IsSelected(); - void SetSelected(bool bSelected); - protected: - CFX_UnownedPtr m_pPageView; - bool m_bSelected; + CFX_UnownedPtr const m_pPageView; }; #endif // FPDFSDK_CPDFSDK_ANNOT_H_ diff --git a/fpdfsdk/cpdfsdk_baannot.cpp b/fpdfsdk/cpdfsdk_baannot.cpp index 4f11f77f0b..1f4f279b5e 100644 --- a/fpdfsdk/cpdfsdk_baannot.cpp +++ b/fpdfsdk/cpdfsdk_baannot.cpp @@ -386,14 +386,6 @@ CPDF_Action CPDFSDK_BAAnnot::GetAAction(CPDF_AAction::AActionType eAAT) { return CPDF_Action(); } -void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice, - CFX_Matrix* pUser2Device, - CPDF_RenderOptions* pOptions) { - m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal); - m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, - CPDF_Annot::Normal, nullptr); -} - void CPDFSDK_BAAnnot::SetOpenState(bool bOpenState) { if (CPDF_Annot* pAnnot = m_pAnnot->GetPopupAnnot()) pAnnot->SetOpenState(bOpenState); diff --git a/fpdfsdk/cpdfsdk_baannot.h b/fpdfsdk/cpdfsdk_baannot.h index 4bf8f73823..6c9ae06ed4 100644 --- a/fpdfsdk/cpdfsdk_baannot.h +++ b/fpdfsdk/cpdfsdk_baannot.h @@ -32,9 +32,6 @@ class CPDFSDK_BAAnnot : public CPDFSDK_Annot { void SetRect(const CFX_FloatRect& rect) override; CFX_FloatRect GetRect() const override; CPDF_Annot* GetPDFAnnot() const override; - void Annot_OnDraw(CFX_RenderDevice* pDevice, - CFX_Matrix* pUser2Device, - CPDF_RenderOptions* pOptions) override; CPDF_Dictionary* GetAnnotDict() const; CPDF_Annot* GetPDFPopupAnnot() const; -- cgit v1.2.3