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

Side by Side Diff: experimental/PdfViewer/autogen/SkPdfAppearanceDictionary_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__SkPdfAppearanceDictionary 1 #ifndef __DEFINED__SkPdfAppearanceDictionary
2 #define __DEFINED__SkPdfAppearanceDictionary 2 #define __DEFINED__SkPdfAppearanceDictionary
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 an appearance dictionary 9 // Entries in an appearance dictionary
10 class SkPdfAppearanceDictionary : public SkPdfDictionary { 10 class SkPdfAppearanceDictionary : public SkPdfDictionary {
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 bool has_N() const { 530 bool has_N() const {
531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", " ", NULL)); 531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", " ", NULL));
532 } 532 }
533 533
534 bool isNAStream() const { 534 bool isNAStream() const {
535 SkPdfObject* ret = NULL; 535 SkPdfObject* ret = NULL;
536 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return false; 536 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return false;
537 return ret->podofo()->HasStream(); 537 return ret->podofo()->HasStream();
538 } 538 }
539 539
540 SkPdfStream* getNAsStream() const { 540 SkPdfStream* getNAsStream() const;
541 SkPdfStream* ret = NULL;
542 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", & ret)) return ret;
543 // TODO(edisonn): warn about missing required field, assert for known good p dfs
544 return NULL;
545 }
546
547 bool isNADictionary() const { 541 bool isNADictionary() const {
548 SkPdfObject* ret = NULL; 542 SkPdfObject* ret = NULL;
549 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return false; 543 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", "", &ret)) return false;
550 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; 544 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
551 } 545 }
552 546
553 SkPdfDictionary* getNAsDictionary() const { 547 SkPdfDictionary* getNAsDictionary() const;
554 SkPdfDictionary* ret = NULL;
555 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "N", " ", &ret)) return ret;
556 // TODO(edisonn): warn about missing required field, assert for known good p dfs
557 return NULL;
558 }
559
560 /** (Optional) The annotation's rollover appearance. Default value: the value of 548 /** (Optional) The annotation's rollover appearance. Default value: the value of
561 * the N entry. 549 * the N entry.
562 **/ 550 **/
563 bool has_R() const { 551 bool has_R() const {
564 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", " ", NULL)); 552 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", " ", NULL));
565 } 553 }
566 554
567 bool isRAStream() const { 555 bool isRAStream() const {
568 SkPdfObject* ret = NULL; 556 SkPdfObject* ret = NULL;
569 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return false; 557 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return false;
570 return ret->podofo()->HasStream(); 558 return ret->podofo()->HasStream();
571 } 559 }
572 560
573 SkPdfStream* getRAsStream() const { 561 SkPdfStream* getRAsStream() const;
574 SkPdfStream* ret = NULL;
575 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", & ret)) return ret;
576 // TODO(edisonn): warn about missing required field, assert for known good p dfs
577 return NULL;
578 }
579
580 bool isRADictionary() const { 562 bool isRADictionary() const {
581 SkPdfObject* ret = NULL; 563 SkPdfObject* ret = NULL;
582 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return false; 564 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", "", &ret)) return false;
583 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; 565 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
584 } 566 }
585 567
586 SkPdfDictionary* getRAsDictionary() const { 568 SkPdfDictionary* getRAsDictionary() const;
587 SkPdfDictionary* ret = NULL;
588 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "R", " ", &ret)) return ret;
589 // TODO(edisonn): warn about missing required field, assert for known good p dfs
590 return NULL;
591 }
592
593 /** (Optional) The annotation's down appearance. Default value: the value of the 569 /** (Optional) The annotation's down appearance. Default value: the value of the
594 * N entry. 570 * N entry.
595 **/ 571 **/
596 bool has_D() const { 572 bool has_D() const {
597 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", " ", NULL)); 573 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", " ", NULL));
598 } 574 }
599 575
600 bool isDAStream() const { 576 bool isDAStream() const {
601 SkPdfObject* ret = NULL; 577 SkPdfObject* ret = NULL;
602 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false; 578 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
603 return ret->podofo()->HasStream(); 579 return ret->podofo()->HasStream();
604 } 580 }
605 581
606 SkPdfStream* getDAsStream() const { 582 SkPdfStream* getDAsStream() const;
607 SkPdfStream* ret = NULL;
608 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", & ret)) return ret;
609 // TODO(edisonn): warn about missing required field, assert for known good p dfs
610 return NULL;
611 }
612
613 bool isDADictionary() const { 583 bool isDADictionary() const {
614 SkPdfObject* ret = NULL; 584 SkPdfObject* ret = NULL;
615 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false; 585 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
616 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; 586 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
617 } 587 }
618 588
619 SkPdfDictionary* getDAsDictionary() const { 589 SkPdfDictionary* getDAsDictionary() const;
620 SkPdfDictionary* ret = NULL;
621 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", " ", &ret)) return ret;
622 // TODO(edisonn): warn about missing required field, assert for known good p dfs
623 return NULL;
624 }
625
626 }; 590 };
627 591
628 #endif // __DEFINED__SkPdfAppearanceDictionary 592 #endif // __DEFINED__SkPdfAppearanceDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698