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

Side by Side Diff: experimental/PdfViewer/autogen/SkPdfLaunchActionDictionary_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__SkPdfLaunchActionDictionary 1 #ifndef __DEFINED__SkPdfLaunchActionDictionary
2 #define __DEFINED__SkPdfLaunchActionDictionary 2 #define __DEFINED__SkPdfLaunchActionDictionary
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 launch action 9 // Additional entries specific to a launch action
10 class SkPdfLaunchActionDictionary : public SkPdfDictionary { 10 class SkPdfLaunchActionDictionary : public SkPdfDictionary {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 SkPdfLaunchActionDictionary& operator=(const SkPdfLaunchActionDictionary& from ) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur n *this;} 526 SkPdfLaunchActionDictionary& operator=(const SkPdfLaunchActionDictionary& from ) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur n *this;}
527 527
528 /** (Required) The type of action that this dictionary describes; must be Launch 528 /** (Required) The type of action that this dictionary describes; must be Launch
529 * for a launch action. 529 * for a launch 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 if none of the entries Win, Mac, or Unix is present) The applicati on to 536 /** (Required if none of the entries Win, Mac, or Unix is present) The applicati on to
543 * be launched or the document to be opened or printed. If this entry is absent 537 * be launched or the document to be opened or printed. If this entry is absent
544 * and the viewer application does not understand any of the alternative entrie s, 538 * and the viewer application does not understand any of the alternative entrie s,
545 * it should do nothing. 539 * it should do nothing.
546 **/ 540 **/
547 bool has_F() const { 541 bool has_F() const {
548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", " ", NULL)); 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", " ", NULL));
549 } 543 }
550 544
551 SkPdfFileSpec F() const { 545 SkPdfFileSpec F() const;
552 SkPdfFileSpec ret;
553 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
554 // TODO(edisonn): warn about missing required field, assert for known good p dfs
555 return SkPdfFileSpec();
556 }
557
558 /** (Optional) A dictionary containing Windows-specific launch parameters (see 546 /** (Optional) A dictionary containing Windows-specific launch parameters (see
559 * the Table 8.38; see also implementation note 73 in Appendix H). 547 * the Table 8.38; see also implementation note 73 in Appendix H).
560 **/ 548 **/
561 bool has_Win() const { 549 bool has_Win() const {
562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Win", "", NULL)); 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Win", "", NULL));
563 } 551 }
564 552
565 SkPdfDictionary* Win() const { 553 SkPdfDictionary* Win() const;
566 SkPdfDictionary* ret;
567 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Win", "", &ret)) return ret;
568 // TODO(edisonn): warn about missing required field, assert for known good p dfs
569 return NULL;
570 }
571
572 /** (Optional) Mac OS'specific launch parameters; not yet defined. 554 /** (Optional) Mac OS'specific launch parameters; not yet defined.
573 **/ 555 **/
574 bool has_Mac() const { 556 bool has_Mac() const {
575 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", NULL)); 557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", NULL));
576 } 558 }
577 559
578 SkPdfObject* Mac() const { 560 SkPdfObject* Mac() const;
579 SkPdfObject* ret;
580 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", &ret)) return ret;
581 // TODO(edisonn): warn about missing required field, assert for known good p dfs
582 return NULL;
583 }
584
585 /** (Optional) UNIX-specific launch parameters; not yet defined. 561 /** (Optional) UNIX-specific launch parameters; not yet defined.
586 **/ 562 **/
587 bool has_Unix() const { 563 bool has_Unix() const {
588 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix" , "", NULL)); 564 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix" , "", NULL));
589 } 565 }
590 566
591 SkPdfObject* Unix() const { 567 SkPdfObject* Unix() const;
592 SkPdfObject* ret;
593 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix", "" , &ret)) return ret;
594 // TODO(edisonn): warn about missing required field, assert for known good p dfs
595 return NULL;
596 }
597
598 /** (Optional; PDF 1.2) A flag specifying whether to open the destination docu- 568 /** (Optional; PDF 1.2) A flag specifying whether to open the destination docu-
599 * ment in a new window. If this flag is false, the destination document will 569 * ment in a new window. If this flag is false, the destination document will
600 * replace the current document in the same window. If this entry is absent, th e 570 * replace the current document in the same window. If this entry is absent, th e
601 * viewer application should behave in accordance with the current user prefer- 571 * viewer application should behave in accordance with the current user prefer-
602 * ence. This entry is ignored if the file designated by the F entry is not a P DF 572 * ence. This entry is ignored if the file designated by the F entry is not a P DF
603 * document. 573 * document.
604 **/ 574 **/
605 bool has_NewWindow() const { 575 bool has_NewWindow() const {
606 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWi ndow", "", NULL)); 576 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWi ndow", "", NULL));
607 } 577 }
608 578
609 bool NewWindow() const { 579 bool NewWindow() const;
610 bool ret;
611 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "NewWindow", "", &ret)) return ret;
612 // TODO(edisonn): warn about missing required field, assert for known good p dfs
613 return false;
614 }
615
616 }; 580 };
617 581
618 #endif // __DEFINED__SkPdfLaunchActionDictionary 582 #endif // __DEFINED__SkPdfLaunchActionDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698