summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/cpdfsdk_annot.cpp14
-rw-r--r--fpdfsdk/cpdfsdk_annot.h11
-rw-r--r--fpdfsdk/cpdfsdk_baannot.cpp8
-rw-r--r--fpdfsdk/cpdfsdk_baannot.h3
4 files changed, 2 insertions, 34 deletions
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<CPDFSDK_Annot> {
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<CPDFSDK_Annot> {
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<CPDFSDK_PageView> m_pPageView;
- bool m_bSelected;
+ CFX_UnownedPtr<CPDFSDK_PageView> 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;