| OLD | NEW |
| 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 CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ | 7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ |
| 8 #define CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ | 8 #define CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ |
| 9 | 9 |
| 10 #include "../fpdfapi/fpdf_parser.h" | 10 #include "../fpdfapi/fpdf_parser.h" |
| 11 #include "../fxcrt/fx_basic.h" | 11 #include "../fxcrt/fx_basic.h" |
| 12 #include "../fxge/fx_dib.h" | 12 #include "../fxge/fx_dib.h" |
| 13 | 13 |
| 14 class IPDF_VariableText; | 14 class IPDF_VariableText; |
| 15 class IPDF_VariableText_Iterator; | 15 class IPDF_VariableText_Iterator; |
| 16 class IPDF_VariableText_Provider; | 16 class IPDF_VariableText_Provider; |
| 17 struct CPVT_Line; | 17 struct CPVT_Line; |
| 18 struct CPVT_Section; | 18 struct CPVT_Section; |
| 19 struct CPVT_Word; | 19 struct CPVT_Word; |
| 20 struct CPVT_WordPlace; | 20 struct CPVT_WordPlace; |
| 21 struct CPVT_WordRange; | 21 struct CPVT_WordRange; |
| 22 | 22 |
| 23 struct CPVT_WordPlace { | 23 struct CPVT_WordPlace { |
| 24 | 24 |
| 25 CPVT_WordPlace() : nSecIndex(-1), nLineIndex(-1), nWordIndex(-1) | 25 CPVT_WordPlace() : nSecIndex(-1), nLineIndex(-1), nWordIndex(-1) |
| 26 { | 26 { |
| 27 } | 27 } |
| 28 | 28 |
| 29 CPVT_WordPlace(FX_INT32 nSecIndex, FX_INT32 nLineIndex, FX_INT32 nWordIndex) | 29 CPVT_WordPlace(int32_t nSecIndex, int32_t nLineIndex, int32_t nWordIndex) |
| 30 { | 30 { |
| 31 this->nSecIndex = nSecIndex; | 31 this->nSecIndex = nSecIndex; |
| 32 this->nLineIndex = nLineIndex; | 32 this->nLineIndex = nLineIndex; |
| 33 this->nWordIndex = nWordIndex; | 33 this->nWordIndex = nWordIndex; |
| 34 } | 34 } |
| 35 | 35 |
| 36 void Default() | 36 void Default() |
| 37 { | 37 { |
| 38 nSecIndex = nLineIndex = nWordIndex = -1; | 38 nSecIndex = nLineIndex = nWordIndex = -1; |
| 39 } | 39 } |
| 40 | 40 |
| 41 FX_BOOL operator == (const CPVT_WordPlace & wp) const | 41 FX_BOOL operator == (const CPVT_WordPlace & wp) const |
| 42 { | 42 { |
| 43 return wp.nSecIndex == this->nSecIndex && wp.nLineIndex == this->nLineIn
dex && wp.nWordIndex == this->nWordIndex; | 43 return wp.nSecIndex == this->nSecIndex && wp.nLineIndex == this->nLineIn
dex && wp.nWordIndex == this->nWordIndex; |
| 44 } | 44 } |
| 45 | 45 |
| 46 FX_BOOL operator != (const CPVT_WordPlace & wp) const | 46 FX_BOOL operator != (const CPVT_WordPlace & wp) const |
| 47 { | 47 { |
| 48 return wp.nSecIndex != this->nSecIndex || wp.nLineIndex != this->nLineIn
dex || wp.nWordIndex != this->nWordIndex; | 48 return wp.nSecIndex != this->nSecIndex || wp.nLineIndex != this->nLineIn
dex || wp.nWordIndex != this->nWordIndex; |
| 49 } | 49 } |
| 50 | 50 |
| 51 inline FX_INT32 WordCmp(const CPVT_WordPlace & wp) const | 51 inline int32_t WordCmp(const CPVT_WordPlace & wp) const |
| 52 { | 52 { |
| 53 if (this->nSecIndex > wp.nSecIndex) { | 53 if (this->nSecIndex > wp.nSecIndex) { |
| 54 return 1; | 54 return 1; |
| 55 } | 55 } |
| 56 if (this->nSecIndex < wp.nSecIndex) { | 56 if (this->nSecIndex < wp.nSecIndex) { |
| 57 return -1; | 57 return -1; |
| 58 } | 58 } |
| 59 if (this->nLineIndex > wp.nLineIndex) { | 59 if (this->nLineIndex > wp.nLineIndex) { |
| 60 return 1; | 60 return 1; |
| 61 } | 61 } |
| 62 if (this->nLineIndex < wp.nLineIndex) { | 62 if (this->nLineIndex < wp.nLineIndex) { |
| 63 return -1; | 63 return -1; |
| 64 } | 64 } |
| 65 if (this->nWordIndex > wp.nWordIndex) { | 65 if (this->nWordIndex > wp.nWordIndex) { |
| 66 return 1; | 66 return 1; |
| 67 } | 67 } |
| 68 if (this->nWordIndex < wp.nWordIndex) { | 68 if (this->nWordIndex < wp.nWordIndex) { |
| 69 return -1; | 69 return -1; |
| 70 } | 70 } |
| 71 return 0; | 71 return 0; |
| 72 } | 72 } |
| 73 | 73 |
| 74 inline FX_INT32 LineCmp(const CPVT_WordPlace & wp) const | 74 inline int32_t LineCmp(const CPVT_WordPlace & wp) const |
| 75 { | 75 { |
| 76 if (this->nSecIndex > wp.nSecIndex) { | 76 if (this->nSecIndex > wp.nSecIndex) { |
| 77 return 1; | 77 return 1; |
| 78 } | 78 } |
| 79 if (this->nSecIndex < wp.nSecIndex) { | 79 if (this->nSecIndex < wp.nSecIndex) { |
| 80 return -1; | 80 return -1; |
| 81 } | 81 } |
| 82 if (this->nLineIndex > wp.nLineIndex) { | 82 if (this->nLineIndex > wp.nLineIndex) { |
| 83 return 1; | 83 return 1; |
| 84 } | 84 } |
| 85 if (this->nLineIndex < wp.nLineIndex) { | 85 if (this->nLineIndex < wp.nLineIndex) { |
| 86 return -1; | 86 return -1; |
| 87 } | 87 } |
| 88 return 0; | 88 return 0; |
| 89 } | 89 } |
| 90 | 90 |
| 91 inline FX_INT32 SecCmp(const CPVT_WordPlace & wp) const | 91 inline int32_t SecCmp(const CPVT_WordPlace & wp) const |
| 92 { | 92 { |
| 93 if (this->nSecIndex > wp.nSecIndex) { | 93 if (this->nSecIndex > wp.nSecIndex) { |
| 94 return 1; | 94 return 1; |
| 95 } | 95 } |
| 96 if (this->nSecIndex < wp.nSecIndex) { | 96 if (this->nSecIndex < wp.nSecIndex) { |
| 97 return -1; | 97 return -1; |
| 98 } | 98 } |
| 99 return 0; | 99 return 0; |
| 100 } | 100 } |
| 101 | 101 |
| 102 FX_INT32» » » » » » » nSecIndex; | 102 int32_t» » » » » » » nSecIndex; |
| 103 | 103 |
| 104 FX_INT32» » » » » » » nLineIndex; | 104 int32_t» » » » » » » nLineIndex; |
| 105 | 105 |
| 106 FX_INT32» » » » » » » nWordIndex; | 106 int32_t» » » » » » » nWordIndex; |
| 107 }; | 107 }; |
| 108 struct CPVT_WordRange { | 108 struct CPVT_WordRange { |
| 109 | 109 |
| 110 CPVT_WordRange() | 110 CPVT_WordRange() |
| 111 { | 111 { |
| 112 } | 112 } |
| 113 | 113 |
| 114 CPVT_WordRange(const CPVT_WordPlace & begin, const CPVT_WordPlace & end) | 114 CPVT_WordRange(const CPVT_WordPlace & begin, const CPVT_WordPlace & end) |
| 115 { | 115 { |
| 116 Set(begin, end); | 116 Set(begin, end); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 CPVT_WordPlace BeginPos; | 163 CPVT_WordPlace BeginPos; |
| 164 | 164 |
| 165 CPVT_WordPlace EndPos; | 165 CPVT_WordPlace EndPos; |
| 166 }; | 166 }; |
| 167 struct CPVT_SecProps { | 167 struct CPVT_SecProps { |
| 168 | 168 |
| 169 CPVT_SecProps() : fLineLeading(0.0f), fLineIndent(0.0f), nAlignment(0) | 169 CPVT_SecProps() : fLineLeading(0.0f), fLineIndent(0.0f), nAlignment(0) |
| 170 { | 170 { |
| 171 } | 171 } |
| 172 | 172 |
| 173 CPVT_SecProps(FX_FLOAT lineLeading, FX_FLOAT lineIndent, FX_INT32 alignment)
: | 173 CPVT_SecProps(FX_FLOAT lineLeading, FX_FLOAT lineIndent, int32_t alignment)
: |
| 174 fLineLeading(lineLeading), fLineIndent(lineIndent), nAlignment(alignment
) | 174 fLineLeading(lineLeading), fLineIndent(lineIndent), nAlignment(alignment
) |
| 175 { | 175 { |
| 176 } | 176 } |
| 177 | 177 |
| 178 CPVT_SecProps(const CPVT_SecProps & other) : | 178 CPVT_SecProps(const CPVT_SecProps & other) : |
| 179 fLineLeading(other.fLineLeading), fLineIndent(other.fLineIndent), nAlign
ment(other.nAlignment) | 179 fLineLeading(other.fLineLeading), fLineIndent(other.fLineIndent), nAlign
ment(other.nAlignment) |
| 180 { | 180 { |
| 181 } | 181 } |
| 182 | 182 |
| 183 FX_FLOAT fLineLeading; | 183 FX_FLOAT fLineLeading; |
| 184 | 184 |
| 185 FX_FLOAT fLineIndent; | 185 FX_FLOAT fLineIndent; |
| 186 | 186 |
| 187 FX_INT32» » » nAlignment; | 187 int32_t» » » nAlignment; |
| 188 }; | 188 }; |
| 189 struct CPVT_WordProps { | 189 struct CPVT_WordProps { |
| 190 | 190 |
| 191 CPVT_WordProps() : nFontIndex(-1), fFontSize(0.0f), dwWordColor(0), nScriptT
ype(0), nWordStyle(0), | 191 CPVT_WordProps() : nFontIndex(-1), fFontSize(0.0f), dwWordColor(0), nScriptT
ype(0), nWordStyle(0), |
| 192 fCharSpace(0.0f), nHorzScale(0) | 192 fCharSpace(0.0f), nHorzScale(0) |
| 193 { | 193 { |
| 194 } | 194 } |
| 195 | 195 |
| 196 CPVT_WordProps(FX_INT32» fontIndex, FX_FLOAT fontSize, FX_COLORREF wordCo
lor = 0, FX_INT32 scriptType = 0, FX_INT32 wordStyle = 0, | 196 CPVT_WordProps(int32_t» fontIndex, FX_FLOAT fontSize, FX_COLORREF wordCo
lor = 0, int32_t scriptType = 0, int32_t wordStyle = 0, |
| 197 FX_FLOAT charSpace = 0, FX_INT32 horzScale = 100) : | 197 FX_FLOAT charSpace = 0, int32_t horzScale = 100) : |
| 198 nFontIndex(fontIndex), fFontSize(fontSize), dwWordColor(wordColor), nScr
iptType(scriptType), | 198 nFontIndex(fontIndex), fFontSize(fontSize), dwWordColor(wordColor), nScr
iptType(scriptType), |
| 199 nWordStyle(wordStyle), fCharSpace(charSpace), nHorzScale(horzScale) | 199 nWordStyle(wordStyle), fCharSpace(charSpace), nHorzScale(horzScale) |
| 200 { | 200 { |
| 201 } | 201 } |
| 202 | 202 |
| 203 CPVT_WordProps(const CPVT_WordProps & other) : | 203 CPVT_WordProps(const CPVT_WordProps & other) : |
| 204 nFontIndex(other.nFontIndex), fFontSize(other.fFontSize), dwWordColor(ot
her.dwWordColor), | 204 nFontIndex(other.nFontIndex), fFontSize(other.fFontSize), dwWordColor(ot
her.dwWordColor), |
| 205 nScriptType(other.nScriptType), nWordStyle(other.nWordStyle), fCharSpace
(other.fCharSpace), | 205 nScriptType(other.nScriptType), nWordStyle(other.nWordStyle), fCharSpace
(other.fCharSpace), |
| 206 nHorzScale(other.nHorzScale) | 206 nHorzScale(other.nHorzScale) |
| 207 { | 207 { |
| 208 } | 208 } |
| 209 | 209 |
| 210 FX_INT32» » » » » nFontIndex; | 210 int32_t» » » » » nFontIndex; |
| 211 | 211 |
| 212 FX_FLOAT fFontSize; | 212 FX_FLOAT fFontSize; |
| 213 | 213 |
| 214 FX_COLORREF dwWordColor; | 214 FX_COLORREF dwWordColor; |
| 215 | 215 |
| 216 FX_INT32» » » » » nScriptType; | 216 int32_t» » » » » nScriptType; |
| 217 | 217 |
| 218 FX_INT32» » » » » nWordStyle; | 218 int32_t» » » » » nWordStyle; |
| 219 | 219 |
| 220 FX_FLOAT fCharSpace; | 220 FX_FLOAT fCharSpace; |
| 221 | 221 |
| 222 FX_INT32» » » » » nHorzScale; | 222 int32_t» » » » » nHorzScale; |
| 223 }; | 223 }; |
| 224 struct CPVT_Word { | 224 struct CPVT_Word { |
| 225 | 225 |
| 226 CPVT_Word() : Word(0), nCharset(0), ptWord(0, 0), fAscent(0.0f), fDescent(0.
0f), fWidth(0.0f), | 226 CPVT_Word() : Word(0), nCharset(0), ptWord(0, 0), fAscent(0.0f), fDescent(0.
0f), fWidth(0.0f), |
| 227 fFontSize(0), WordProps() | 227 fFontSize(0), WordProps() |
| 228 { | 228 { |
| 229 } | 229 } |
| 230 | 230 |
| 231 FX_WORD Word; | 231 FX_WORD Word; |
| 232 | 232 |
| 233 FX_INT32» » » » » nCharset; | 233 int32_t» » » » » nCharset; |
| 234 | 234 |
| 235 CPVT_WordPlace WordPlace; | 235 CPVT_WordPlace WordPlace; |
| 236 | 236 |
| 237 CPDF_Point ptWord; | 237 CPDF_Point ptWord; |
| 238 | 238 |
| 239 FX_FLOAT fAscent; | 239 FX_FLOAT fAscent; |
| 240 | 240 |
| 241 FX_FLOAT fDescent; | 241 FX_FLOAT fDescent; |
| 242 | 242 |
| 243 FX_FLOAT fWidth; | 243 FX_FLOAT fWidth; |
| 244 | 244 |
| 245 FX_INT32» » » » » nFontIndex; | 245 int32_t» » » » » nFontIndex; |
| 246 | 246 |
| 247 FX_FLOAT fFontSize; | 247 FX_FLOAT fFontSize; |
| 248 | 248 |
| 249 CPVT_WordProps WordProps; | 249 CPVT_WordProps WordProps; |
| 250 }; | 250 }; |
| 251 struct CPVT_Line { | 251 struct CPVT_Line { |
| 252 | 252 |
| 253 CPVT_Line() : ptLine(0, 0), fLineWidth(0.0f), fLineAscent(0.0f), fLineDescen
t(0.0f) | 253 CPVT_Line() : ptLine(0, 0), fLineWidth(0.0f), fLineAscent(0.0f), fLineDescen
t(0.0f) |
| 254 { | 254 { |
| 255 } | 255 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 274 | 274 |
| 275 CPVT_SecProps SecProps; | 275 CPVT_SecProps SecProps; |
| 276 | 276 |
| 277 CPVT_WordProps WordProps; | 277 CPVT_WordProps WordProps; |
| 278 }; | 278 }; |
| 279 class IPDF_VariableText_Provider | 279 class IPDF_VariableText_Provider |
| 280 { | 280 { |
| 281 public: | 281 public: |
| 282 virtual ~IPDF_VariableText_Provider() { } | 282 virtual ~IPDF_VariableText_Provider() { } |
| 283 | 283 |
| 284 virtual FX_INT32» » » » » » GetCharWidth(FX_
INT32 nFontIndex, FX_WORD word, FX_INT32 nWordStyle) = 0; | 284 virtual int32_t» » » » » » GetCharWidth(int
32_t nFontIndex, FX_WORD word, int32_t nWordStyle) = 0; |
| 285 | 285 |
| 286 virtual FX_INT32» » » » » » GetTypeAscent(FX
_INT32 nFontIndex) = 0; | 286 virtual int32_t» » » » » » GetTypeAscent(in
t32_t nFontIndex) = 0; |
| 287 | 287 |
| 288 virtual FX_INT32» » » » » » GetTypeDescent(F
X_INT32 nFontIndex) = 0; | 288 virtual int32_t» » » » » » GetTypeDescent(i
nt32_t nFontIndex) = 0; |
| 289 | 289 |
| 290 virtual FX_INT32» » » » » » GetWordFontIndex
(FX_WORD word, FX_INT32 charset, FX_INT32 nFontIndex) = 0; | 290 virtual int32_t» » » » » » GetWordFontIndex
(FX_WORD word, int32_t charset, int32_t nFontIndex) = 0; |
| 291 | 291 |
| 292 virtual FX_BOOL IsLatinW
ord(FX_WORD word) = 0; | 292 virtual FX_BOOL IsLatinW
ord(FX_WORD word) = 0; |
| 293 | 293 |
| 294 virtual FX_INT32» » » » » » GetDefaultFontIn
dex() = 0; | 294 virtual int32_t» » » » » » GetDefaultFontIn
dex() = 0; |
| 295 }; | 295 }; |
| 296 class IPDF_VariableText_Iterator | 296 class IPDF_VariableText_Iterator |
| 297 { | 297 { |
| 298 public: | 298 public: |
| 299 virtual ~IPDF_VariableText_Iterator() { } | 299 virtual ~IPDF_VariableText_Iterator() { } |
| 300 | 300 |
| 301 virtual FX_BOOL NextWord
() = 0; | 301 virtual FX_BOOL NextWord
() = 0; |
| 302 | 302 |
| 303 virtual FX_BOOL PrevWord
() = 0; | 303 virtual FX_BOOL PrevWord
() = 0; |
| 304 | 304 |
| 305 virtual FX_BOOL NextLine
() = 0; | 305 virtual FX_BOOL NextLine
() = 0; |
| 306 | 306 |
| 307 virtual FX_BOOL PrevLine
() = 0; | 307 virtual FX_BOOL PrevLine
() = 0; |
| 308 | 308 |
| 309 virtual FX_BOOL NextSect
ion() = 0; | 309 virtual FX_BOOL NextSect
ion() = 0; |
| 310 | 310 |
| 311 virtual FX_BOOL PrevSect
ion() = 0; | 311 virtual FX_BOOL PrevSect
ion() = 0; |
| 312 | 312 |
| 313 virtual FX_BOOL GetWord(
CPVT_Word & word) const = 0; | 313 virtual FX_BOOL GetWord(
CPVT_Word & word) const = 0; |
| 314 | 314 |
| 315 virtual FX_BOOL SetWord(
const CPVT_Word & word) = 0; | 315 virtual FX_BOOL SetWord(
const CPVT_Word & word) = 0; |
| 316 | 316 |
| 317 virtual FX_BOOL GetLine(
CPVT_Line & line) const = 0; | 317 virtual FX_BOOL GetLine(
CPVT_Line & line) const = 0; |
| 318 | 318 |
| 319 virtual FX_BOOL GetSecti
on(CPVT_Section & section) const = 0; | 319 virtual FX_BOOL GetSecti
on(CPVT_Section & section) const = 0; |
| 320 | 320 |
| 321 virtual FX_BOOL SetSecti
on(const CPVT_Section & section) = 0; | 321 virtual FX_BOOL SetSecti
on(const CPVT_Section & section) = 0; |
| 322 | 322 |
| 323 virtual void» » » » » » » SetAt(FX
_INT32 nWordIndex) = 0; | 323 virtual void» » » » » » » SetAt(in
t32_t nWordIndex) = 0; |
| 324 | 324 |
| 325 virtual void SetAt(co
nst CPVT_WordPlace & place) = 0; | 325 virtual void SetAt(co
nst CPVT_WordPlace & place) = 0; |
| 326 | 326 |
| 327 virtual const CPVT_WordPlace & GetAt() const = 0; | 327 virtual const CPVT_WordPlace & GetAt() const = 0; |
| 328 }; | 328 }; |
| 329 class IPDF_VariableText | 329 class IPDF_VariableText |
| 330 { | 330 { |
| 331 public: | 331 public: |
| 332 static IPDF_VariableText* NewVariableText(); | 332 static IPDF_VariableText* NewVariableText(); |
| 333 | 333 |
| 334 static void DelVariableText(
IPDF_VariableText* pVT); | 334 static void DelVariableText(
IPDF_VariableText* pVT); |
| 335 | 335 |
| 336 virtual IPDF_VariableText_Provider* SetProvider(IPDF_VariableText_Pr
ovider * pProvider) = 0; | 336 virtual IPDF_VariableText_Provider* SetProvider(IPDF_VariableText_Pr
ovider * pProvider) = 0; |
| 337 | 337 |
| 338 virtual IPDF_VariableText_Iterator* GetIterator() = 0; | 338 virtual IPDF_VariableText_Iterator* GetIterator() = 0; |
| 339 | 339 |
| 340 virtual void SetPlate
Rect(const CPDF_Rect & rect) = 0; | 340 virtual void SetPlate
Rect(const CPDF_Rect & rect) = 0; |
| 341 | 341 |
| 342 virtual void» » » » » » » SetAlign
ment(FX_INT32 nFormat = 0) = 0; | 342 virtual void» » » » » » » SetAlign
ment(int32_t nFormat = 0) = 0; |
| 343 | 343 |
| 344 virtual void SetPassw
ordChar(FX_WORD wSubWord = '*') = 0; | 344 virtual void SetPassw
ordChar(FX_WORD wSubWord = '*') = 0; |
| 345 | 345 |
| 346 virtual void» » » » » » » SetLimit
Char(FX_INT32 nLimitChar = 0) = 0; | 346 virtual void» » » » » » » SetLimit
Char(int32_t nLimitChar = 0) = 0; |
| 347 | 347 |
| 348 virtual void» » » » » » » SetCharA
rray(FX_INT32 nCharArray = 0) = 0; | 348 virtual void» » » » » » » SetCharA
rray(int32_t nCharArray = 0) = 0; |
| 349 | 349 |
| 350 virtual void SetCharS
pace(FX_FLOAT fCharSpace = 0.0f) = 0; | 350 virtual void SetCharS
pace(FX_FLOAT fCharSpace = 0.0f) = 0; |
| 351 | 351 |
| 352 virtual void» » » » » » » SetHorzS
cale(FX_INT32 nHorzScale = 100) = 0; | 352 virtual void» » » » » » » SetHorzS
cale(int32_t nHorzScale = 100) = 0; |
| 353 | 353 |
| 354 virtual void SetMulti
Line(FX_BOOL bMultiLine = TRUE) = 0; | 354 virtual void SetMulti
Line(FX_BOOL bMultiLine = TRUE) = 0; |
| 355 | 355 |
| 356 virtual void SetAutoR
eturn(FX_BOOL bAuto = TRUE) = 0; | 356 virtual void SetAutoR
eturn(FX_BOOL bAuto = TRUE) = 0; |
| 357 | 357 |
| 358 virtual void SetAutoF
ontSize(FX_BOOL bAuto = TRUE) = 0; | 358 virtual void SetAutoF
ontSize(FX_BOOL bAuto = TRUE) = 0; |
| 359 | 359 |
| 360 virtual void SetFontS
ize(FX_FLOAT fFontSize) = 0; | 360 virtual void SetFontS
ize(FX_FLOAT fFontSize) = 0; |
| 361 | 361 |
| 362 virtual void SetLineL
eading(FX_FLOAT fLineLeading) = 0; | 362 virtual void SetLineL
eading(FX_FLOAT fLineLeading) = 0; |
| 363 | 363 |
| 364 virtual void SetRichT
ext(FX_BOOL bRichText) = 0; | 364 virtual void SetRichT
ext(FX_BOOL bRichText) = 0; |
| 365 | 365 |
| 366 virtual void Initiali
ze() = 0; | 366 virtual void Initiali
ze() = 0; |
| 367 | 367 |
| 368 virtual FX_BOOL IsValid(
) const = 0; | 368 virtual FX_BOOL IsValid(
) const = 0; |
| 369 | 369 |
| 370 virtual FX_BOOL IsRichTe
xt() const = 0; | 370 virtual FX_BOOL IsRichTe
xt() const = 0; |
| 371 | 371 |
| 372 virtual void Rearrang
eAll() = 0; | 372 virtual void Rearrang
eAll() = 0; |
| 373 | 373 |
| 374 virtual void Rearrang
ePart(const CPVT_WordRange & PlaceRange) = 0; | 374 virtual void Rearrang
ePart(const CPVT_WordRange & PlaceRange) = 0; |
| 375 | 375 |
| 376 virtual void ResetAll
() = 0; | 376 virtual void ResetAll
() = 0; |
| 377 | 377 |
| 378 virtual void» » » » » » » SetText(
FX_LPCWSTR text, FX_INT32 charset = 1, const CPVT_SecProps * pSecProps = NULL, | 378 virtual void» » » » » » » SetText(
FX_LPCWSTR text, int32_t charset = 1, const CPVT_SecProps * pSecProps = NULL, |
| 379 const CPVT_WordProps * pWordProps = NULL) = 0; | 379 const CPVT_WordProps * pWordProps = NULL) = 0; |
| 380 | 380 |
| 381 virtual CPVT_WordPlace» » » » » InsertWord(const
CPVT_WordPlace & place, FX_WORD word, FX_INT32 charset = 1, | 381 virtual CPVT_WordPlace» » » » » InsertWord(const
CPVT_WordPlace & place, FX_WORD word, int32_t charset = 1, |
| 382 const CPVT_WordProps * pWordProps = NULL) = 0; | 382 const CPVT_WordProps * pWordProps = NULL) = 0; |
| 383 | 383 |
| 384 virtual CPVT_WordPlace InsertSection(co
nst CPVT_WordPlace & place, const CPVT_SecProps * pSecProps = NULL, | 384 virtual CPVT_WordPlace InsertSection(co
nst CPVT_WordPlace & place, const CPVT_SecProps * pSecProps = NULL, |
| 385 const CPVT_WordProps * pWordProps = NULL) = 0; | 385 const CPVT_WordProps * pWordProps = NULL) = 0; |
| 386 | 386 |
| 387 virtual CPVT_WordPlace» » » » » InsertText(const
CPVT_WordPlace & place, FX_LPCWSTR text, FX_INT32 charset = 1, | 387 virtual CPVT_WordPlace» » » » » InsertText(const
CPVT_WordPlace & place, FX_LPCWSTR text, int32_t charset = 1, |
| 388 const CPVT_SecProps * pSecProps = NULL, const CPVT_WordProps * p
WordProps = NULL) = 0; | 388 const CPVT_SecProps * pSecProps = NULL, const CPVT_WordProps * p
WordProps = NULL) = 0; |
| 389 | 389 |
| 390 virtual CPVT_WordPlace DeleteWords(cons
t CPVT_WordRange & PlaceRange) = 0; | 390 virtual CPVT_WordPlace DeleteWords(cons
t CPVT_WordRange & PlaceRange) = 0; |
| 391 | 391 |
| 392 virtual CPVT_WordPlace DeleteWord(const
CPVT_WordPlace & place) = 0; | 392 virtual CPVT_WordPlace DeleteWord(const
CPVT_WordPlace & place) = 0; |
| 393 | 393 |
| 394 virtual CPVT_WordPlace BackSpaceWord(co
nst CPVT_WordPlace & place) = 0; | 394 virtual CPVT_WordPlace BackSpaceWord(co
nst CPVT_WordPlace & place) = 0; |
| 395 | 395 |
| 396 virtual const CPDF_Rect & GetPlateRect() const = 0
; | 396 virtual const CPDF_Rect & GetPlateRect() const = 0
; |
| 397 | 397 |
| 398 virtual CPDF_Rect GetContentRect()
const = 0; | 398 virtual CPDF_Rect GetContentRect()
const = 0; |
| 399 | 399 |
| 400 virtual FX_INT32» » » » » » GetTotalWords()
const = 0; | 400 virtual int32_t» » » » » » GetTotalWords()
const = 0; |
| 401 | 401 |
| 402 virtual FX_FLOAT GetFontSize() co
nst = 0; | 402 virtual FX_FLOAT GetFontSize() co
nst = 0; |
| 403 | 403 |
| 404 virtual FX_INT32» » » » » » GetAlignment() c
onst = 0; | 404 virtual int32_t» » » » » » GetAlignment() c
onst = 0; |
| 405 | 405 |
| 406 virtual FX_WORD GetPassw
ordChar() const = 0; | 406 virtual FX_WORD GetPassw
ordChar() const = 0; |
| 407 | 407 |
| 408 virtual FX_INT32» » » » » » GetCharArray() c
onst = 0; | 408 virtual int32_t» » » » » » GetCharArray() c
onst = 0; |
| 409 | 409 |
| 410 virtual FX_INT32» » » » » » GetLimitChar() c
onst = 0; | 410 virtual int32_t» » » » » » GetLimitChar() c
onst = 0; |
| 411 | 411 |
| 412 virtual FX_BOOL IsMultiL
ine() const = 0; | 412 virtual FX_BOOL IsMultiL
ine() const = 0; |
| 413 | 413 |
| 414 virtual FX_INT32» » » » » » GetHorzScale() c
onst = 0; | 414 virtual int32_t» » » » » » GetHorzScale() c
onst = 0; |
| 415 | 415 |
| 416 virtual FX_FLOAT GetCharSpace() c
onst = 0; | 416 virtual FX_FLOAT GetCharSpace() c
onst = 0; |
| 417 | 417 |
| 418 virtual CPVT_WordPlace GetBeginWordPlac
e() const = 0; | 418 virtual CPVT_WordPlace GetBeginWordPlac
e() const = 0; |
| 419 | 419 |
| 420 virtual CPVT_WordPlace GetEndWordPlace(
) const = 0; | 420 virtual CPVT_WordPlace GetEndWordPlace(
) const = 0; |
| 421 | 421 |
| 422 virtual CPVT_WordPlace GetPrevWordPlace
(const CPVT_WordPlace & place) const = 0; | 422 virtual CPVT_WordPlace GetPrevWordPlace
(const CPVT_WordPlace & place) const = 0; |
| 423 | 423 |
| 424 virtual CPVT_WordPlace GetNextWordPlace
(const CPVT_WordPlace & place) const = 0; | 424 virtual CPVT_WordPlace GetNextWordPlace
(const CPVT_WordPlace & place) const = 0; |
| 425 | 425 |
| 426 virtual CPVT_WordPlace SearchWordPlace(
const CPDF_Point & point) const = 0; | 426 virtual CPVT_WordPlace SearchWordPlace(
const CPDF_Point & point) const = 0; |
| 427 | 427 |
| 428 virtual CPVT_WordPlace GetUpWordPlace(c
onst CPVT_WordPlace & place, const CPDF_Point & point) const = 0; | 428 virtual CPVT_WordPlace GetUpWordPlace(c
onst CPVT_WordPlace & place, const CPDF_Point & point) const = 0; |
| 429 | 429 |
| 430 virtual CPVT_WordPlace GetDownWordPlace
(const CPVT_WordPlace & place, const CPDF_Point & point) const = 0; | 430 virtual CPVT_WordPlace GetDownWordPlace
(const CPVT_WordPlace & place, const CPDF_Point & point) const = 0; |
| 431 | 431 |
| 432 virtual CPVT_WordPlace GetLineBeginPlac
e(const CPVT_WordPlace & place) const = 0; | 432 virtual CPVT_WordPlace GetLineBeginPlac
e(const CPVT_WordPlace & place) const = 0; |
| 433 | 433 |
| 434 virtual CPVT_WordPlace GetLineEndPlace(
const CPVT_WordPlace & place) const = 0; | 434 virtual CPVT_WordPlace GetLineEndPlace(
const CPVT_WordPlace & place) const = 0; |
| 435 | 435 |
| 436 virtual CPVT_WordPlace GetSectionBeginP
lace(const CPVT_WordPlace & place) const = 0; | 436 virtual CPVT_WordPlace GetSectionBeginP
lace(const CPVT_WordPlace & place) const = 0; |
| 437 | 437 |
| 438 virtual CPVT_WordPlace GetSectionEndPla
ce(const CPVT_WordPlace & place) const = 0; | 438 virtual CPVT_WordPlace GetSectionEndPla
ce(const CPVT_WordPlace & place) const = 0; |
| 439 | 439 |
| 440 virtual void UpdateWo
rdPlace(CPVT_WordPlace & place) const = 0; | 440 virtual void UpdateWo
rdPlace(CPVT_WordPlace & place) const = 0; |
| 441 | 441 |
| 442 virtual CPVT_WordPlace AjustLineHeader(
const CPVT_WordPlace & place, FX_BOOL bPrevOrNext) const = 0; | 442 virtual CPVT_WordPlace AjustLineHeader(
const CPVT_WordPlace & place, FX_BOOL bPrevOrNext) const = 0; |
| 443 | 443 |
| 444 virtual FX_INT32» » » » » » WordPlaceToWordI
ndex(const CPVT_WordPlace & place) const = 0; | 444 virtual int32_t» » » » » » WordPlaceToWordI
ndex(const CPVT_WordPlace & place) const = 0; |
| 445 | 445 |
| 446 virtual CPVT_WordPlace» » » » » WordIndexToWordP
lace(FX_INT32 index) const = 0; | 446 virtual CPVT_WordPlace» » » » » WordIndexToWordP
lace(int32_t index) const = 0; |
| 447 | 447 |
| 448 protected: | 448 protected: |
| 449 ~IPDF_VariableText() { } | 449 ~IPDF_VariableText() { } |
| 450 }; | 450 }; |
| 451 | 451 |
| 452 #endif // CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ | 452 #endif // CORE_INCLUDE_FPDFDOC_FPDF_VT_H_ |
| OLD | NEW |