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

Side by Side Diff: experimental/PdfViewer/autogen/SkPdfRubberStampAnnotationDictionary_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__SkPdfRubberStampAnnotationDictionary 1 #ifndef __DEFINED__SkPdfRubberStampAnnotationDictionary
2 #define __DEFINED__SkPdfRubberStampAnnotationDictionary 2 #define __DEFINED__SkPdfRubberStampAnnotationDictionary
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 specific to a rubber stamp annotation 9 // Additional entries specific to a rubber stamp annotation
10 class SkPdfRubberStampAnnotationDictionary : public SkPdfDictionary { 10 class SkPdfRubberStampAnnotationDictionary : public SkPdfDictionary {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 SkPdfRubberStampAnnotationDictionary& operator=(const SkPdfRubberStampAnnotati onDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from .fPodofoObj; return *this;} 526 SkPdfRubberStampAnnotationDictionary& operator=(const SkPdfRubberStampAnnotati onDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from .fPodofoObj; return *this;}
527 527
528 /** (Required) The type of annotation that this dictionary describes; must be St amp 528 /** (Required) The type of annotation that this dictionary describes; must be St amp
529 * for a rubber stamp annotation. 529 * for a rubber stamp annotation.
530 **/ 530 **/
531 bool has_Subtype() const { 531 bool has_Subtype() const {
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty pe", "", NULL)); 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty pe", "", NULL));
533 } 533 }
534 534
535 std::string Subtype() const { 535 std::string Subtype() const;
536 std::string ret;
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", " ", &ret)) return ret;
538 // TODO(edisonn): warn about missing required field, assert for known good p dfs
539 return "";
540 }
541
542 /** (Required) The text to be displayed in the pop-up window when the annotation 536 /** (Required) The text to be displayed in the pop-up window when the annotation
543 * is opened. Carriage returns may be used to separate the text into paragraphs . 537 * is opened. Carriage returns may be used to separate the text into paragraphs .
544 **/ 538 **/
545 bool has_Contents() const { 539 bool has_Contents() const {
546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte nts", "", NULL)); 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte nts", "", NULL));
547 } 541 }
548 542
549 std::string Contents() const { 543 std::string Contents() const;
550 std::string ret;
551 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &ret)) return ret;
552 // TODO(edisonn): warn about missing required field, assert for known good p dfs
553 return "";
554 }
555
556 /** (Optional) The name of an icon to be used in displaying the annotation. View er 544 /** (Optional) The name of an icon to be used in displaying the annotation. View er
557 * applications should provide predefined icon appearances for at least the fol low- 545 * applications should provide predefined icon appearances for at least the fol low-
558 * ing standard names: 546 * ing standard names:
559 * Approved Experimental NotApproved 547 * Approved Experimental NotApproved
560 * AsIs Expired NotForPublicRelease 548 * AsIs Expired NotForPublicRelease
561 * Confidential Final Sold 549 * Confidential Final Sold
562 * Departmental ForComment TopSecret 550 * Departmental ForComment TopSecret
563 * Draft ForPublicRelease 551 * Draft ForPublicRelease
564 * Additional names may be supported as well. Default value: Draft. 552 * Additional names may be supported as well. Default value: Draft.
565 * Note: The annotation dictionary's AP entry, if present, takes precedence ove r the 553 * Note: The annotation dictionary's AP entry, if present, takes precedence ove r the
566 * Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Stream s." 554 * Name entry; see Table 8.10 on page 490 and Section 8.4.4, "Appearance Stream s."
567 **/ 555 **/
568 bool has_Name() const { 556 bool has_Name() const {
569 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name" , "", NULL)); 557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name" , "", NULL));
570 } 558 }
571 559
572 std::string Name() const { 560 std::string Name() const;
573 std::string ret;
574 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "", &ret)) return ret;
575 // TODO(edisonn): warn about missing required field, assert for known good p dfs
576 return "";
577 }
578
579 }; 561 };
580 562
581 #endif // __DEFINED__SkPdfRubberStampAnnotationDictionary 563 #endif // __DEFINED__SkPdfRubberStampAnnotationDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698