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

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

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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__SkPdfRemoteGoToActionDictionary 1 #ifndef __DEFINED__SkPdfRemoteGoToActionDictionary
2 #define __DEFINED__SkPdfRemoteGoToActionDictionary 2 #define __DEFINED__SkPdfRemoteGoToActionDictionary
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 remote go-to action 9 // Additional entries specific to a remote go-to action
10 class SkPdfRemoteGoToActionDictionary : public SkPdfDictionary { 10 class SkPdfRemoteGoToActionDictionary : public SkPdfDictionary {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 SkPdfRemoteGoToActionDictionary& operator=(const SkPdfRemoteGoToActionDictiona ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb j; return *this;} 526 SkPdfRemoteGoToActionDictionary& operator=(const SkPdfRemoteGoToActionDictiona ry& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoOb j; return *this;}
527 527
528 /** (Required) The type of action that this dictionary describes; must be GoToR 528 /** (Required) The type of action that this dictionary describes; must be GoToR
529 * for a remote go-to action. 529 * for a remote go-to action.
530 **/ 530 **/
531 bool has_S() const { 531 bool has_S() const {
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL)); 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL));
533 } 533 }
534 534
535 std::string S() const { 535 std::string S() const;
536 std::string ret;
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret;
538 // TODO(edisonn): warn about missing required field, assert for known good p dfs
539 return "";
540 }
541
542 /** (Required) The file in which the destination is located. 536 /** (Required) The file in which the destination is located.
543 **/ 537 **/
544 bool has_F() const { 538 bool has_F() const {
545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", " ", NULL)); 539 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", " ", NULL));
546 } 540 }
547 541
548 SkPdfFileSpec F() const { 542 SkPdfFileSpec F() const;
549 SkPdfFileSpec ret;
550 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
551 // TODO(edisonn): warn about missing required field, assert for known good p dfs
552 return SkPdfFileSpec();
553 }
554
555 /** (Required) The destination to jump to (see Section 8.2.1, "Destinations"). I f 543 /** (Required) The destination to jump to (see Section 8.2.1, "Destinations"). I f
556 * the value is an array defining an explicit destination (as described under 544 * the value is an array defining an explicit destination (as described under
557 * "Explicit Destinations" on page 474), its first element must be a page numbe r 545 * "Explicit Destinations" on page 474), its first element must be a page numbe r
558 * within the remote document rather than an indirect reference to a page ob- 546 * within the remote document rather than an indirect reference to a page ob-
559 * ject in the current document. The first page is numbered 0. 547 * ject in the current document. The first page is numbered 0.
560 **/ 548 **/
561 bool has_D() const { 549 bool has_D() const {
562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", " ", NULL)); 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", " ", NULL));
563 } 551 }
564 552
565 bool isDAName() const { 553 bool isDAName() const {
566 SkPdfObject* ret = NULL; 554 SkPdfObject* ret = NULL;
567 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false; 555 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
568 return ret->podofo()->GetDataType() == ePdfDataType_Name; 556 return ret->podofo()->GetDataType() == ePdfDataType_Name;
569 } 557 }
570 558
571 std::string getDAsName() const { 559 std::string getDAsName() const;
572 std::string ret = "";
573 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &re t)) return ret;
574 // TODO(edisonn): warn about missing required field, assert for known good p dfs
575 return "";
576 }
577
578 bool isDAString() const { 560 bool isDAString() const {
579 SkPdfObject* ret = NULL; 561 SkPdfObject* ret = NULL;
580 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false; 562 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
581 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()- >GetDataType() == ePdfDataType_HexString; 563 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()- >GetDataType() == ePdfDataType_HexString;
582 } 564 }
583 565
584 std::string getDAsString() const { 566 std::string getDAsString() const;
585 std::string ret = "";
586 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", & ret)) return ret;
587 // TODO(edisonn): warn about missing required field, assert for known good p dfs
588 return "";
589 }
590
591 bool isDAArray() const { 567 bool isDAArray() const {
592 SkPdfObject* ret = NULL; 568 SkPdfObject* ret = NULL;
593 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false; 569 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &ret)) return false;
594 return ret->podofo()->GetDataType() == ePdfDataType_Array; 570 return ret->podofo()->GetDataType() == ePdfDataType_Array;
595 } 571 }
596 572
597 SkPdfArray* getDAsArray() const { 573 SkPdfArray* getDAsArray() const;
598 SkPdfArray* ret = NULL;
599 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &r et)) return ret;
600 // TODO(edisonn): warn about missing required field, assert for known good p dfs
601 return NULL;
602 }
603
604 /** (Optional; PDF 1.2) A flag specifying whether to open the destination docu- 574 /** (Optional; PDF 1.2) A flag specifying whether to open the destination docu-
605 * ment in a new window. If this flag is false, the destination document will 575 * ment in a new window. If this flag is false, the destination document will
606 * replace the current document in the same window. If this entry is absent, 576 * replace the current document in the same window. If this entry is absent,
607 * the viewer application should behave in accordance with the current user 577 * the viewer application should behave in accordance with the current user
608 * preference. 578 * preference.
609 **/ 579 **/
610 bool has_NewWindow() const { 580 bool has_NewWindow() const {
611 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWi ndow", "", NULL)); 581 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWi ndow", "", NULL));
612 } 582 }
613 583
614 bool NewWindow() const { 584 bool NewWindow() const;
615 bool ret;
616 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWindow", "", &ret)) return ret;
617 // TODO(edisonn): warn about missing required field, assert for known good p dfs
618 return false;
619 }
620
621 }; 585 };
622 586
623 #endif // __DEFINED__SkPdfRemoteGoToActionDictionary 587 #endif // __DEFINED__SkPdfRemoteGoToActionDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698