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

Side by Side Diff: xfa/fde/tto/fde_textout.h

Issue 2072803002: Make code compile with clang_use_chrome_plugin (final) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: tidy Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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 XFA_FDE_TTO_FDE_TEXTOUT_H_ 7 #ifndef XFA_FDE_TTO_FDE_TEXTOUT_H_
8 #define XFA_FDE_TTO_FDE_TEXTOUT_H_ 8 #define XFA_FDE_TTO_FDE_TEXTOUT_H_
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "core/fxge/include/fx_dib.h" 12 #include "core/fxge/include/fx_dib.h"
13 #include "core/fxge/include/fx_ge.h"
13 #include "xfa/fde/fde_object.h" 14 #include "xfa/fde/fde_object.h"
14 #include "xfa/fgas/crt/fgas_utils.h" 15 #include "xfa/fgas/crt/fgas_utils.h"
15 #include "xfa/fgas/font/fgas_font.h" 16 #include "xfa/fgas/font/fgas_font.h"
16 #include "xfa/fgas/layout/fgas_textbreak.h"
17 17
18 #define FDE_TTOSTYLE_Underline 0x0001 18 #define FDE_TTOSTYLE_Underline 0x0001
19 #define FDE_TTOSTYLE_Strikeout 0x0002 19 #define FDE_TTOSTYLE_Strikeout 0x0002
20 #define FDE_TTOSTYLE_VerticalLayout 0x0004 20 #define FDE_TTOSTYLE_VerticalLayout 0x0004
21 #define FDE_TTOSTYLE_SingleLine 0x0010 21 #define FDE_TTOSTYLE_SingleLine 0x0010
22 #define FDE_TTOSTYLE_ExpandTab 0x0020 22 #define FDE_TTOSTYLE_ExpandTab 0x0020
23 #define FDE_TTOSTYLE_HotKey 0x0040 23 #define FDE_TTOSTYLE_HotKey 0x0040
24 #define FDE_TTOSTYLE_Ellipsis 0x0080 24 #define FDE_TTOSTYLE_Ellipsis 0x0080
25 #define FDE_TTOSTYLE_LineWrap 0x0100 25 #define FDE_TTOSTYLE_LineWrap 0x0100
26 #define FDE_TTOSTYLE_ArabicShapes 0x0200 26 #define FDE_TTOSTYLE_ArabicShapes 0x0200
27 #define FDE_TTOSTYLE_RTL 0x0400 27 #define FDE_TTOSTYLE_RTL 0x0400
28 #define FDE_TTOSTYLE_ArabicContext 0x0800 28 #define FDE_TTOSTYLE_ArabicContext 0x0800
29 #define FDE_TTOSTYLE_LastLineHeight 0x1000 29 #define FDE_TTOSTYLE_LastLineHeight 0x1000
30 #define FDE_TTOALIGNMENT_TopLeft 0 30 #define FDE_TTOALIGNMENT_TopLeft 0
31 #define FDE_TTOALIGNMENT_TopCenter 1 31 #define FDE_TTOALIGNMENT_TopCenter 1
32 #define FDE_TTOALIGNMENT_TopRight 2 32 #define FDE_TTOALIGNMENT_TopRight 2
33 #define FDE_TTOALIGNMENT_TopAuto 3 33 #define FDE_TTOALIGNMENT_TopAuto 3
34 #define FDE_TTOALIGNMENT_CenterLeft 4 34 #define FDE_TTOALIGNMENT_CenterLeft 4
35 #define FDE_TTOALIGNMENT_Center 5 35 #define FDE_TTOALIGNMENT_Center 5
36 #define FDE_TTOALIGNMENT_CenterRight 6 36 #define FDE_TTOALIGNMENT_CenterRight 6
37 #define FDE_TTOALIGNMENT_CenterAuto 7 37 #define FDE_TTOALIGNMENT_CenterAuto 7
38 #define FDE_TTOALIGNMENT_BottomLeft 8 38 #define FDE_TTOALIGNMENT_BottomLeft 8
39 #define FDE_TTOALIGNMENT_BottomCenter 9 39 #define FDE_TTOALIGNMENT_BottomCenter 9
40 #define FDE_TTOALIGNMENT_BottomRight 10 40 #define FDE_TTOALIGNMENT_BottomRight 10
41 #define FDE_TTOALIGNMENT_BottomAuto 11 41 #define FDE_TTOALIGNMENT_BottomAuto 11
42 42
43 class CFDE_RenderDevice; 43 class CFDE_RenderDevice;
44 class CFX_TxtBreak; 44 class CFX_TxtBreak;
45 struct FX_TXTRUN;
45 46
46 struct FDE_TTOPIECE { 47 struct FDE_TTOPIECE {
47 int32_t iStartChar; 48 int32_t iStartChar;
48 int32_t iChars; 49 int32_t iChars;
49 uint32_t dwCharStyles; 50 uint32_t dwCharStyles;
50 CFX_RectF rtPiece; 51 CFX_RectF rtPiece;
51 }; 52 };
52 typedef CFX_MassArrayTemplate<FDE_TTOPIECE> CFDE_TTOPieceArray; 53 typedef CFX_MassArrayTemplate<FDE_TTOPIECE> CFDE_TTOPieceArray;
53 54
54 class CFDE_TTOLine : public CFX_Target { 55 class CFDE_TTOLine : public CFX_Target {
55 public: 56 public:
56 CFDE_TTOLine(); 57 CFDE_TTOLine();
57 CFDE_TTOLine(const CFDE_TTOLine& ttoLine); 58 CFDE_TTOLine(const CFDE_TTOLine& ttoLine);
58 ~CFDE_TTOLine(); 59 ~CFDE_TTOLine() override;
60
59 int32_t AddPiece(int32_t index, const FDE_TTOPIECE& ttoPiece); 61 int32_t AddPiece(int32_t index, const FDE_TTOPIECE& ttoPiece);
60 int32_t GetSize() const; 62 int32_t GetSize() const;
61 FDE_TTOPIECE* GetPtrAt(int32_t index); 63 FDE_TTOPIECE* GetPtrAt(int32_t index);
62 void RemoveLast(int32_t iCount); 64 void RemoveLast(int32_t iCount);
63 void RemoveAll(FX_BOOL bLeaveMemory); 65 void RemoveAll(FX_BOOL bLeaveMemory);
64 66
65 FX_BOOL m_bNewReload; 67 FX_BOOL m_bNewReload;
66 CFDE_TTOPieceArray m_pieces; 68 CFDE_TTOPieceArray m_pieces;
67 69
68 protected: 70 protected:
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 int32_t m_iCurPiece; 180 int32_t m_iCurPiece;
179 int32_t m_iTotalLines; 181 int32_t m_iTotalLines;
180 FXTEXT_CHARPOS* m_pCharPos; 182 FXTEXT_CHARPOS* m_pCharPos;
181 int32_t m_iCharPosSize; 183 int32_t m_iCharPosSize;
182 std::unique_ptr<CFDE_RenderDevice> m_pRenderDevice; 184 std::unique_ptr<CFDE_RenderDevice> m_pRenderDevice;
183 CFX_Int32Array m_hotKeys; 185 CFX_Int32Array m_hotKeys;
184 CFX_RectFArray m_rectArray; 186 CFX_RectFArray m_rectArray;
185 }; 187 };
186 188
187 #endif // XFA_FDE_TTO_FDE_TEXTOUT_H_ 189 #endif // XFA_FDE_TTO_FDE_TEXTOUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698