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

Side by Side Diff: core/fpdftext/include/cpdf_textpage.h

Issue 2286723003: Split fpdf_text_int into classes (Closed)
Patch Set: Fix bots Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « core/fpdftext/fpdf_text_int.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_ 7 #ifndef CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_
8 #define CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_ 8 #define CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_
9 9
10 #include <deque> 10 #include <deque>
11 #include <vector> 11 #include <vector>
12 12
13 #include "core/fpdfapi/fpdf_page/cpdf_pageobjectlist.h" 13 #include "core/fpdfapi/fpdf_page/cpdf_pageobjectlist.h"
14 #include "core/fxcrt/include/fx_basic.h" 14 #include "core/fxcrt/include/fx_basic.h"
15 #include "core/fxcrt/include/fx_coordinates.h" 15 #include "core/fxcrt/include/fx_coordinates.h"
16 #include "core/fxcrt/include/fx_string.h" 16 #include "core/fxcrt/include/fx_string.h"
17 17
18 class CPDF_Font; 18 class CPDF_Font;
19 class CPDF_FormObject; 19 class CPDF_FormObject;
20 class CPDF_Page; 20 class CPDF_Page;
21 class CPDF_TextObject; 21 class CPDF_TextObject;
22 22
23 #define FPDFTEXT_MATCHCASE 0x00000001
24 #define FPDFTEXT_MATCHWHOLEWORD 0x00000002
25 #define FPDFTEXT_CONSECUTIVE 0x00000004
26
27 #define FPDFTEXT_CHAR_ERROR -1
28 #define FPDFTEXT_CHAR_NORMAL 0
29 #define FPDFTEXT_CHAR_GENERATED 1
30 #define FPDFTEXT_CHAR_UNUNICODE 2
31 #define FPDFTEXT_CHAR_HYPHEN 3
32 #define FPDFTEXT_CHAR_PIECE 4
33
34 #define TEXT_SPACE_CHAR L' '
35 #define TEXT_LINEFEED_CHAR L'\n'
36 #define TEXT_RETURN_CHAR L'\r'
37 #define TEXT_EMPTY L""
38 #define TEXT_SPACE L" "
39 #define TEXT_RETURN_LINEFEED L"\r\n"
40 #define TEXT_LINEFEED L"\n"
41 #define TEXT_CHARRATIO_GAPDELTA 0.070
42
23 enum class FPDFText_MarkedContent { Pass = 0, Done, Delay }; 43 enum class FPDFText_MarkedContent { Pass = 0, Done, Delay };
24 44
25 enum class FPDFText_Direction { Left = -1, Right = 1 }; 45 enum class FPDFText_Direction { Left = -1, Right = 1 };
26 46
27 struct FPDF_CHAR_INFO { 47 struct FPDF_CHAR_INFO {
28 FX_WCHAR m_Unicode; 48 FX_WCHAR m_Unicode;
29 FX_WCHAR m_Charcode; 49 FX_WCHAR m_Charcode;
30 int32_t m_Flag; 50 int32_t m_Flag;
31 FX_FLOAT m_FontSize; 51 FX_FLOAT m_FontSize;
32 FX_FLOAT m_OriginX; 52 FX_FLOAT m_OriginX;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 bool m_bIsParsed; 172 bool m_bIsParsed;
153 CFX_Matrix m_DisplayMatrix; 173 CFX_Matrix m_DisplayMatrix;
154 CFX_ArrayTemplate<FPDF_SEGMENT> m_Segments; 174 CFX_ArrayTemplate<FPDF_SEGMENT> m_Segments;
155 std::vector<CFX_FloatRect> m_SelRects; 175 std::vector<CFX_FloatRect> m_SelRects;
156 CFX_ArrayTemplate<PDFTEXT_Obj> m_LineObj; 176 CFX_ArrayTemplate<PDFTEXT_Obj> m_LineObj;
157 TextOrientation m_TextlineDir; 177 TextOrientation m_TextlineDir;
158 CFX_FloatRect m_CurlineRect; 178 CFX_FloatRect m_CurlineRect;
159 }; 179 };
160 180
161 #endif // CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_ 181 #endif // CORE_FPDFTEXT_INCLUDE_CPDF_TEXTPAGE_H_
OLDNEW
« no previous file with comments | « core/fpdftext/fpdf_text_int.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698