summaryrefslogtreecommitdiff
path: root/xfa/fgas/layout/fgas_textbreak.h
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-03-13 12:30:42 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-13 17:05:04 +0000
commit8f03b422ed85180ac24fc76ba0fcf7de3556679f (patch)
tree146204fe83b87eb4789f5f957e3a3256b21a8cb7 /xfa/fgas/layout/fgas_textbreak.h
parent8da79203b32d1a0df05a23da83044bdaf71c320d (diff)
downloadpdfium-8f03b422ed85180ac24fc76ba0fcf7de3556679f.tar.xz
Simplify TxtBreak line handling.
This Cl moves the two lines into an array and uses m_iReady to index the array. Change-Id: Ibecfb35fb72603433a6ed1efa6ec8ae609caebf7 Reviewed-on: https://pdfium-review.googlesource.com/2951 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fgas/layout/fgas_textbreak.h')
-rw-r--r--xfa/fgas/layout/fgas_textbreak.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index 513912d409..6d2582f4e1 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -193,8 +193,7 @@ class CFX_TxtBreak {
void FontChanged();
void SetBreakStatus();
CFX_TxtChar* GetLastChar(int32_t index, bool bOmitChar = true) const;
- const CFX_TxtLine* GetTxtLine() const;
- const CFX_TxtPieceArray* GetTxtPieces() const;
+ bool HasTxtLine() const { return m_iReadyLineIndex >= 0; }
FX_CHARTYPE GetUnifiedCharType(FX_CHARTYPE dwType) const;
void ResetArabicContext();
void ResetContextCharStyles();
@@ -215,11 +214,11 @@ class CFX_TxtBreak {
uint32_t m_dwLayoutStyles;
bool m_bSingleLine;
bool m_bCombText;
+ bool m_bEquidistant;
int32_t m_iArabicContext;
int32_t m_iCurArabicContext;
CFX_RetainPtr<CFGAS_GEFont> m_pFont;
int32_t m_iFontSize;
- bool m_bEquidistant;
int32_t m_iTabWidth;
FX_WCHAR m_wDefChar;
FX_WCHAR m_wParagBreakChar;
@@ -229,13 +228,12 @@ class CFX_TxtBreak {
int32_t m_iCombWidth;
FX_CHARTYPE m_eCharType;
int32_t m_iCurAlignment;
- CFX_TxtLine m_TxtLine1;
- CFX_TxtLine m_TxtLine2;
+ CFX_TxtLine m_TxtLine[2];
CFX_TxtLine* m_pCurLine;
- int32_t m_iReady;
int32_t m_iTolerance;
int32_t m_iHorScale;
int32_t m_iCharSpace;
+ int8_t m_iReadyLineIndex;
};
#endif // XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_