diff options
author | thestig <thestig@chromium.org> | 2016-05-11 12:59:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-11 12:59:42 -0700 |
commit | cac1571474399a6b0271dde998970544543c921f (patch) | |
tree | 3227520be91865abb831c482e4795c87ab583fde /core/fpdfdoc/pdf_vt.h | |
parent | 821d59e1d66b67af970c59b7681828b1b82858b6 (diff) | |
download | pdfium-chromium/2734.tar.xz |
Remove CPVT_Size and CPVT_FloatRange.chromium/2734
- CPVT_Size is the same as CFX_SizeF
- CPVT_FloatRange is unused.
Review-Url: https://codereview.chromium.org/1961333002
Diffstat (limited to 'core/fpdfdoc/pdf_vt.h')
-rw-r--r-- | core/fpdfdoc/pdf_vt.h | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/core/fpdfdoc/pdf_vt.h b/core/fpdfdoc/pdf_vt.h index a3b7883a9b..9026eeee9e 100644 --- a/core/fpdfdoc/pdf_vt.h +++ b/core/fpdfdoc/pdf_vt.h @@ -20,22 +20,6 @@ struct CPVT_WordInfo; #define IsFloatSmaller(fa, fb) ((fa) < (fb) && !IsFloatZero((fa) - (fb))) #define IsFloatEqual(fa, fb) IsFloatZero((fa) - (fb)) -class CPVT_Size { - public: - CPVT_Size() : x(0.0f), y(0.0f) {} - CPVT_Size(FX_FLOAT other_x, FX_FLOAT other_y) { - x = other_x; - y = other_y; - } - FX_FLOAT x, y; -}; - -struct CPVT_FloatRange { - CPVT_FloatRange() : fMin(0.0f), fMax(0.0f) {} - CPVT_FloatRange(FX_FLOAT min, FX_FLOAT max) : fMin(min), fMax(max) {} - FX_FLOAT Range() const { return fMax - fMin; } - FX_FLOAT fMin, fMax; -}; template <class TYPE> class CPVT_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { public: @@ -52,10 +36,11 @@ class CPVT_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { } } }; -class CLine { +class CLine final { public: CLine(); - virtual ~CLine(); + ~CLine(); + CPVT_WordPlace GetBeginWordPlace() const; CPVT_WordPlace GetEndWordPlace() const; CPVT_WordPlace GetPrevWordPlace(const CPVT_WordPlace& place) const; @@ -63,10 +48,12 @@ class CLine { CPVT_WordPlace LinePlace; CPVT_LineInfo m_LineInfo; }; -class CLines { + +class CLines final { public: CLines() : m_nTotal(0) {} - virtual ~CLines() { RemoveAll(); } + ~CLines() { RemoveAll(); } + int32_t GetSize() const { return m_Lines.GetSize(); } CLine* GetAt(int32_t nIndex) const { return m_Lines.GetAt(nIndex); } void Empty() { m_nTotal = 0; } @@ -103,6 +90,7 @@ class CPDF_EditContainer { public: CPDF_EditContainer() : m_rcPlate(0, 0, 0, 0), m_rcContent(0, 0, 0, 0) {} virtual ~CPDF_EditContainer() {} + virtual void SetPlateRect(const CFX_FloatRect& rect) { m_rcPlate = rect; } virtual const CFX_FloatRect& GetPlateRect() const { return m_rcPlate; } virtual void SetContentRect(const CPVT_FloatRect& rect) { @@ -111,8 +99,8 @@ class CPDF_EditContainer { virtual CFX_FloatRect GetContentRect() const { return m_rcContent; } FX_FLOAT GetPlateWidth() const { return m_rcPlate.right - m_rcPlate.left; } FX_FLOAT GetPlateHeight() const { return m_rcPlate.top - m_rcPlate.bottom; } - CPVT_Size GetPlateSize() const { - return CPVT_Size(GetPlateWidth(), GetPlateHeight()); + CFX_SizeF GetPlateSize() const { + return CFX_SizeF(GetPlateWidth(), GetPlateHeight()); } CFX_FloatPoint GetBTPoint() const { return CFX_FloatPoint(m_rcPlate.left, m_rcPlate.top); |