OLD | NEW |
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> |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 void SetRichText(FX_BOOL bRichText) { m_bRichText = bRichText; } | 108 void SetRichText(FX_BOOL bRichText) { m_bRichText = bRichText; } |
109 void SetLineLeading(FX_FLOAT fLineLeading) { m_fLineLeading = fLineLeading; } | 109 void SetLineLeading(FX_FLOAT fLineLeading) { m_fLineLeading = fLineLeading; } |
110 void Initialize(); | 110 void Initialize(); |
111 FX_BOOL IsValid() const { return m_bInitial; } | 111 FX_BOOL IsValid() const { return m_bInitial; } |
112 FX_BOOL IsRichText() const { return m_bRichText; } | 112 FX_BOOL IsRichText() const { return m_bRichText; } |
113 void RearrangeAll(); | 113 void RearrangeAll(); |
114 void RearrangePart(const CPVT_WordRange& PlaceRange); | 114 void RearrangePart(const CPVT_WordRange& PlaceRange); |
115 void ResetAll(); | 115 void ResetAll(); |
116 void SetText(const FX_WCHAR* text, | 116 void SetText(const FX_WCHAR* text, |
117 int32_t charset = 1, | 117 int32_t charset = 1, |
118 const CPVT_SecProps* pSecProps = NULL, | 118 const CPVT_SecProps* pSecProps = nullptr, |
119 const CPVT_WordProps* pWordProps = NULL); | 119 const CPVT_WordProps* pWordProps = nullptr); |
120 CPVT_WordPlace InsertWord(const CPVT_WordPlace& place, | 120 CPVT_WordPlace InsertWord(const CPVT_WordPlace& place, |
121 uint16_t word, | 121 uint16_t word, |
122 int32_t charset = 1, | 122 int32_t charset = 1, |
123 const CPVT_WordProps* pWordProps = NULL); | 123 const CPVT_WordProps* pWordProps = nullptr); |
124 CPVT_WordPlace InsertSection(const CPVT_WordPlace& place, | 124 CPVT_WordPlace InsertSection(const CPVT_WordPlace& place, |
125 const CPVT_SecProps* pSecProps = NULL, | 125 const CPVT_SecProps* pSecProps = nullptr, |
126 const CPVT_WordProps* pWordProps = NULL); | 126 const CPVT_WordProps* pWordProps = nullptr); |
127 CPVT_WordPlace InsertText(const CPVT_WordPlace& place, | 127 CPVT_WordPlace InsertText(const CPVT_WordPlace& place, |
128 const FX_WCHAR* text, | 128 const FX_WCHAR* text, |
129 int32_t charset = 1, | 129 int32_t charset = 1, |
130 const CPVT_SecProps* pSecProps = NULL, | 130 const CPVT_SecProps* pSecProps = nullptr, |
131 const CPVT_WordProps* pWordProps = NULL); | 131 const CPVT_WordProps* pWordProps = nullptr); |
132 CPVT_WordPlace DeleteWords(const CPVT_WordRange& PlaceRange); | 132 CPVT_WordPlace DeleteWords(const CPVT_WordRange& PlaceRange); |
133 CPVT_WordPlace DeleteWord(const CPVT_WordPlace& place); | 133 CPVT_WordPlace DeleteWord(const CPVT_WordPlace& place); |
134 CPVT_WordPlace BackSpaceWord(const CPVT_WordPlace& place); | 134 CPVT_WordPlace BackSpaceWord(const CPVT_WordPlace& place); |
135 | 135 |
136 int32_t GetTotalWords() const; | 136 int32_t GetTotalWords() const; |
137 FX_FLOAT GetFontSize() const { return m_fFontSize; } | 137 FX_FLOAT GetFontSize() const { return m_fFontSize; } |
138 int32_t GetAlignment() const { return m_nAlignment; } | 138 int32_t GetAlignment() const { return m_nAlignment; } |
139 uint16_t GetPasswordChar() const { return GetSubWord(); } | 139 uint16_t GetPasswordChar() const { return GetSubWord(); } |
140 int32_t GetCharArray() const { return m_nCharArray; } | 140 int32_t GetCharArray() const { return m_nCharArray; } |
141 int32_t GetLimitChar() const { return m_nLimitChar; } | 141 int32_t GetLimitChar() const { return m_nLimitChar; } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 int32_t m_nHorzScale; | 245 int32_t m_nHorzScale; |
246 uint16_t m_wSubWord; | 246 uint16_t m_wSubWord; |
247 FX_FLOAT m_fFontSize; | 247 FX_FLOAT m_fFontSize; |
248 FX_BOOL m_bInitial; | 248 FX_BOOL m_bInitial; |
249 FX_BOOL m_bRichText; | 249 FX_BOOL m_bRichText; |
250 CPDF_VariableText::Provider* m_pVTProvider; | 250 CPDF_VariableText::Provider* m_pVTProvider; |
251 std::unique_ptr<CPDF_VariableText::Iterator> m_pVTIterator; | 251 std::unique_ptr<CPDF_VariableText::Iterator> m_pVTIterator; |
252 }; | 252 }; |
253 | 253 |
254 #endif // CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ | 254 #endif // CORE_FPDFDOC_INCLUDE_CPDF_VARIABLETEXT_H_ |
OLD | NEW |