Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2968)

Unified Diff: core/src/fpdftext/text_int.h

Issue 1631863003: Merge to XFA: Remove CFX_SegmentedArray use from master. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdftext/fpdf_text_int.cpp ('k') | core/src/fxcrt/fx_basic_array.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdftext/text_int.h
diff --git a/core/src/fpdftext/text_int.h b/core/src/fpdftext/text_int.h
index f5d1f98a1a9382ced4bf41044450edd7d01039f3..bc4d181863420e437e28684a56ad1b47b301c7c0 100644
--- a/core/src/fpdftext/text_int.h
+++ b/core/src/fpdftext/text_int.h
@@ -7,6 +7,8 @@
#ifndef CORE_SRC_FPDFTEXT_TEXT_INT_H_
#define CORE_SRC_FPDFTEXT_TEXT_INT_H_
+#include <deque>
+
#include "core/include/fpdftext/fpdf_text.h"
#include "core/include/fxcrt/fx_basic.h"
@@ -26,7 +28,7 @@ class CPDF_TextPageFind;
#define FPDFTEXT_MC_DONE 1
#define FPDFTEXT_MC_DELAY 2
-typedef struct _PAGECHAR_INFO {
+struct PAGECHAR_INFO {
int m_CharCode;
FX_WCHAR m_Unicode;
FX_FLOAT m_OriginX;
@@ -36,18 +38,17 @@ typedef struct _PAGECHAR_INFO {
CPDF_TextObject* m_pTextObj;
CFX_Matrix m_Matrix;
int m_Index;
-} PAGECHAR_INFO;
-typedef CFX_SegmentedArray<PAGECHAR_INFO> PAGECHAR_InfoArray;
-typedef struct {
+};
+
+struct FPDF_SEGMENT {
int m_Start;
int m_nCount;
-} FPDF_SEGMENT;
-typedef CFX_ArrayTemplate<FPDF_SEGMENT> SEGMENT_Array;
-typedef struct {
+};
+
+struct PDFTEXT_Obj {
CPDF_TextObject* m_pTextObj;
CFX_Matrix m_formMatrix;
-} PDFTEXT_Obj;
-typedef CFX_ArrayTemplate<PDFTEXT_Obj> LINEOBJ;
+};
class CPDF_TextPage : public IPDF_TextPage {
public:
@@ -91,7 +92,6 @@ class CPDF_TextPage : public IPDF_TextPage {
void GetBoundedSegment(int index, int& start, int& count) const override;
int GetWordBreak(int index, int direction) const override;
- const PAGECHAR_InfoArray* GetCharList() const { return &m_charList; }
static FX_BOOL IsRectIntersect(const CFX_FloatRect& rect1,
const CFX_FloatRect& rect2);
static FX_BOOL IsLetter(FX_WCHAR unicode);
@@ -132,18 +132,18 @@ class CPDF_TextPage : public IPDF_TextPage {
CFX_WordArray m_CharIndex;
const CPDF_PageObjectList* const m_pPage;
- PAGECHAR_InfoArray m_charList;
+ std::deque<PAGECHAR_INFO> m_CharList;
+ std::deque<PAGECHAR_INFO> m_TempCharList;
CFX_WideTextBuf m_TextBuf;
- PAGECHAR_InfoArray m_TempCharList;
CFX_WideTextBuf m_TempTextBuf;
const int m_parserflag;
CPDF_TextObject* m_pPreTextObj;
CFX_Matrix m_perMatrix;
bool m_bIsParsed;
CFX_Matrix m_DisplayMatrix;
- SEGMENT_Array m_Segment;
+ CFX_ArrayTemplate<FPDF_SEGMENT> m_Segments;
CFX_RectArray m_SelRects;
- LINEOBJ m_LineObj;
+ CFX_ArrayTemplate<PDFTEXT_Obj> m_LineObj;
int32_t m_TextlineDir;
CFX_FloatRect m_CurlineRect;
};
« no previous file with comments | « core/src/fpdftext/fpdf_text_int.cpp ('k') | core/src/fxcrt/fx_basic_array.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698