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

Side by Side Diff: core/fpdfdoc/include/cpdf_variabletext.h

Issue 2083943003: Use FXFONT defines in place of integers. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits 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
« no previous file with comments | « core/fpdfdoc/doc_utils.cpp ('k') | core/fxge/apple/fx_mac_imp.cpp » ('j') | 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_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ 7 #ifndef CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_
8 #define CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ 8 #define CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "core/fpdfdoc/cpvt_floatrect.h" 12 #include "core/fpdfdoc/cpvt_floatrect.h"
13 #include "core/fpdfdoc/cpvt_lineinfo.h" 13 #include "core/fpdfdoc/cpvt_lineinfo.h"
14 #include "core/fpdfdoc/include/cpvt_line.h" 14 #include "core/fpdfdoc/include/cpvt_line.h"
15 #include "core/fpdfdoc/include/cpvt_wordplace.h" 15 #include "core/fpdfdoc/include/cpvt_wordplace.h"
16 #include "core/fpdfdoc/include/cpvt_wordrange.h" 16 #include "core/fpdfdoc/include/cpvt_wordrange.h"
17 #include "core/fpdfdoc/pdf_vt.h" 17 #include "core/fpdfdoc/pdf_vt.h"
18 #include "core/fxcrt/include/fx_coordinates.h" 18 #include "core/fxcrt/include/fx_coordinates.h"
19 #include "core/fxcrt/include/fx_string.h" 19 #include "core/fxcrt/include/fx_string.h"
20 #include "core/fxcrt/include/fx_system.h" 20 #include "core/fxcrt/include/fx_system.h"
21 #include "core/fxge/include/fx_font.h"
21 22
22 class CSection; 23 class CSection;
23 class IPVT_FontMap; 24 class IPVT_FontMap;
24 25
25 struct CPVT_SecProps; 26 struct CPVT_SecProps;
26 struct CPVT_Section; 27 struct CPVT_Section;
27 struct CPVT_SectionInfo; 28 struct CPVT_SectionInfo;
28 struct CPVT_Word; 29 struct CPVT_Word;
29 struct CPVT_WordInfo; 30 struct CPVT_WordInfo;
30 struct CPVT_WordProps; 31 struct CPVT_WordProps;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void SetLineLeading(FX_FLOAT fLineLeading) { m_fLineLeading = fLineLeading; } 106 void SetLineLeading(FX_FLOAT fLineLeading) { m_fLineLeading = fLineLeading; }
106 void Initialize(); 107 void Initialize();
107 108
108 FX_BOOL IsValid() const { return m_bInitial; } 109 FX_BOOL IsValid() const { return m_bInitial; }
109 FX_BOOL IsRichText() const { return m_bRichText; } 110 FX_BOOL IsRichText() const { return m_bRichText; }
110 111
111 void RearrangeAll(); 112 void RearrangeAll();
112 void RearrangePart(const CPVT_WordRange& PlaceRange); 113 void RearrangePart(const CPVT_WordRange& PlaceRange);
113 void ResetAll(); 114 void ResetAll();
114 void SetText(const FX_WCHAR* text, 115 void SetText(const FX_WCHAR* text,
115 int32_t charset = 1, 116 int32_t charset = FXFONT_DEFAULT_CHARSET,
116 const CPVT_SecProps* pSecProps = nullptr, 117 const CPVT_SecProps* pSecProps = nullptr,
117 const CPVT_WordProps* pWordProps = nullptr); 118 const CPVT_WordProps* pWordProps = nullptr);
118 CPVT_WordPlace InsertWord(const CPVT_WordPlace& place, 119 CPVT_WordPlace InsertWord(const CPVT_WordPlace& place,
119 uint16_t word, 120 uint16_t word,
120 int32_t charset = 1, 121 int32_t charset = FXFONT_DEFAULT_CHARSET,
121 const CPVT_WordProps* pWordProps = nullptr); 122 const CPVT_WordProps* pWordProps = nullptr);
122 CPVT_WordPlace InsertSection(const CPVT_WordPlace& place, 123 CPVT_WordPlace InsertSection(const CPVT_WordPlace& place,
123 const CPVT_SecProps* pSecProps = nullptr, 124 const CPVT_SecProps* pSecProps = nullptr,
124 const CPVT_WordProps* pWordProps = nullptr); 125 const CPVT_WordProps* pWordProps = nullptr);
125 CPVT_WordPlace InsertText(const CPVT_WordPlace& place, 126 CPVT_WordPlace InsertText(const CPVT_WordPlace& place,
126 const FX_WCHAR* text, 127 const FX_WCHAR* text,
127 int32_t charset = 1, 128 int32_t charset = FXFONT_DEFAULT_CHARSET,
128 const CPVT_SecProps* pSecProps = nullptr, 129 const CPVT_SecProps* pSecProps = nullptr,
129 const CPVT_WordProps* pWordProps = nullptr); 130 const CPVT_WordProps* pWordProps = nullptr);
130 CPVT_WordPlace DeleteWords(const CPVT_WordRange& PlaceRange); 131 CPVT_WordPlace DeleteWords(const CPVT_WordRange& PlaceRange);
131 CPVT_WordPlace DeleteWord(const CPVT_WordPlace& place); 132 CPVT_WordPlace DeleteWord(const CPVT_WordPlace& place);
132 CPVT_WordPlace BackSpaceWord(const CPVT_WordPlace& place); 133 CPVT_WordPlace BackSpaceWord(const CPVT_WordPlace& place);
133 134
134 int32_t GetTotalWords() const; 135 int32_t GetTotalWords() const;
135 FX_FLOAT GetFontSize() const { return m_fFontSize; } 136 FX_FLOAT GetFontSize() const { return m_fFontSize; }
136 int32_t GetAlignment() const { return m_nAlignment; } 137 int32_t GetAlignment() const { return m_nAlignment; }
137 uint16_t GetPasswordChar() const { return GetSubWord(); } 138 uint16_t GetPasswordChar() const { return GetSubWord(); }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 int32_t m_nHorzScale; 244 int32_t m_nHorzScale;
244 uint16_t m_wSubWord; 245 uint16_t m_wSubWord;
245 FX_FLOAT m_fFontSize; 246 FX_FLOAT m_fFontSize;
246 FX_BOOL m_bInitial; 247 FX_BOOL m_bInitial;
247 FX_BOOL m_bRichText; 248 FX_BOOL m_bRichText;
248 CPDF_VariableText::Provider* m_pVTProvider; 249 CPDF_VariableText::Provider* m_pVTProvider;
249 std::unique_ptr<CPDF_VariableText::Iterator> m_pVTIterator; 250 std::unique_ptr<CPDF_VariableText::Iterator> m_pVTIterator;
250 }; 251 };
251 252
252 #endif // CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ 253 #endif // CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_
OLDNEW
« no previous file with comments | « core/fpdfdoc/doc_utils.cpp ('k') | core/fxge/apple/fx_mac_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698