summaryrefslogtreecommitdiff
path: root/xfa/fde/tto/fde_textout.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde/tto/fde_textout.h')
-rw-r--r--xfa/fde/tto/fde_textout.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h
index 2cd1bcdb70..04d656776e 100644
--- a/xfa/fde/tto/fde_textout.h
+++ b/xfa/fde/tto/fde_textout.h
@@ -7,6 +7,7 @@
#ifndef XFA_FDE_TTO_FDE_TEXTOUT_H_
#define XFA_FDE_TTO_FDE_TEXTOUT_H_
+#include <deque>
#include <memory>
#include <vector>
@@ -48,6 +49,7 @@ struct FX_TXTRUN;
struct FDE_TTOPIECE {
FDE_TTOPIECE();
+ FDE_TTOPIECE(const FDE_TTOPIECE& that);
~FDE_TTOPIECE();
int32_t iStartChar;
@@ -55,9 +57,6 @@ struct FDE_TTOPIECE {
uint32_t dwCharStyles;
CFX_RectF rtPiece;
};
-inline FDE_TTOPIECE::FDE_TTOPIECE() = default;
-inline FDE_TTOPIECE::~FDE_TTOPIECE() = default;
-typedef CFX_MassArrayTemplate<FDE_TTOPIECE> CFDE_TTOPieceArray;
class CFDE_TTOLine {
public:
@@ -65,19 +64,18 @@ class CFDE_TTOLine {
CFDE_TTOLine(const CFDE_TTOLine& ttoLine);
~CFDE_TTOLine();
+ bool GetNewReload() const { return m_bNewReload; }
+ void SetNewReload(bool reload) { m_bNewReload = reload; }
int32_t AddPiece(int32_t index, const FDE_TTOPIECE& ttoPiece);
int32_t GetSize() const;
FDE_TTOPIECE* GetPtrAt(int32_t index);
void RemoveLast(int32_t iCount);
- void RemoveAll(bool bLeaveMemory);
+ void RemoveAll();
+ private:
bool m_bNewReload;
- CFDE_TTOPieceArray m_pieces;
-
- protected:
- int32_t m_iPieceCount;
+ std::deque<FDE_TTOPIECE> m_pieces;
};
-typedef CFX_ObjectMassArrayTemplate<CFDE_TTOLine> CFDE_TTOLineArray;
class CFDE_TextOut {
public:
@@ -151,7 +149,7 @@ class CFDE_TextOut {
int32_t GetCharRects(const FDE_TTOPIECE* pPiece);
FX_TXTRUN ToTextRun(const FDE_TTOPIECE* pPiece);
- void DrawLine(const FDE_TTOPIECE* pPiece, CFDE_Pen*& pPen);
+ void DrawLine(const FDE_TTOPIECE* pPiece, CFDE_Pen* pPen);
std::unique_ptr<CFX_TxtBreak> m_pTxtBreak;
CFX_RetainPtr<CFGAS_GEFont> m_pFont;
@@ -174,7 +172,7 @@ class CFDE_TextOut {
CFX_RectF m_rtClip;
CFX_RectF m_rtLogicClip;
CFX_Matrix m_Matrix;
- CFDE_TTOLineArray m_ttoLines;
+ std::deque<CFDE_TTOLine> m_ttoLines;
int32_t m_iCurLine;
int32_t m_iCurPiece;
int32_t m_iTotalLines;