diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-03-16 11:48:04 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-16 18:23:45 +0000 |
commit | db0cc520a3ea43e9a81f5e936616e27b0927ef2b (patch) | |
tree | 016cae3386e114a2446a6c1ce9cc03013f30b090 /xfa/fgas/layout/fgas_textbreak.h | |
parent | e533b93601c7e9eb328619681a78c188d1a89191 (diff) | |
download | pdfium-db0cc520a3ea43e9a81f5e936616e27b0927ef2b.tar.xz |
Simplify TxtBreak AppendChar
Remove the array of AppendChar methods and use a switch instead to
clarify the code.
Change-Id: I68809caf70919bf6d8dab16bfd3fa2e9ff2b7f90
Reviewed-on: https://pdfium-review.googlesource.com/3062
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fgas/layout/fgas_textbreak.h')
-rw-r--r-- | xfa/fgas/layout/fgas_textbreak.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h index 054fe39344..0fe4268a0f 100644 --- a/xfa/fgas/layout/fgas_textbreak.h +++ b/xfa/fgas/layout/fgas_textbreak.h @@ -74,15 +74,16 @@ class CFX_TxtBreak : public CFX_Break { CFX_WideString* pWSForms = nullptr) const; std::vector<CFX_RectF> GetCharRects(const FX_TXTRUN* pTxtRun, bool bCharBBox = false) const; - void AppendChar_PageLoad(CFX_Char* pCurChar, uint32_t dwProps); CFX_BreakType AppendChar(wchar_t wch); - CFX_BreakType AppendChar_Combination(CFX_Char* pCurChar); - CFX_BreakType AppendChar_Tab(CFX_Char* pCurChar); + + private: + void AppendChar_Combination(CFX_Char* pCurChar); + void AppendChar_Tab(CFX_Char* pCurChar); + void AppendChar_PageLoad(CFX_Char* pCurChar, uint32_t dwProps); CFX_BreakType AppendChar_Control(CFX_Char* pCurChar); CFX_BreakType AppendChar_Arabic(CFX_Char* pCurChar); CFX_BreakType AppendChar_Others(CFX_Char* pCurChar); - private: void SetBreakStatus() override; CFX_Char* GetLastChar(int32_t index, bool bOmitChar = true) const; bool HasTxtLine() const { return m_iReadyLineIndex >= 0; } |