summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-17 22:20:19 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-17 22:20:19 +0000
commitec885bad72ef8bae21270d235ae5029ef2bdc134 (patch)
tree735c9e243970f98b60dac836ae4f762170d3b73c
parenta8a69e742f57a58a61555242751542fbc3fc5267 (diff)
downloadpdfium-ec885bad72ef8bae21270d235ae5029ef2bdc134.tar.xz
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 <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
-rw-r--r--fpdfsdk/cpdfsdk_annot.cpp15
-rw-r--r--fpdfsdk/cpdfsdk_annot.h2
-rw-r--r--fpdfsdk/cpdfsdk_baannot.cpp5
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<CPDFSDK_Annot> {
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);
}