diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-03-02 11:32:19 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-02 20:06:11 +0000 |
commit | c3f74e91b2f019c3035395f5605cb98409502385 (patch) | |
tree | 86a1a772af54c525caa9df0e76e4cedcfff17607 /xfa/fde/tto/fde_textout.h | |
parent | cb5eb3bdb0ed36571d313b38dad59e5bde65f4a7 (diff) | |
download | pdfium-c3f74e91b2f019c3035395f5605cb98409502385.tar.xz |
Use std::deque for CFX_MassArrayTemplate<FDE_TTOPIECE>
Change-Id: Ib6ad46c0d79f51579a99869c5ff87cc9baf75c6e
Reviewed-on: https://pdfium-review.googlesource.com/2897
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/tto/fde_textout.h')
-rw-r--r-- | xfa/fde/tto/fde_textout.h | 20 |
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; |