1 // Copyright 2017 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef XFA_FGAS_LAYOUT_CFGAS_BREAKLINE_H_ 8 #define XFA_FGAS_LAYOUT_CFGAS_BREAKLINE_H_ 9 10 #include <vector> 11 12 #include "xfa/fgas/layout/cfgas_breakpiece.h" 13 #include "xfa/fgas/layout/cfgas_char.h" 14 15 class CFGAS_BreakLine { 16 public: 17 CFGAS_BreakLine(); 18 ~CFGAS_BreakLine(); 19 20 CFGAS_Char* LastChar(); 21 int32_t GetLineEnd() const; 22 23 void Clear(); 24 25 void IncrementArabicCharCount(); 26 void DecrementArabicCharCount(); HasArabicChar()27 bool HasArabicChar() const { return m_iArabicChars > 0; } 28 29 std::vector<CFGAS_Char> m_LineChars; 30 std::vector<CFGAS_BreakPiece> m_LinePieces; 31 int32_t m_iStart = 0; 32 int32_t m_iWidth = 0; 33 34 private: 35 int32_t m_iArabicChars = 0; 36 }; 37 38 #endif // XFA_FGAS_LAYOUT_CFGAS_BREAKLINE_H_ 39