From ec885bad72ef8bae21270d235ae5029ef2bdc134 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 17 Oct 2018 22:20:19 +0000 Subject: Remove CPDFSDK_Annot::GetMinWidth() and GetMinHeight(). These are a pair of virtual functions that are never overriden and are only used once in an ASSERT(). Change-Id: I6df9d20cc3e4c0679514fa5c0c15a4d797862b5d Reviewed-on: https://pdfium-review.googlesource.com/c/44213 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- fpdfsdk/cpdfsdk_annot.cpp | 15 --------------- fpdfsdk/cpdfsdk_annot.h | 2 -- fpdfsdk/cpdfsdk_baannot.cpp | 5 ++--- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/fpdfsdk/cpdfsdk_annot.cpp b/fpdfsdk/cpdfsdk_annot.cpp index 6d9029aa06..b60e05b539 100644 --- a/fpdfsdk/cpdfsdk_annot.cpp +++ b/fpdfsdk/cpdfsdk_annot.cpp @@ -14,13 +14,6 @@ #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" #endif // PDF_ENABLE_XFA -namespace { - -const float kMinWidth = 1.0f; -const float kMinHeight = 1.0f; - -} // namespace - CPDFSDK_Annot::CPDFSDK_Annot(CPDFSDK_PageView* pPageView) : m_pPageView(pPageView) {} @@ -46,14 +39,6 @@ CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { #endif // PDF_ENABLE_XFA -float CPDFSDK_Annot::GetMinWidth() const { - return kMinWidth; -} - -float CPDFSDK_Annot::GetMinHeight() const { - return kMinHeight; -} - int CPDFSDK_Annot::GetLayoutOrder() const { return 5; } diff --git a/fpdfsdk/cpdfsdk_annot.h b/fpdfsdk/cpdfsdk_annot.h index 5f7d2ed947..06cfb70ccc 100644 --- a/fpdfsdk/cpdfsdk_annot.h +++ b/fpdfsdk/cpdfsdk_annot.h @@ -39,8 +39,6 @@ class CPDFSDK_Annot : public Observable { virtual CXFA_FFWidget* GetXFAWidget() const; #endif // PDF_ENABLE_XFA - virtual float GetMinWidth() const; - virtual float GetMinHeight() const; virtual int GetLayoutOrder() const; virtual CPDF_Annot* GetPDFAnnot() const; virtual CPDF_Annot::Subtype GetAnnotSubtype() const; diff --git a/fpdfsdk/cpdfsdk_baannot.cpp b/fpdfsdk/cpdfsdk_baannot.cpp index dc4f3f96b2..5a0d4be6f1 100644 --- a/fpdfsdk/cpdfsdk_baannot.cpp +++ b/fpdfsdk/cpdfsdk_baannot.cpp @@ -50,9 +50,8 @@ CPDF_Dictionary* CPDFSDK_BAAnnot::GetAPDict() const { } void CPDFSDK_BAAnnot::SetRect(const CFX_FloatRect& rect) { - ASSERT(rect.right - rect.left >= GetMinWidth()); - ASSERT(rect.top - rect.bottom >= GetMinHeight()); - + ASSERT(rect.right - rect.left >= 1.0f); + ASSERT(rect.top - rect.bottom >= 1.0f); GetAnnotDict()->SetRectFor("Rect", rect); } -- cgit v1.2.3