| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfVariableTextFieldDictionary | 1 #ifndef __DEFINED__SkPdfVariableTextFieldDictionary |
| 2 #define __DEFINED__SkPdfVariableTextFieldDictionary | 2 #define __DEFINED__SkPdfVariableTextFieldDictionary |
| 3 | 3 |
| 4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
| 5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
| 6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
| 7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
| 8 | 8 |
| 9 // Additional entries common to all fields containing variable text | 9 // Additional entries common to all fields containing variable text |
| 10 class SkPdfVariableTextFieldDictionary : public SkPdfDictionary { | 10 class SkPdfVariableTextFieldDictionary : public SkPdfDictionary { |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 /** (Required; inheritable) A resource dictionary (see Section 3.7.2, "Resource
Diction- | 528 /** (Required; inheritable) A resource dictionary (see Section 3.7.2, "Resource
Diction- |
| 529 * aries") containing default resources (such as fonts, patterns, or color spac
es) to be used | 529 * aries") containing default resources (such as fonts, patterns, or color spac
es) to be used |
| 530 * by the appearance stream. At a minimum, this dictionary must contain a Font
entry | 530 * by the appearance stream. At a minimum, this dictionary must contain a Font
entry |
| 531 * specifying the resource name and font dictionary of the default font for dis
playing the | 531 * specifying the resource name and font dictionary of the default font for dis
playing the |
| 532 * field's text. (See implementation note 84 in Appendix H.) | 532 * field's text. (See implementation note 84 in Appendix H.) |
| 533 **/ | 533 **/ |
| 534 bool has_DR() const { | 534 bool has_DR() const { |
| 535 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR",
"", NULL)); | 535 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR",
"", NULL)); |
| 536 } | 536 } |
| 537 | 537 |
| 538 SkPdfDictionary* DR() const { | 538 SkPdfDictionary* DR() const; |
| 539 SkPdfDictionary* ret; | |
| 540 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR",
"", &ret)) return ret; | |
| 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 542 return NULL; | |
| 543 } | |
| 544 | |
| 545 /** (Required; inheritable) The default appearance string, containing a sequence
of valid | 539 /** (Required; inheritable) The default appearance string, containing a sequence
of valid |
| 546 * page-content graphics or text state operators defining such properties as th
e field's text | 540 * page-content graphics or text state operators defining such properties as th
e field's text |
| 547 * size and color. | 541 * size and color. |
| 548 **/ | 542 **/ |
| 549 bool has_DA() const { | 543 bool has_DA() const { |
| 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA",
"", NULL)); | 544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA",
"", NULL)); |
| 551 } | 545 } |
| 552 | 546 |
| 553 std::string DA() const { | 547 std::string DA() const; |
| 554 std::string ret; | |
| 555 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "",
&ret)) return ret; | |
| 556 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 557 return ""; | |
| 558 } | |
| 559 | |
| 560 /** (Optional; inheritable) A code specifying the form of quadding (justificatio
n) to be | 548 /** (Optional; inheritable) A code specifying the form of quadding (justificatio
n) to be |
| 561 * used in displaying the text: | 549 * used in displaying the text: |
| 562 * 0 Left-justified | 550 * 0 Left-justified |
| 563 * 1 Centered | 551 * 1 Centered |
| 564 * 2 Right-justified | 552 * 2 Right-justified |
| 565 * Default value: 0 (left-justified). | 553 * Default value: 0 (left-justified). |
| 566 **/ | 554 **/ |
| 567 bool has_Q() const { | 555 bool has_Q() const { |
| 568 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "
", NULL)); | 556 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "
", NULL)); |
| 569 } | 557 } |
| 570 | 558 |
| 571 long Q() const { | 559 long Q() const; |
| 572 long ret; | |
| 573 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", &re
t)) return ret; | |
| 574 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 575 return 0; | |
| 576 } | |
| 577 | |
| 578 }; | 560 }; |
| 579 | 561 |
| 580 #endif // __DEFINED__SkPdfVariableTextFieldDictionary | 562 #endif // __DEFINED__SkPdfVariableTextFieldDictionary |
| OLD | NEW |