From f04b42a9beedb1287977794211d05d92903559db Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 6 Mar 2017 11:36:09 -0500 Subject: Simplify RTFBreak AppendChar. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This Cl simplifies the AppendChar code by removing the array of callback methods and using a switch instead. Change-Id: I07475d3950395dea2189569d95bfba1be1f9ceb5 Reviewed-on: https://pdfium-review.googlesource.com/2918 Reviewed-by: Nicolás Peña Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fgas/layout/fgas_rtfbreak.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'xfa/fgas/layout/fgas_rtfbreak.h') diff --git a/xfa/fgas/layout/fgas_rtfbreak.h b/xfa/fgas/layout/fgas_rtfbreak.h index 2dfc0248a1..63ad67f6c0 100644 --- a/xfa/fgas/layout/fgas_rtfbreak.h +++ b/xfa/fgas/layout/fgas_rtfbreak.h @@ -172,13 +172,12 @@ class CFX_RTFBreak { CFX_RTFLine* GetCurrentLineForTesting() const { return m_pCurLine; } - CFX_RTFBreakType AppendChar_Combination(CFX_RTFChar* pCurChar); - CFX_RTFBreakType AppendChar_Tab(CFX_RTFChar* pCurChar); + private: + void AppendChar_Combination(CFX_RTFChar* pCurChar); + void AppendChar_Tab(CFX_RTFChar* pCurChar); CFX_RTFBreakType AppendChar_Control(CFX_RTFChar* pCurChar); CFX_RTFBreakType AppendChar_Arabic(CFX_RTFChar* pCurChar); CFX_RTFBreakType AppendChar_Others(CFX_RTFChar* pCurChar); - - private: void FontChanged(); void SetBreakStatus(); CFX_RTFChar* GetLastChar(int32_t index) const; -- cgit v1.2.3