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

Side by Side Diff: experimental/PdfViewer/autogen/SkPdfPSXobjectDictionary_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__SkPdfPSXobjectDictionary 1 #ifndef __DEFINED__SkPdfPSXobjectDictionary
2 #define __DEFINED__SkPdfPSXobjectDictionary 2 #define __DEFINED__SkPdfPSXobjectDictionary
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 PostScript XObject dictionary 9 // Additional entries specific to a PostScript XObject dictionary
10 class SkPdfPSXobjectDictionary : public SkPdfDictionary { 10 class SkPdfPSXobjectDictionary : public SkPdfDictionary {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 SkPdfPSXobjectDictionary& operator=(const SkPdfPSXobjectDictionary& from) {thi s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi s;} 526 SkPdfPSXobjectDictionary& operator=(const SkPdfPSXobjectDictionary& from) {thi s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi s;}
527 527
528 /** (Optional) The type of PDF object that this dictionary describes; if present , must be 528 /** (Optional) The type of PDF object that this dictionary describes; if present , must be
529 * XObject for a PostScript XObject. 529 * XObject for a PostScript XObject.
530 **/ 530 **/
531 bool has_Type() const { 531 bool has_Type() const {
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type" , "", NULL)); 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type" , "", NULL));
533 } 533 }
534 534
535 std::string Type() const { 535 std::string Type() const;
536 std::string ret;
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
538 // TODO(edisonn): warn about missing required field, assert for known good p dfs
539 return "";
540 }
541
542 /** (Required) The type of XObject that this dictionary describes; must be PS fo r a 536 /** (Required) The type of XObject that this dictionary describes; must be PS fo r a
543 * PostScript XObject. 537 * PostScript XObject.
544 **/ 538 **/
545 bool has_Subtype() const { 539 bool has_Subtype() const {
546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty pe", "", NULL)); 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty pe", "", NULL));
547 } 541 }
548 542
549 std::string Subtype() const { 543 std::string Subtype() const;
550 std::string ret;
551 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", " ", &ret)) return ret;
552 // TODO(edisonn): warn about missing required field, assert for known good p dfs
553 return "";
554 }
555
556 /** (Optional) A stream whose contents are to be used in place of the PostScript 544 /** (Optional) A stream whose contents are to be used in place of the PostScript
557 * XObject's stream when the target PostScript interpreter is known to support only 545 * XObject's stream when the target PostScript interpreter is known to support only
558 * LanguageLevel 1. 546 * LanguageLevel 1.
559 **/ 547 **/
560 bool has_Level1() const { 548 bool has_Level1() const {
561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Level 1", "", NULL)); 549 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Level 1", "", NULL));
562 } 550 }
563 551
564 SkPdfStream* Level1() const { 552 SkPdfStream* Level1() const;
565 SkPdfStream* ret;
566 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Level1", "", &ret)) return ret;
567 // TODO(edisonn): warn about missing required field, assert for known good p dfs
568 return NULL;
569 }
570
571 }; 553 };
572 554
573 #endif // __DEFINED__SkPdfPSXobjectDictionary 555 #endif // __DEFINED__SkPdfPSXobjectDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698