From a016857bcee1a09e67bd34e895ef639a3946fa91 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 16 Aug 2017 16:34:38 -0400 Subject: Simplify CFDE_TxtEdtEngine layout code The three CFDE_TxtEdtEngine layout methods are always called in sequence. Update to only have a single Layout() method. Simplify the layout code to use existing helpers. Change-Id: I0f4d9714f231ca3cebf43579d215d97bd2fe525a Reviewed-on: https://pdfium-review.googlesource.com/11231 Commit-Queue: dsinclair Reviewed-by: Ryan Harrison Reviewed-by: Henrique Nakashima --- xfa/fde/cfde_txtedtengine.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'xfa/fde/cfde_txtedtengine.h') diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h index c4db3e91b1..4d3490a9f4 100644 --- a/xfa/fde/cfde_txtedtengine.h +++ b/xfa/fde/cfde_txtedtengine.h @@ -111,8 +111,6 @@ class CFDE_TxtEdtEngine { int32_t GetCaretPos() const; int32_t SetCaretPos(int32_t nIndex, bool bBefore); int32_t MoveCaretPos(FDE_TXTEDTMOVECARET eMoveCaret, bool bShift, bool bCtrl); - void Lock(); - void Unlock(); bool IsLocked() const; int32_t Insert(int32_t nStart, const wchar_t* lpText, int32_t nLength); @@ -136,9 +134,7 @@ class CFDE_TxtEdtEngine { bool Redo(const IFDE_TxtEdtDoRecord* pRecord); bool Undo(const IFDE_TxtEdtDoRecord* pRecord); - int32_t StartLayout(); - int32_t DoLayout(); - void EndLayout(); + void Layout(); int32_t CountParags() const; CFDE_TxtEdtParag* GetParag(int32_t nParagIndex) const; @@ -195,7 +191,7 @@ class CFDE_TxtEdtEngine { void RebuildParagraphs(); void RemoveAllParags(); void RemoveAllPages(); - void UpdateParags(); + void UpdateLineCounts(); void UpdatePages(); void UpdateTxtBreak(); @@ -230,7 +226,6 @@ class CFDE_TxtEdtEngine { int32_t m_nPageLineCount; int32_t m_nLineCount; int32_t m_nAnchorPos; - int32_t m_nLayoutPos; float m_fCaretPosReserve; int32_t m_nCaret; bool m_bBefore; -- cgit v1.2.3