Index: xfa/fxfa/app/cxfa_textlayout.h |
diff --git a/xfa/fxfa/app/cxfa_textlayout.h b/xfa/fxfa/app/cxfa_textlayout.h |
index 8575071faaa92e6de4b744dc5d13a58565d5e666..4de53d1eb0c7984edb1007b36825f49a21d8ddc6 100644 |
--- a/xfa/fxfa/app/cxfa_textlayout.h |
+++ b/xfa/fxfa/app/cxfa_textlayout.h |
@@ -8,6 +8,7 @@ |
#define XFA_FXFA_APP_CXFA_TEXTLAYOUT_H_ |
#include <memory> |
+#include <vector> |
#include "core/fxcrt/fx_basic.h" |
#include "core/fxcrt/fx_coordinates.h" |
@@ -52,9 +53,11 @@ class CXFA_TextLayout { |
const CFX_Matrix& tmDoc2Device, |
const CFX_RectF& rtClip, |
int32_t iBlock = 0); |
- bool IsLoaded() const { return m_pieceLines.GetSize() > 0; } |
+ bool IsLoaded() const { return !m_pieceLines.empty(); } |
void Unload(); |
- const CFX_ArrayTemplate<CXFA_PieceLine*>* GetPieceLines(); |
+ const std::vector<std::unique_ptr<CXFA_PieceLine>>* GetPieceLines() const { |
+ return &m_pieceLines; |
+ } |
bool m_bHasBlock; |
CFX_Int32Array m_Blocks; |
@@ -112,7 +115,7 @@ class CXFA_TextLayout { |
int32_t GetDisplayPos(const XFA_TextPiece* pPiece, |
FXTEXT_CHARPOS* pCharPos, |
bool bCharCode = false); |
- bool ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ& tr); |
+ bool ToRun(const XFA_TextPiece* pPiece, FX_RTFTEXTOBJ* tr); |
void DoTabstops(CFDE_CSSComputedStyle* pStyle, CXFA_PieceLine* pPieceLine); |
bool Layout(int32_t iBlock); |
int32_t CountBlocks() const; |
@@ -125,7 +128,7 @@ class CXFA_TextLayout { |
int32_t m_iLines; |
FX_FLOAT m_fMaxWidth; |
CXFA_TextParser m_textParser; |
- CFX_ArrayTemplate<CXFA_PieceLine*> m_pieceLines; |
+ std::vector<std::unique_ptr<CXFA_PieceLine>> m_pieceLines; |
std::unique_ptr<CXFA_TextTabstopsContext> m_pTabstopContext; |
bool m_bBlockContinue; |
}; |