summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/cxfa_textlayout.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/app/cxfa_textlayout.h')
-rw-r--r--xfa/fxfa/app/cxfa_textlayout.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/xfa/fxfa/app/cxfa_textlayout.h b/xfa/fxfa/app/cxfa_textlayout.h
index 8575071faa..4de53d1eb0 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;
};