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

Side by Side Diff: experimental/PdfViewer/autogen/SkPdfInteractiveFormDictionary_autogen.h

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 #ifndef __DEFINED__SkPdfInteractiveFormDictionary 1 #ifndef __DEFINED__SkPdfInteractiveFormDictionary
2 #define __DEFINED__SkPdfInteractiveFormDictionary 2 #define __DEFINED__SkPdfInteractiveFormDictionary
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 // Entries in the interactive form dictionary 9 // Entries in the interactive form dictionary
10 class SkPdfInteractiveFormDictionary : public SkPdfDictionary { 10 class SkPdfInteractiveFormDictionary : public SkPdfDictionary {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 SkPdfInteractiveFormDictionary& operator=(const SkPdfInteractiveFormDictionary & from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} 526 SkPdfInteractiveFormDictionary& operator=(const SkPdfInteractiveFormDictionary & from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
527 527
528 /** (Required) An array of references to the document's root fields (those with 528 /** (Required) An array of references to the document's root fields (those with
529 * no ancestors in the field hierarchy). 529 * no ancestors in the field hierarchy).
530 **/ 530 **/
531 bool has_Fields() const { 531 bool has_Fields() const {
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Field s", "", NULL)); 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Field s", "", NULL));
533 } 533 }
534 534
535 SkPdfArray* Fields() const { 535 SkPdfArray* Fields() const;
536 SkPdfArray* ret;
537 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Fields", " ", &ret)) return ret;
538 // TODO(edisonn): warn about missing required field, assert for known good p dfs
539 return NULL;
540 }
541
542 /** (Optional) A flag specifying whether to construct appearance streams and 536 /** (Optional) A flag specifying whether to construct appearance streams and
543 * appearance dictionaries for all widget annotations in the document (see 537 * appearance dictionaries for all widget annotations in the document (see
544 * "Variable Text" on page 533). Default value: false. 538 * "Variable Text" on page 533). Default value: false.
545 **/ 539 **/
546 bool has_NeedAppearances() const { 540 bool has_NeedAppearances() const {
547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NeedA ppearances", "", NULL)); 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NeedA ppearances", "", NULL));
548 } 542 }
549 543
550 bool NeedAppearances() const { 544 bool NeedAppearances() const;
551 bool ret;
552 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NeedAppeara nces", "", &ret)) return ret;
553 // TODO(edisonn): warn about missing required field, assert for known good p dfs
554 return false;
555 }
556
557 /** (Optional; PDF 1.3) A set of flags specifying various document-level char- 545 /** (Optional; PDF 1.3) A set of flags specifying various document-level char-
558 * acteristics related to signature fields (see Table 8.48, below, and "Signatu re 546 * acteristics related to signature fields (see Table 8.48, below, and "Signatu re
559 * Fields" on page 547). Default value: 0. 547 * Fields" on page 547). Default value: 0.
560 **/ 548 **/
561 bool has_SigFlags() const { 549 bool has_SigFlags() const {
562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SigFl ags", "", NULL)); 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SigFl ags", "", NULL));
563 } 551 }
564 552
565 long SigFlags() const { 553 long SigFlags() const;
566 long ret;
567 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SigFlags", "", &ret)) return ret;
568 // TODO(edisonn): warn about missing required field, assert for known good p dfs
569 return 0;
570 }
571
572 /** (Required if any fields in the document have additional-actions dictionaries 554 /** (Required if any fields in the document have additional-actions dictionaries
573 * containing a C entry; PDF 1.3) An array of indirect references to field dic- 555 * containing a C entry; PDF 1.3) An array of indirect references to field dic-
574 * tionaries with calculation actions, defining the calculation order in which 556 * tionaries with calculation actions, defining the calculation order in which
575 * their values will be recalculated when the value of any field changes (see 557 * their values will be recalculated when the value of any field changes (see
576 * Section 8.5.2, "Trigger Events"). 558 * Section 8.5.2, "Trigger Events").
577 **/ 559 **/
578 bool has_CO() const { 560 bool has_CO() const {
579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO", "", NULL)); 561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO", "", NULL));
580 } 562 }
581 563
582 SkPdfArray* CO() const { 564 SkPdfArray* CO() const;
583 SkPdfArray* ret;
584 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CO", "", & ret)) return ret;
585 // TODO(edisonn): warn about missing required field, assert for known good p dfs
586 return NULL;
587 }
588
589 /** (Optional) A document-wide default value for the DR attribute of variable 565 /** (Optional) A document-wide default value for the DR attribute of variable
590 * text fields (see "Variable Text" on page 533). 566 * text fields (see "Variable Text" on page 533).
591 **/ 567 **/
592 bool has_DR() const { 568 bool has_DR() const {
593 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR", "", NULL)); 569 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR", "", NULL));
594 } 570 }
595 571
596 SkPdfDictionary* DR() const { 572 SkPdfDictionary* DR() const;
597 SkPdfDictionary* ret;
598 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DR", "", &ret)) return ret;
599 // TODO(edisonn): warn about missing required field, assert for known good p dfs
600 return NULL;
601 }
602
603 /** (Optional) A document-wide default value for the DA attribute of variable 573 /** (Optional) A document-wide default value for the DA attribute of variable
604 * text fields (see "Variable Text" on page 533). 574 * text fields (see "Variable Text" on page 533).
605 **/ 575 **/
606 bool has_DA() const { 576 bool has_DA() const {
607 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "", NULL)); 577 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "", NULL));
608 } 578 }
609 579
610 std::string DA() const { 580 std::string DA() const;
611 std::string ret;
612 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DA", "", &ret)) return ret;
613 // TODO(edisonn): warn about missing required field, assert for known good p dfs
614 return "";
615 }
616
617 /** (Optional) A document-wide default value for the Q attribute of variable 581 /** (Optional) A document-wide default value for the Q attribute of variable
618 * text fields (see "Variable Text" on page 533). 582 * text fields (see "Variable Text" on page 533).
619 **/ 583 **/
620 bool has_Q() const { 584 bool has_Q() const {
621 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", " ", NULL)); 585 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", " ", NULL));
622 } 586 }
623 587
624 long Q() const { 588 long Q() const;
625 long ret;
626 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Q", "", &re t)) return ret;
627 // TODO(edisonn): warn about missing required field, assert for known good p dfs
628 return 0;
629 }
630
631 }; 589 };
632 590
633 #endif // __DEFINED__SkPdfInteractiveFormDictionary 591 #endif // __DEFINED__SkPdfInteractiveFormDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698