Commit d88231e01ec3083fa99363efcd5b049fb1663a6c
1 parent
690d6031
Promote QPDF::ObjGen to top-level object QPDFObjGen
Showing
10 changed files
with
227 additions
and
181 deletions
ChangeLog
include/qpdf/QPDF.hh
| @@ -17,6 +17,7 @@ | @@ -17,6 +17,7 @@ | ||
| 17 | #include <list> | 17 | #include <list> |
| 18 | #include <iostream> | 18 | #include <iostream> |
| 19 | 19 | ||
| 20 | +#include <qpdf/QPDFObjGen.hh> | ||
| 20 | #include <qpdf/QPDFXRefEntry.hh> | 21 | #include <qpdf/QPDFXRefEntry.hh> |
| 21 | #include <qpdf/QPDFObjectHandle.hh> | 22 | #include <qpdf/QPDFObjectHandle.hh> |
| 22 | #include <qpdf/QPDFTokenizer.hh> | 23 | #include <qpdf/QPDFTokenizer.hh> |
| @@ -519,17 +520,6 @@ class QPDF | @@ -519,17 +520,6 @@ class QPDF | ||
| 519 | private: | 520 | private: |
| 520 | static std::string qpdf_version; | 521 | static std::string qpdf_version; |
| 521 | 522 | ||
| 522 | - class ObjGen | ||
| 523 | - { | ||
| 524 | - public: | ||
| 525 | - ObjGen(); | ||
| 526 | - ObjGen(int obj, int gen); | ||
| 527 | - bool operator<(ObjGen const&) const; | ||
| 528 | - | ||
| 529 | - int obj; | ||
| 530 | - int gen; | ||
| 531 | - }; | ||
| 532 | - | ||
| 533 | class ObjCache | 523 | class ObjCache |
| 534 | { | 524 | { |
| 535 | public: | 525 | public: |
| @@ -555,9 +545,9 @@ class QPDF | @@ -555,9 +545,9 @@ class QPDF | ||
| 555 | class ObjCopier | 545 | class ObjCopier |
| 556 | { | 546 | { |
| 557 | public: | 547 | public: |
| 558 | - std::map<ObjGen, QPDFObjectHandle> object_map; | 548 | + std::map<QPDFObjGen, QPDFObjectHandle> object_map; |
| 559 | std::vector<QPDFObjectHandle> to_copy; | 549 | std::vector<QPDFObjectHandle> to_copy; |
| 560 | - std::set<ObjGen> visiting; | 550 | + std::set<QPDFObjGen> visiting; |
| 561 | }; | 551 | }; |
| 562 | 552 | ||
| 563 | class CopiedStreamDataProvider: public QPDFObjectHandle::StreamDataProvider | 553 | class CopiedStreamDataProvider: public QPDFObjectHandle::StreamDataProvider |
| @@ -568,11 +558,11 @@ class QPDF | @@ -568,11 +558,11 @@ class QPDF | ||
| 568 | } | 558 | } |
| 569 | virtual void provideStreamData(int objid, int generation, | 559 | virtual void provideStreamData(int objid, int generation, |
| 570 | Pipeline* pipeline); | 560 | Pipeline* pipeline); |
| 571 | - void registerForeignStream(ObjGen const& local_og, | 561 | + void registerForeignStream(QPDFObjGen const& local_og, |
| 572 | QPDFObjectHandle foreign_stream); | 562 | QPDFObjectHandle foreign_stream); |
| 573 | 563 | ||
| 574 | private: | 564 | private: |
| 575 | - std::map<ObjGen, QPDFObjectHandle> foreign_streams; | 565 | + std::map<QPDFObjGen, QPDFObjectHandle> foreign_streams; |
| 576 | }; | 566 | }; |
| 577 | 567 | ||
| 578 | class StringDecrypter: public QPDFObjectHandle::StringDecrypter | 568 | class StringDecrypter: public QPDFObjectHandle::StringDecrypter |
| @@ -932,7 +922,7 @@ class QPDF | @@ -932,7 +922,7 @@ class QPDF | ||
| 932 | void readHSharedObject(BitStream); | 922 | void readHSharedObject(BitStream); |
| 933 | void readHGeneric(BitStream, HGeneric&); | 923 | void readHGeneric(BitStream, HGeneric&); |
| 934 | qpdf_offset_t maxEnd(ObjUser const& ou); | 924 | qpdf_offset_t maxEnd(ObjUser const& ou); |
| 935 | - qpdf_offset_t getLinearizationOffset(ObjGen const&); | 925 | + qpdf_offset_t getLinearizationOffset(QPDFObjGen const&); |
| 936 | QPDFObjectHandle getUncompressedObject( | 926 | QPDFObjectHandle getUncompressedObject( |
| 937 | QPDFObjectHandle&, std::map<int, int> const& object_stream_data); | 927 | QPDFObjectHandle&, std::map<int, int> const& object_stream_data); |
| 938 | int lengthNextN(int first_object, int n, | 928 | int lengthNextN(int first_object, int n, |
| @@ -950,12 +940,12 @@ class QPDF | @@ -950,12 +940,12 @@ class QPDF | ||
| 950 | void dumpHSharedObject(); | 940 | void dumpHSharedObject(); |
| 951 | void dumpHGeneric(HGeneric&); | 941 | void dumpHGeneric(HGeneric&); |
| 952 | int adjusted_offset(int offset); | 942 | int adjusted_offset(int offset); |
| 953 | - QPDFObjectHandle objGenToIndirect(ObjGen const&); | 943 | + QPDFObjectHandle objGenToIndirect(QPDFObjGen const&); |
| 954 | void calculateLinearizationData( | 944 | void calculateLinearizationData( |
| 955 | std::map<int, int> const& object_stream_data); | 945 | std::map<int, int> const& object_stream_data); |
| 956 | void pushOutlinesToPart( | 946 | void pushOutlinesToPart( |
| 957 | std::vector<QPDFObjectHandle>& part, | 947 | std::vector<QPDFObjectHandle>& part, |
| 958 | - std::set<ObjGen>& lc_outlines, | 948 | + std::set<QPDFObjGen>& lc_outlines, |
| 959 | std::map<int, int> const& object_stream_data); | 949 | std::map<int, int> const& object_stream_data); |
| 960 | int outputLengthNextN( | 950 | int outputLengthNextN( |
| 961 | int in_object, int n, | 951 | int in_object, int n, |
| @@ -989,7 +979,7 @@ class QPDF | @@ -989,7 +979,7 @@ class QPDF | ||
| 989 | bool allow_changes, bool warn_skipped_keys); | 979 | bool allow_changes, bool warn_skipped_keys); |
| 990 | void updateObjectMaps(ObjUser const& ou, QPDFObjectHandle oh); | 980 | void updateObjectMaps(ObjUser const& ou, QPDFObjectHandle oh); |
| 991 | void updateObjectMapsInternal(ObjUser const& ou, QPDFObjectHandle oh, | 981 | void updateObjectMapsInternal(ObjUser const& ou, QPDFObjectHandle oh, |
| 992 | - std::set<ObjGen>& visited, bool top); | 982 | + std::set<QPDFObjGen>& visited, bool top); |
| 993 | void filterCompressedObjects(std::map<int, int> const& object_stream_data); | 983 | void filterCompressedObjects(std::map<int, int> const& object_stream_data); |
| 994 | 984 | ||
| 995 | 985 | ||
| @@ -1017,19 +1007,19 @@ class QPDF | @@ -1017,19 +1007,19 @@ class QPDF | ||
| 1017 | int cached_key_objid; | 1007 | int cached_key_objid; |
| 1018 | int cached_key_generation; | 1008 | int cached_key_generation; |
| 1019 | std::string pdf_version; | 1009 | std::string pdf_version; |
| 1020 | - std::map<ObjGen, QPDFXRefEntry> xref_table; | 1010 | + std::map<QPDFObjGen, QPDFXRefEntry> xref_table; |
| 1021 | std::set<int> deleted_objects; | 1011 | std::set<int> deleted_objects; |
| 1022 | - std::map<ObjGen, ObjCache> obj_cache; | 1012 | + std::map<QPDFObjGen, ObjCache> obj_cache; |
| 1023 | QPDFObjectHandle trailer; | 1013 | QPDFObjectHandle trailer; |
| 1024 | std::vector<QPDFObjectHandle> all_pages; | 1014 | std::vector<QPDFObjectHandle> all_pages; |
| 1025 | - std::map<ObjGen, int> pageobj_to_pages_pos; | 1015 | + std::map<QPDFObjGen, int> pageobj_to_pages_pos; |
| 1026 | bool pushed_inherited_attributes_to_pages; | 1016 | bool pushed_inherited_attributes_to_pages; |
| 1027 | std::vector<QPDFExc> warnings; | 1017 | std::vector<QPDFExc> warnings; |
| 1028 | std::map<QPDF*, ObjCopier> object_copiers; | 1018 | std::map<QPDF*, ObjCopier> object_copiers; |
| 1029 | PointerHolder<QPDFObjectHandle::StreamDataProvider> copied_streams; | 1019 | PointerHolder<QPDFObjectHandle::StreamDataProvider> copied_streams; |
| 1030 | // copied_stream_data_provider is owned by copied_streams | 1020 | // copied_stream_data_provider is owned by copied_streams |
| 1031 | CopiedStreamDataProvider* copied_stream_data_provider; | 1021 | CopiedStreamDataProvider* copied_stream_data_provider; |
| 1032 | - std::set<ObjGen> attachment_streams; | 1022 | + std::set<QPDFObjGen> attachment_streams; |
| 1033 | 1023 | ||
| 1034 | // Linearization data | 1024 | // Linearization data |
| 1035 | qpdf_offset_t first_xref_item_offset; // actual value from file | 1025 | qpdf_offset_t first_xref_item_offset; // actual value from file |
| @@ -1061,8 +1051,8 @@ class QPDF | @@ -1061,8 +1051,8 @@ class QPDF | ||
| 1061 | std::vector<QPDFObjectHandle> part9; | 1051 | std::vector<QPDFObjectHandle> part9; |
| 1062 | 1052 | ||
| 1063 | // Optimization data | 1053 | // Optimization data |
| 1064 | - std::map<ObjUser, std::set<ObjGen> > obj_user_to_objects; | ||
| 1065 | - std::map<ObjGen, std::set<ObjUser> > object_to_obj_users; | 1054 | + std::map<ObjUser, std::set<QPDFObjGen> > obj_user_to_objects; |
| 1055 | + std::map<QPDFObjGen, std::set<ObjUser> > object_to_obj_users; | ||
| 1066 | }; | 1056 | }; |
| 1067 | 1057 | ||
| 1068 | #endif // __QPDF_HH__ | 1058 | #endif // __QPDF_HH__ |
include/qpdf/QPDFObjGen.hh
0 โ 100644
| 1 | +// Copyright (c) 2005-2013 Jay Berkenbilt | ||
| 2 | +// | ||
| 3 | +// This file is part of qpdf. This software may be distributed under | ||
| 4 | +// the terms of version 2 of the Artistic License which may be found | ||
| 5 | +// in the source distribution. It is provided "as is" without express | ||
| 6 | +// or implied warranty. | ||
| 7 | + | ||
| 8 | +#ifndef __QPDFOBJGEN_HH__ | ||
| 9 | +#define __QPDFOBJGEN_HH__ | ||
| 10 | + | ||
| 11 | +#include <qpdf/DLL.h> | ||
| 12 | + | ||
| 13 | +// This class represents an object ID and generation pair. It is | ||
| 14 | +// suitable to use as a key in a map or set. | ||
| 15 | + | ||
| 16 | +class QPDFObjGen | ||
| 17 | +{ | ||
| 18 | + public: | ||
| 19 | + QPDF_DLL | ||
| 20 | + QPDFObjGen(); | ||
| 21 | + QPDF_DLL | ||
| 22 | + QPDFObjGen(int obj, int gen); | ||
| 23 | + QPDF_DLL | ||
| 24 | + bool operator<(QPDFObjGen const&) const; | ||
| 25 | + QPDF_DLL | ||
| 26 | + int getObj() const; | ||
| 27 | + QPDF_DLL | ||
| 28 | + int getGen() const; | ||
| 29 | + | ||
| 30 | + private: | ||
| 31 | + int obj; | ||
| 32 | + int gen; | ||
| 33 | +}; | ||
| 34 | + | ||
| 35 | +#endif // __QPDFOBJGEN_HH__ |
libqpdf/QPDF.cc
| @@ -39,32 +39,18 @@ static char const* EMPTY_PDF = | @@ -39,32 +39,18 @@ static char const* EMPTY_PDF = | ||
| 39 | "110\n" | 39 | "110\n" |
| 40 | "%%EOF\n"; | 40 | "%%EOF\n"; |
| 41 | 41 | ||
| 42 | - | ||
| 43 | -QPDF::ObjGen::ObjGen(int o = 0, int g = 0) : | ||
| 44 | - obj(o), | ||
| 45 | - gen(g) | ||
| 46 | -{ | ||
| 47 | -} | ||
| 48 | - | ||
| 49 | -bool | ||
| 50 | -QPDF::ObjGen::operator<(ObjGen const& rhs) const | ||
| 51 | -{ | ||
| 52 | - return ((this->obj < rhs.obj) || | ||
| 53 | - ((this->obj == rhs.obj) && (this->gen < rhs.gen))); | ||
| 54 | -} | ||
| 55 | - | ||
| 56 | void | 42 | void |
| 57 | QPDF::CopiedStreamDataProvider::provideStreamData( | 43 | QPDF::CopiedStreamDataProvider::provideStreamData( |
| 58 | int objid, int generation, Pipeline* pipeline) | 44 | int objid, int generation, Pipeline* pipeline) |
| 59 | { | 45 | { |
| 60 | QPDFObjectHandle foreign_stream = | 46 | QPDFObjectHandle foreign_stream = |
| 61 | - this->foreign_streams[ObjGen(objid, generation)]; | 47 | + this->foreign_streams[QPDFObjGen(objid, generation)]; |
| 62 | foreign_stream.pipeStreamData(pipeline, false, false, false); | 48 | foreign_stream.pipeStreamData(pipeline, false, false, false); |
| 63 | } | 49 | } |
| 64 | 50 | ||
| 65 | void | 51 | void |
| 66 | QPDF::CopiedStreamDataProvider::registerForeignStream( | 52 | QPDF::CopiedStreamDataProvider::registerForeignStream( |
| 67 | - ObjGen const& local_og, QPDFObjectHandle foreign_stream) | 53 | + QPDFObjGen const& local_og, QPDFObjectHandle foreign_stream) |
| 68 | { | 54 | { |
| 69 | this->foreign_streams[local_og] = foreign_stream; | 55 | this->foreign_streams[local_og] = foreign_stream; |
| 70 | } | 56 | } |
| @@ -128,7 +114,8 @@ QPDF::~QPDF() | @@ -128,7 +114,8 @@ QPDF::~QPDF() | ||
| 128 | // have the effect of undoing any modifications that may have been | 114 | // have the effect of undoing any modifications that may have been |
| 129 | // made to any of the objects. | 115 | // made to any of the objects. |
| 130 | this->xref_table.clear(); | 116 | this->xref_table.clear(); |
| 131 | - for (std::map<ObjGen, ObjCache>::iterator iter = this->obj_cache.begin(); | 117 | + for (std::map<QPDFObjGen, ObjCache>::iterator iter = |
| 118 | + this->obj_cache.begin(); | ||
| 132 | iter != obj_cache.end(); ++iter) | 119 | iter != obj_cache.end(); ++iter) |
| 133 | { | 120 | { |
| 134 | QPDFObject::ObjAccessor::releaseResolved( | 121 | QPDFObject::ObjAccessor::releaseResolved( |
| @@ -354,8 +341,8 @@ QPDF::reconstruct_xref(QPDFExc& e) | @@ -354,8 +341,8 @@ QPDF::reconstruct_xref(QPDFExc& e) | ||
| 354 | "Attempting to reconstruct cross-reference table")); | 341 | "Attempting to reconstruct cross-reference table")); |
| 355 | 342 | ||
| 356 | // Delete all references to type 1 (uncompressed) objects | 343 | // Delete all references to type 1 (uncompressed) objects |
| 357 | - std::set<ObjGen> to_delete; | ||
| 358 | - for (std::map<ObjGen, QPDFXRefEntry>::iterator iter = | 344 | + std::set<QPDFObjGen> to_delete; |
| 345 | + for (std::map<QPDFObjGen, QPDFXRefEntry>::iterator iter = | ||
| 359 | this->xref_table.begin(); | 346 | this->xref_table.begin(); |
| 360 | iter != this->xref_table.end(); ++iter) | 347 | iter != this->xref_table.end(); ++iter) |
| 361 | { | 348 | { |
| @@ -364,7 +351,7 @@ QPDF::reconstruct_xref(QPDFExc& e) | @@ -364,7 +351,7 @@ QPDF::reconstruct_xref(QPDFExc& e) | ||
| 364 | to_delete.insert((*iter).first); | 351 | to_delete.insert((*iter).first); |
| 365 | } | 352 | } |
| 366 | } | 353 | } |
| 367 | - for (std::set<ObjGen>::iterator iter = to_delete.begin(); | 354 | + for (std::set<QPDFObjGen>::iterator iter = to_delete.begin(); |
| 368 | iter != to_delete.end(); ++iter) | 355 | iter != to_delete.end(); ++iter) |
| 369 | { | 356 | { |
| 370 | this->xref_table.erase(*iter); | 357 | this->xref_table.erase(*iter); |
| @@ -464,7 +451,7 @@ QPDF::read_xref(qpdf_offset_t xref_offset) | @@ -464,7 +451,7 @@ QPDF::read_xref(qpdf_offset_t xref_offset) | ||
| 464 | int max_obj = 0; | 451 | int max_obj = 0; |
| 465 | if (! xref_table.empty()) | 452 | if (! xref_table.empty()) |
| 466 | { | 453 | { |
| 467 | - max_obj = (*(xref_table.rbegin())).first.obj; | 454 | + max_obj = (*(xref_table.rbegin())).first.getObj(); |
| 468 | } | 455 | } |
| 469 | if (! this->deleted_objects.empty()) | 456 | if (! this->deleted_objects.empty()) |
| 470 | { | 457 | { |
| @@ -491,7 +478,7 @@ QPDF::read_xrefTable(qpdf_offset_t xref_offset) | @@ -491,7 +478,7 @@ QPDF::read_xrefTable(qpdf_offset_t xref_offset) | ||
| 491 | PCRE xref_first_re("^\\s*(\\d+)\\s+(\\d+)"); | 478 | PCRE xref_first_re("^\\s*(\\d+)\\s+(\\d+)"); |
| 492 | PCRE xref_entry_re("(?s:(^\\d{10}) (\\d{5}) ([fn])[ \r\n]{2}$)"); | 479 | PCRE xref_entry_re("(?s:(^\\d{10}) (\\d{5}) ([fn])[ \r\n]{2}$)"); |
| 493 | 480 | ||
| 494 | - std::vector<ObjGen> deleted_items; | 481 | + std::vector<QPDFObjGen> deleted_items; |
| 495 | 482 | ||
| 496 | this->file->seek(xref_offset, SEEK_SET); | 483 | this->file->seek(xref_offset, SEEK_SET); |
| 497 | bool done = false; | 484 | bool done = false; |
| @@ -538,7 +525,7 @@ QPDF::read_xrefTable(qpdf_offset_t xref_offset) | @@ -538,7 +525,7 @@ QPDF::read_xrefTable(qpdf_offset_t xref_offset) | ||
| 538 | { | 525 | { |
| 539 | // Save deleted items until after we've checked the | 526 | // Save deleted items until after we've checked the |
| 540 | // XRefStm, if any. | 527 | // XRefStm, if any. |
| 541 | - deleted_items.push_back(ObjGen(i, f2)); | 528 | + deleted_items.push_back(QPDFObjGen(i, f2)); |
| 542 | } | 529 | } |
| 543 | else | 530 | else |
| 544 | { | 531 | { |
| @@ -615,11 +602,11 @@ QPDF::read_xrefTable(qpdf_offset_t xref_offset) | @@ -615,11 +602,11 @@ QPDF::read_xrefTable(qpdf_offset_t xref_offset) | ||
| 615 | } | 602 | } |
| 616 | 603 | ||
| 617 | // Handle any deleted items now that we've read the /XRefStm. | 604 | // Handle any deleted items now that we've read the /XRefStm. |
| 618 | - for (std::vector<ObjGen>::iterator iter = deleted_items.begin(); | 605 | + for (std::vector<QPDFObjGen>::iterator iter = deleted_items.begin(); |
| 619 | iter != deleted_items.end(); ++iter) | 606 | iter != deleted_items.end(); ++iter) |
| 620 | { | 607 | { |
| 621 | - ObjGen& og = *iter; | ||
| 622 | - insertXrefEntry(og.obj, 0, 0, og.gen); | 608 | + QPDFObjGen& og = *iter; |
| 609 | + insertXrefEntry(og.getObj(), 0, 0, og.getGen()); | ||
| 623 | } | 610 | } |
| 624 | 611 | ||
| 625 | if (cur_trailer.hasKey("/Prev")) | 612 | if (cur_trailer.hasKey("/Prev")) |
| @@ -874,7 +861,7 @@ QPDF::insertXrefEntry(int obj, int f0, qpdf_offset_t f1, int f2, bool overwrite) | @@ -874,7 +861,7 @@ QPDF::insertXrefEntry(int obj, int f0, qpdf_offset_t f1, int f2, bool overwrite) | ||
| 874 | // object. Disregard this one. | 861 | // object. Disregard this one. |
| 875 | { // private scope | 862 | { // private scope |
| 876 | int gen = (f0 == 2 ? 0 : f2); | 863 | int gen = (f0 == 2 ? 0 : f2); |
| 877 | - ObjGen og(obj, gen); | 864 | + QPDFObjGen og(obj, gen); |
| 878 | if (this->xref_table.count(og)) | 865 | if (this->xref_table.count(og)) |
| 879 | { | 866 | { |
| 880 | if (overwrite) | 867 | if (overwrite) |
| @@ -904,11 +891,11 @@ QPDF::insertXrefEntry(int obj, int f0, qpdf_offset_t f1, int f2, bool overwrite) | @@ -904,11 +891,11 @@ QPDF::insertXrefEntry(int obj, int f0, qpdf_offset_t f1, int f2, bool overwrite) | ||
| 904 | case 1: | 891 | case 1: |
| 905 | // f2 is generation | 892 | // f2 is generation |
| 906 | QTC::TC("qpdf", "QPDF xref gen > 0", ((f2 > 0) ? 1 : 0)); | 893 | QTC::TC("qpdf", "QPDF xref gen > 0", ((f2 > 0) ? 1 : 0)); |
| 907 | - this->xref_table[ObjGen(obj, f2)] = QPDFXRefEntry(f0, f1, f2); | 894 | + this->xref_table[QPDFObjGen(obj, f2)] = QPDFXRefEntry(f0, f1, f2); |
| 908 | break; | 895 | break; |
| 909 | 896 | ||
| 910 | case 2: | 897 | case 2: |
| 911 | - this->xref_table[ObjGen(obj, 0)] = QPDFXRefEntry(f0, f1, f2); | 898 | + this->xref_table[QPDFObjGen(obj, 0)] = QPDFXRefEntry(f0, f1, f2); |
| 912 | break; | 899 | break; |
| 913 | 900 | ||
| 914 | default: | 901 | default: |
| @@ -923,13 +910,13 @@ QPDF::insertXrefEntry(int obj, int f0, qpdf_offset_t f1, int f2, bool overwrite) | @@ -923,13 +910,13 @@ QPDF::insertXrefEntry(int obj, int f0, qpdf_offset_t f1, int f2, bool overwrite) | ||
| 923 | void | 910 | void |
| 924 | QPDF::showXRefTable() | 911 | QPDF::showXRefTable() |
| 925 | { | 912 | { |
| 926 | - for (std::map<ObjGen, QPDFXRefEntry>::iterator iter = | 913 | + for (std::map<QPDFObjGen, QPDFXRefEntry>::iterator iter = |
| 927 | this->xref_table.begin(); | 914 | this->xref_table.begin(); |
| 928 | iter != this->xref_table.end(); ++iter) | 915 | iter != this->xref_table.end(); ++iter) |
| 929 | { | 916 | { |
| 930 | - ObjGen const& og = (*iter).first; | 917 | + QPDFObjGen const& og = (*iter).first; |
| 931 | QPDFXRefEntry const& entry = (*iter).second; | 918 | QPDFXRefEntry const& entry = (*iter).second; |
| 932 | - *out_stream << og.obj << "/" << og.gen << ": "; | 919 | + *out_stream << og.getObj() << "/" << og.getGen() << ": "; |
| 933 | switch (entry.getType()) | 920 | switch (entry.getType()) |
| 934 | { | 921 | { |
| 935 | case 1: | 922 | case 1: |
| @@ -1213,14 +1200,14 @@ QPDF::recoverStreamLength(PointerHolder<InputSource> input, | @@ -1213,14 +1200,14 @@ QPDF::recoverStreamLength(PointerHolder<InputSource> input, | ||
| 1213 | if (length) | 1200 | if (length) |
| 1214 | { | 1201 | { |
| 1215 | int this_obj_offset = 0; | 1202 | int this_obj_offset = 0; |
| 1216 | - ObjGen this_obj(0, 0); | 1203 | + QPDFObjGen this_obj(0, 0); |
| 1217 | 1204 | ||
| 1218 | // Make sure this is inside this object | 1205 | // Make sure this is inside this object |
| 1219 | - for (std::map<ObjGen, QPDFXRefEntry>::iterator iter = | 1206 | + for (std::map<QPDFObjGen, QPDFXRefEntry>::iterator iter = |
| 1220 | this->xref_table.begin(); | 1207 | this->xref_table.begin(); |
| 1221 | iter != this->xref_table.end(); ++iter) | 1208 | iter != this->xref_table.end(); ++iter) |
| 1222 | { | 1209 | { |
| 1223 | - ObjGen const& og = (*iter).first; | 1210 | + QPDFObjGen const& og = (*iter).first; |
| 1224 | QPDFXRefEntry const& entry = (*iter).second; | 1211 | QPDFXRefEntry const& entry = (*iter).second; |
| 1225 | if (entry.getType() == 1) | 1212 | if (entry.getType() == 1) |
| 1226 | { | 1213 | { |
| @@ -1235,8 +1222,8 @@ QPDF::recoverStreamLength(PointerHolder<InputSource> input, | @@ -1235,8 +1222,8 @@ QPDF::recoverStreamLength(PointerHolder<InputSource> input, | ||
| 1235 | } | 1222 | } |
| 1236 | } | 1223 | } |
| 1237 | if (this_obj_offset && | 1224 | if (this_obj_offset && |
| 1238 | - (this_obj.obj == objid) && | ||
| 1239 | - (this_obj.gen == generation)) | 1225 | + (this_obj.getObj() == objid) && |
| 1226 | + (this_obj.getGen() == generation)) | ||
| 1240 | { | 1227 | { |
| 1241 | // Well, we found endstream\nendobj within the space | 1228 | // Well, we found endstream\nendobj within the space |
| 1242 | // allowed for this object, so we're probably in good | 1229 | // allowed for this object, so we're probably in good |
| @@ -1330,7 +1317,7 @@ QPDF::readObjectAtOffset(bool try_recovery, | @@ -1330,7 +1317,7 @@ QPDF::readObjectAtOffset(bool try_recovery, | ||
| 1330 | { | 1317 | { |
| 1331 | // Try again after reconstructing xref table | 1318 | // Try again after reconstructing xref table |
| 1332 | reconstruct_xref(e); | 1319 | reconstruct_xref(e); |
| 1333 | - ObjGen og(exp_objid, exp_generation); | 1320 | + QPDFObjGen og(exp_objid, exp_generation); |
| 1334 | if (this->xref_table.count(og) && | 1321 | if (this->xref_table.count(og) && |
| 1335 | (this->xref_table[og].getType() == 1)) | 1322 | (this->xref_table[og].getType() == 1)) |
| 1336 | { | 1323 | { |
| @@ -1375,7 +1362,7 @@ QPDF::readObjectAtOffset(bool try_recovery, | @@ -1375,7 +1362,7 @@ QPDF::readObjectAtOffset(bool try_recovery, | ||
| 1375 | "expected endobj")); | 1362 | "expected endobj")); |
| 1376 | } | 1363 | } |
| 1377 | 1364 | ||
| 1378 | - ObjGen og(objid, generation); | 1365 | + QPDFObjGen og(objid, generation); |
| 1379 | if (! this->obj_cache.count(og)) | 1366 | if (! this->obj_cache.count(og)) |
| 1380 | { | 1367 | { |
| 1381 | // Store the object in the cache here so it gets cached | 1368 | // Store the object in the cache here so it gets cached |
| @@ -1425,7 +1412,7 @@ QPDF::resolve(int objid, int generation) | @@ -1425,7 +1412,7 @@ QPDF::resolve(int objid, int generation) | ||
| 1425 | // Check object cache before checking xref table. This allows us | 1412 | // Check object cache before checking xref table. This allows us |
| 1426 | // to insert things into the object cache that don't actually | 1413 | // to insert things into the object cache that don't actually |
| 1427 | // exist in the file. | 1414 | // exist in the file. |
| 1428 | - ObjGen og(objid, generation); | 1415 | + QPDFObjGen og(objid, generation); |
| 1429 | if (! this->obj_cache.count(og)) | 1416 | if (! this->obj_cache.count(og)) |
| 1430 | { | 1417 | { |
| 1431 | if (! this->xref_table.count(og)) | 1418 | if (! this->xref_table.count(og)) |
| @@ -1482,7 +1469,7 @@ QPDF::resolveObjectsInStream(int obj_stream_number) | @@ -1482,7 +1469,7 @@ QPDF::resolveObjectsInStream(int obj_stream_number) | ||
| 1482 | 1469 | ||
| 1483 | // For linearization data in the object, use the data from the | 1470 | // For linearization data in the object, use the data from the |
| 1484 | // object stream for the objects in the stream. | 1471 | // object stream for the objects in the stream. |
| 1485 | - ObjGen stream_og(obj_stream_number, 0); | 1472 | + QPDFObjGen stream_og(obj_stream_number, 0); |
| 1486 | qpdf_offset_t end_before_space = | 1473 | qpdf_offset_t end_before_space = |
| 1487 | this->obj_cache[stream_og].end_before_space; | 1474 | this->obj_cache[stream_og].end_before_space; |
| 1488 | qpdf_offset_t end_after_space = | 1475 | qpdf_offset_t end_after_space = |
| @@ -1548,7 +1535,7 @@ QPDF::resolveObjectsInStream(int obj_stream_number) | @@ -1548,7 +1535,7 @@ QPDF::resolveObjectsInStream(int obj_stream_number) | ||
| 1548 | iter != offsets.end(); ++iter) | 1535 | iter != offsets.end(); ++iter) |
| 1549 | { | 1536 | { |
| 1550 | int obj = (*iter).first; | 1537 | int obj = (*iter).first; |
| 1551 | - ObjGen og(obj, 0); | 1538 | + QPDFObjGen og(obj, 0); |
| 1552 | QPDFXRefEntry const& entry = this->xref_table[og]; | 1539 | QPDFXRefEntry const& entry = this->xref_table[og]; |
| 1553 | if ((entry.getType() == 2) && | 1540 | if ((entry.getType() == 2) && |
| 1554 | (entry.getObjStreamNumber() == obj_stream_number)) | 1541 | (entry.getObjStreamNumber() == obj_stream_number)) |
| @@ -1570,19 +1557,20 @@ QPDF::resolveObjectsInStream(int obj_stream_number) | @@ -1570,19 +1557,20 @@ QPDF::resolveObjectsInStream(int obj_stream_number) | ||
| 1570 | QPDFObjectHandle | 1557 | QPDFObjectHandle |
| 1571 | QPDF::makeIndirectObject(QPDFObjectHandle oh) | 1558 | QPDF::makeIndirectObject(QPDFObjectHandle oh) |
| 1572 | { | 1559 | { |
| 1573 | - ObjGen o1(0, 0); | 1560 | + QPDFObjGen o1(0, 0); |
| 1574 | if (! this->obj_cache.empty()) | 1561 | if (! this->obj_cache.empty()) |
| 1575 | { | 1562 | { |
| 1576 | o1 = (*(this->obj_cache.rbegin())).first; | 1563 | o1 = (*(this->obj_cache.rbegin())).first; |
| 1577 | } | 1564 | } |
| 1578 | - ObjGen o2 = (*(this->xref_table.rbegin())).first; | 1565 | + QPDFObjGen o2 = (*(this->xref_table.rbegin())).first; |
| 1579 | QTC::TC("qpdf", "QPDF indirect last obj from xref", | 1566 | QTC::TC("qpdf", "QPDF indirect last obj from xref", |
| 1580 | - (o2.obj > o1.obj) ? 1 : 0); | ||
| 1581 | - int max_objid = std::max(o1.obj, o2.obj); | ||
| 1582 | - ObjGen next(max_objid + 1, 0); | 1567 | + (o2.getObj() > o1.getObj()) ? 1 : 0); |
| 1568 | + int max_objid = std::max(o1.getObj(), o2.getObj()); | ||
| 1569 | + QPDFObjGen next(max_objid + 1, 0); | ||
| 1583 | this->obj_cache[next] = | 1570 | this->obj_cache[next] = |
| 1584 | ObjCache(QPDFObjectHandle::ObjAccessor::getObject(oh), -1, -1); | 1571 | ObjCache(QPDFObjectHandle::ObjAccessor::getObject(oh), -1, -1); |
| 1585 | - return QPDFObjectHandle::Factory::newIndirect(this, next.obj, next.gen); | 1572 | + return QPDFObjectHandle::Factory::newIndirect( |
| 1573 | + this, next.getObj(), next.getGen()); | ||
| 1586 | } | 1574 | } |
| 1587 | 1575 | ||
| 1588 | QPDFObjectHandle | 1576 | QPDFObjectHandle |
| @@ -1605,7 +1593,7 @@ QPDF::replaceObject(int objid, int generation, QPDFObjectHandle oh) | @@ -1605,7 +1593,7 @@ QPDF::replaceObject(int objid, int generation, QPDFObjectHandle oh) | ||
| 1605 | resolve(objid, generation); | 1593 | resolve(objid, generation); |
| 1606 | 1594 | ||
| 1607 | // Replace the object in the object cache | 1595 | // Replace the object in the object cache |
| 1608 | - ObjGen og(objid, generation); | 1596 | + QPDFObjGen og(objid, generation); |
| 1609 | this->obj_cache[og] = | 1597 | this->obj_cache[og] = |
| 1610 | ObjCache(QPDFObjectHandle::ObjAccessor::getObject(oh), -1, -1); | 1598 | ObjCache(QPDFObjectHandle::ObjAccessor::getObject(oh), -1, -1); |
| 1611 | } | 1599 | } |
| @@ -1653,8 +1641,8 @@ QPDF::copyForeignObject(QPDFObjectHandle foreign, bool allow_page) | @@ -1653,8 +1641,8 @@ QPDF::copyForeignObject(QPDFObjectHandle foreign, bool allow_page) | ||
| 1653 | 1641 | ||
| 1654 | // Make sure we have an object in this file for every referenced | 1642 | // Make sure we have an object in this file for every referenced |
| 1655 | // object in the old file. obj_copier.object_map maps foreign | 1643 | // object in the old file. obj_copier.object_map maps foreign |
| 1656 | - // ObjGen to local objects. For everything new that we have to | ||
| 1657 | - // copy, the local object will be a reservation, unless it is a | 1644 | + // QPDFObjGen to local objects. For everything new that we have |
| 1645 | + // to copy, the local object will be a reservation, unless it is a | ||
| 1658 | // stream, in which case the local object will already be a | 1646 | // stream, in which case the local object will already be a |
| 1659 | // stream. | 1647 | // stream. |
| 1660 | reserveObjects(foreign, obj_copier, true); | 1648 | reserveObjects(foreign, obj_copier, true); |
| @@ -1675,14 +1663,14 @@ QPDF::copyForeignObject(QPDFObjectHandle foreign, bool allow_page) | @@ -1675,14 +1663,14 @@ QPDF::copyForeignObject(QPDFObjectHandle foreign, bool allow_page) | ||
| 1675 | replaceForeignIndirectObjects(to_copy, obj_copier, true); | 1663 | replaceForeignIndirectObjects(to_copy, obj_copier, true); |
| 1676 | if (! to_copy.isStream()) | 1664 | if (! to_copy.isStream()) |
| 1677 | { | 1665 | { |
| 1678 | - ObjGen og(to_copy.getObjectID(), to_copy.getGeneration()); | 1666 | + QPDFObjGen og(to_copy.getObjectID(), to_copy.getGeneration()); |
| 1679 | replaceReserved(obj_copier.object_map[og], copy); | 1667 | replaceReserved(obj_copier.object_map[og], copy); |
| 1680 | } | 1668 | } |
| 1681 | } | 1669 | } |
| 1682 | obj_copier.to_copy.clear(); | 1670 | obj_copier.to_copy.clear(); |
| 1683 | 1671 | ||
| 1684 | - return obj_copier.object_map[ObjGen(foreign.getObjectID(), | ||
| 1685 | - foreign.getGeneration())]; | 1672 | + return obj_copier.object_map[QPDFObjGen(foreign.getObjectID(), |
| 1673 | + foreign.getGeneration())]; | ||
| 1686 | } | 1674 | } |
| 1687 | 1675 | ||
| 1688 | void | 1676 | void |
| @@ -1709,7 +1697,7 @@ QPDF::reserveObjects(QPDFObjectHandle foreign, ObjCopier& obj_copier, | @@ -1709,7 +1697,7 @@ QPDF::reserveObjects(QPDFObjectHandle foreign, ObjCopier& obj_copier, | ||
| 1709 | 1697 | ||
| 1710 | if (foreign.isIndirect()) | 1698 | if (foreign.isIndirect()) |
| 1711 | { | 1699 | { |
| 1712 | - ObjGen foreign_og(foreign.getObjectID(), foreign.getGeneration()); | 1700 | + QPDFObjGen foreign_og(foreign.getObjectID(), foreign.getGeneration()); |
| 1713 | if (obj_copier.visiting.find(foreign_og) != obj_copier.visiting.end()) | 1701 | if (obj_copier.visiting.find(foreign_og) != obj_copier.visiting.end()) |
| 1714 | { | 1702 | { |
| 1715 | QTC::TC("qpdf", "QPDF loop reserving objects"); | 1703 | QTC::TC("qpdf", "QPDF loop reserving objects"); |
| @@ -1717,7 +1705,7 @@ QPDF::reserveObjects(QPDFObjectHandle foreign, ObjCopier& obj_copier, | @@ -1717,7 +1705,7 @@ QPDF::reserveObjects(QPDFObjectHandle foreign, ObjCopier& obj_copier, | ||
| 1717 | } | 1705 | } |
| 1718 | QTC::TC("qpdf", "QPDF copy indirect"); | 1706 | QTC::TC("qpdf", "QPDF copy indirect"); |
| 1719 | obj_copier.visiting.insert(foreign_og); | 1707 | obj_copier.visiting.insert(foreign_og); |
| 1720 | - std::map<ObjGen, QPDFObjectHandle>::iterator mapping = | 1708 | + std::map<QPDFObjGen, QPDFObjectHandle>::iterator mapping = |
| 1721 | obj_copier.object_map.find(foreign_og); | 1709 | obj_copier.object_map.find(foreign_og); |
| 1722 | if (mapping == obj_copier.object_map.end()) | 1710 | if (mapping == obj_copier.object_map.end()) |
| 1723 | { | 1711 | { |
| @@ -1762,7 +1750,7 @@ QPDF::reserveObjects(QPDFObjectHandle foreign, ObjCopier& obj_copier, | @@ -1762,7 +1750,7 @@ QPDF::reserveObjects(QPDFObjectHandle foreign, ObjCopier& obj_copier, | ||
| 1762 | 1750 | ||
| 1763 | if (foreign.isIndirect()) | 1751 | if (foreign.isIndirect()) |
| 1764 | { | 1752 | { |
| 1765 | - ObjGen foreign_og(foreign.getObjectID(), foreign.getGeneration()); | 1753 | + QPDFObjGen foreign_og(foreign.getObjectID(), foreign.getGeneration()); |
| 1766 | obj_copier.visiting.erase(foreign_og); | 1754 | obj_copier.visiting.erase(foreign_og); |
| 1767 | } | 1755 | } |
| 1768 | } | 1756 | } |
| @@ -1775,8 +1763,8 @@ QPDF::replaceForeignIndirectObjects( | @@ -1775,8 +1763,8 @@ QPDF::replaceForeignIndirectObjects( | ||
| 1775 | if ((! top) && foreign.isIndirect()) | 1763 | if ((! top) && foreign.isIndirect()) |
| 1776 | { | 1764 | { |
| 1777 | QTC::TC("qpdf", "QPDF replace indirect"); | 1765 | QTC::TC("qpdf", "QPDF replace indirect"); |
| 1778 | - ObjGen foreign_og(foreign.getObjectID(), foreign.getGeneration()); | ||
| 1779 | - std::map<ObjGen, QPDFObjectHandle>::iterator mapping = | 1766 | + QPDFObjGen foreign_og(foreign.getObjectID(), foreign.getGeneration()); |
| 1767 | + std::map<QPDFObjGen, QPDFObjectHandle>::iterator mapping = | ||
| 1780 | obj_copier.object_map.find(foreign_og); | 1768 | obj_copier.object_map.find(foreign_og); |
| 1781 | if (mapping == obj_copier.object_map.end()) | 1769 | if (mapping == obj_copier.object_map.end()) |
| 1782 | { | 1770 | { |
| @@ -1819,7 +1807,7 @@ QPDF::replaceForeignIndirectObjects( | @@ -1819,7 +1807,7 @@ QPDF::replaceForeignIndirectObjects( | ||
| 1819 | else if (foreign.isStream()) | 1807 | else if (foreign.isStream()) |
| 1820 | { | 1808 | { |
| 1821 | QTC::TC("qpdf", "QPDF replace stream"); | 1809 | QTC::TC("qpdf", "QPDF replace stream"); |
| 1822 | - ObjGen foreign_og(foreign.getObjectID(), foreign.getGeneration()); | 1810 | + QPDFObjGen foreign_og(foreign.getObjectID(), foreign.getGeneration()); |
| 1823 | result = obj_copier.object_map[foreign_og]; | 1811 | result = obj_copier.object_map[foreign_og]; |
| 1824 | result.assertStream(); | 1812 | result.assertStream(); |
| 1825 | QPDFObjectHandle dict = result.getDict(); | 1813 | QPDFObjectHandle dict = result.getDict(); |
| @@ -1838,7 +1826,7 @@ QPDF::replaceForeignIndirectObjects( | @@ -1838,7 +1826,7 @@ QPDF::replaceForeignIndirectObjects( | ||
| 1838 | this->copied_stream_data_provider = new CopiedStreamDataProvider(); | 1826 | this->copied_stream_data_provider = new CopiedStreamDataProvider(); |
| 1839 | this->copied_streams = this->copied_stream_data_provider; | 1827 | this->copied_streams = this->copied_stream_data_provider; |
| 1840 | } | 1828 | } |
| 1841 | - ObjGen local_og(result.getObjectID(), result.getGeneration()); | 1829 | + QPDFObjGen local_og(result.getObjectID(), result.getGeneration()); |
| 1842 | this->copied_stream_data_provider->registerForeignStream( | 1830 | this->copied_stream_data_provider->registerForeignStream( |
| 1843 | local_og, foreign); | 1831 | local_og, foreign); |
| 1844 | result.replaceStreamData(this->copied_streams, | 1832 | result.replaceStreamData(this->copied_streams, |
| @@ -1867,8 +1855,8 @@ QPDF::swapObjects(int objid1, int generation1, int objid2, int generation2) | @@ -1867,8 +1855,8 @@ QPDF::swapObjects(int objid1, int generation1, int objid2, int generation2) | ||
| 1867 | // cache. | 1855 | // cache. |
| 1868 | resolve(objid1, generation1); | 1856 | resolve(objid1, generation1); |
| 1869 | resolve(objid2, generation2); | 1857 | resolve(objid2, generation2); |
| 1870 | - ObjGen og1(objid1, generation1); | ||
| 1871 | - ObjGen og2(objid2, generation2); | 1858 | + QPDFObjGen og1(objid1, generation1); |
| 1859 | + QPDFObjGen og2(objid2, generation2); | ||
| 1872 | ObjCache t = this->obj_cache[og1]; | 1860 | ObjCache t = this->obj_cache[og1]; |
| 1873 | this->obj_cache[og1] = this->obj_cache[og2]; | 1861 | this->obj_cache[og1] = this->obj_cache[og2]; |
| 1874 | this->obj_cache[og2] = t; | 1862 | this->obj_cache[og2] = t; |
| @@ -1925,15 +1913,15 @@ QPDF::getRoot() | @@ -1925,15 +1913,15 @@ QPDF::getRoot() | ||
| 1925 | void | 1913 | void |
| 1926 | QPDF::getObjectStreamData(std::map<int, int>& omap) | 1914 | QPDF::getObjectStreamData(std::map<int, int>& omap) |
| 1927 | { | 1915 | { |
| 1928 | - for (std::map<ObjGen, QPDFXRefEntry>::iterator iter = | 1916 | + for (std::map<QPDFObjGen, QPDFXRefEntry>::iterator iter = |
| 1929 | this->xref_table.begin(); | 1917 | this->xref_table.begin(); |
| 1930 | iter != this->xref_table.end(); ++iter) | 1918 | iter != this->xref_table.end(); ++iter) |
| 1931 | { | 1919 | { |
| 1932 | - ObjGen const& og = (*iter).first; | 1920 | + QPDFObjGen const& og = (*iter).first; |
| 1933 | QPDFXRefEntry const& entry = (*iter).second; | 1921 | QPDFXRefEntry const& entry = (*iter).second; |
| 1934 | if (entry.getType() == 2) | 1922 | if (entry.getType() == 2) |
| 1935 | { | 1923 | { |
| 1936 | - omap[og.obj] = entry.getObjStreamNumber(); | 1924 | + omap[og.getObj()] = entry.getObjStreamNumber(); |
| 1937 | } | 1925 | } |
| 1938 | } | 1926 | } |
| 1939 | } | 1927 | } |
| @@ -2114,7 +2102,7 @@ QPDF::findAttachmentStreams() | @@ -2114,7 +2102,7 @@ QPDF::findAttachmentStreams() | ||
| 2114 | { | 2102 | { |
| 2115 | QPDFObjectHandle stream = item.getKey("/EF").getKey("/F"); | 2103 | QPDFObjectHandle stream = item.getKey("/EF").getKey("/F"); |
| 2116 | this->attachment_streams.insert( | 2104 | this->attachment_streams.insert( |
| 2117 | - ObjGen(stream.getObjectID(), stream.getGeneration())); | 2105 | + QPDFObjGen(stream.getObjectID(), stream.getGeneration())); |
| 2118 | } | 2106 | } |
| 2119 | } | 2107 | } |
| 2120 | } | 2108 | } |
libqpdf/QPDFObjGen.cc
0 โ 100644
| 1 | +#include <qpdf/QPDFObjGen.hh> | ||
| 2 | + | ||
| 3 | +QPDFObjGen::QPDFObjGen(int o = 0, int g = 0) : | ||
| 4 | + obj(o), | ||
| 5 | + gen(g) | ||
| 6 | +{ | ||
| 7 | +} | ||
| 8 | + | ||
| 9 | +bool | ||
| 10 | +QPDFObjGen::operator<(QPDFObjGen const& rhs) const | ||
| 11 | +{ | ||
| 12 | + return ((this->obj < rhs.obj) || | ||
| 13 | + ((this->obj == rhs.obj) && (this->gen < rhs.gen))); | ||
| 14 | +} | ||
| 15 | + | ||
| 16 | +int | ||
| 17 | +QPDFObjGen::getObj() const | ||
| 18 | +{ | ||
| 19 | + return this->obj; | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +int | ||
| 23 | +QPDFObjGen::getGen() const | ||
| 24 | +{ | ||
| 25 | + return this->gen; | ||
| 26 | +} |
libqpdf/QPDF_encryption.cc
| @@ -1202,7 +1202,7 @@ QPDF::decryptStream(Pipeline*& pipeline, int objid, int generation, | @@ -1202,7 +1202,7 @@ QPDF::decryptStream(Pipeline*& pipeline, int objid, int generation, | ||
| 1202 | else | 1202 | else |
| 1203 | { | 1203 | { |
| 1204 | if (this->attachment_streams.count( | 1204 | if (this->attachment_streams.count( |
| 1205 | - ObjGen(objid, generation)) > 0) | 1205 | + QPDFObjGen(objid, generation)) > 0) |
| 1206 | { | 1206 | { |
| 1207 | method = this->cf_file; | 1207 | method = this->cf_file; |
| 1208 | } | 1208 | } |
libqpdf/QPDF_linearization.cc
| @@ -312,7 +312,7 @@ QPDF::readHintStream(Pipeline& pl, qpdf_offset_t offset, size_t length) | @@ -312,7 +312,7 @@ QPDF::readHintStream(Pipeline& pl, qpdf_offset_t offset, size_t length) | ||
| 312 | int gen; | 312 | int gen; |
| 313 | QPDFObjectHandle H = readObjectAtOffset( | 313 | QPDFObjectHandle H = readObjectAtOffset( |
| 314 | false, offset, "linearization hint stream", -1, 0, obj, gen); | 314 | false, offset, "linearization hint stream", -1, 0, obj, gen); |
| 315 | - ObjCache& oc = this->obj_cache[ObjGen(obj, gen)]; | 315 | + ObjCache& oc = this->obj_cache[QPDFObjGen(obj, gen)]; |
| 316 | qpdf_offset_t min_end_offset = oc.end_before_space; | 316 | qpdf_offset_t min_end_offset = oc.end_before_space; |
| 317 | qpdf_offset_t max_end_offset = oc.end_after_space; | 317 | qpdf_offset_t max_end_offset = oc.end_after_space; |
| 318 | if (! H.isStream()) | 318 | if (! H.isStream()) |
| @@ -337,8 +337,8 @@ QPDF::readHintStream(Pipeline& pl, qpdf_offset_t offset, size_t length) | @@ -337,8 +337,8 @@ QPDF::readHintStream(Pipeline& pl, qpdf_offset_t offset, size_t length) | ||
| 337 | // Force resolution | 337 | // Force resolution |
| 338 | (void) length_obj.getIntValue(); | 338 | (void) length_obj.getIntValue(); |
| 339 | ObjCache& oc = this->obj_cache | 339 | ObjCache& oc = this->obj_cache |
| 340 | - [ObjGen(length_obj.getObjectID(), | ||
| 341 | - length_obj.getGeneration())]; | 340 | + [QPDFObjGen(length_obj.getObjectID(), |
| 341 | + length_obj.getGeneration())]; | ||
| 342 | min_end_offset = oc.end_before_space; | 342 | min_end_offset = oc.end_before_space; |
| 343 | max_end_offset = oc.end_after_space; | 343 | max_end_offset = oc.end_after_space; |
| 344 | } | 344 | } |
| @@ -499,7 +499,7 @@ QPDF::checkLinearizationInternal() | @@ -499,7 +499,7 @@ QPDF::checkLinearizationInternal() | ||
| 499 | for (int i = 0; i < npages; ++i) | 499 | for (int i = 0; i < npages; ++i) |
| 500 | { | 500 | { |
| 501 | QPDFObjectHandle const& page = pages[i]; | 501 | QPDFObjectHandle const& page = pages[i]; |
| 502 | - ObjGen og(page.getObjectID(), page.getGeneration()); | 502 | + QPDFObjGen og(page.getObjectID(), page.getGeneration()); |
| 503 | if (this->xref_table[og].getType() == 2) | 503 | if (this->xref_table[og].getType() == 2) |
| 504 | { | 504 | { |
| 505 | errors.push_back("page dictionary for page " + | 505 | errors.push_back("page dictionary for page " + |
| @@ -550,15 +550,15 @@ QPDF::checkLinearizationInternal() | @@ -550,15 +550,15 @@ QPDF::checkLinearizationInternal() | ||
| 550 | // uncompressed. | 550 | // uncompressed. |
| 551 | { // local scope | 551 | { // local scope |
| 552 | std::map<int, int> object_stream_data; | 552 | std::map<int, int> object_stream_data; |
| 553 | - for (std::map<ObjGen, QPDFXRefEntry>::const_iterator iter = | 553 | + for (std::map<QPDFObjGen, QPDFXRefEntry>::const_iterator iter = |
| 554 | this->xref_table.begin(); | 554 | this->xref_table.begin(); |
| 555 | iter != this->xref_table.end(); ++iter) | 555 | iter != this->xref_table.end(); ++iter) |
| 556 | { | 556 | { |
| 557 | - ObjGen const& og = (*iter).first; | 557 | + QPDFObjGen const& og = (*iter).first; |
| 558 | QPDFXRefEntry const& entry = (*iter).second; | 558 | QPDFXRefEntry const& entry = (*iter).second; |
| 559 | if (entry.getType() == 2) | 559 | if (entry.getType() == 2) |
| 560 | { | 560 | { |
| 561 | - object_stream_data[og.obj] = entry.getObjStreamNumber(); | 561 | + object_stream_data[og.getObj()] = entry.getObjStreamNumber(); |
| 562 | } | 562 | } |
| 563 | } | 563 | } |
| 564 | optimize(object_stream_data, false); | 564 | optimize(object_stream_data, false); |
| @@ -582,7 +582,7 @@ QPDF::checkLinearizationInternal() | @@ -582,7 +582,7 @@ QPDF::checkLinearizationInternal() | ||
| 582 | for (std::vector<QPDFObjectHandle>::iterator iter = this->part6.begin(); | 582 | for (std::vector<QPDFObjectHandle>::iterator iter = this->part6.begin(); |
| 583 | iter != this->part6.end(); ++iter) | 583 | iter != this->part6.end(); ++iter) |
| 584 | { | 584 | { |
| 585 | - ObjGen og((*iter).getObjectID(), (*iter).getGeneration()); | 585 | + QPDFObjGen og((*iter).getObjectID(), (*iter).getGeneration()); |
| 586 | // All objects have to have been dereferenced to be classified. | 586 | // All objects have to have been dereferenced to be classified. |
| 587 | assert(this->obj_cache.count(og) > 0); | 587 | assert(this->obj_cache.count(og) > 0); |
| 588 | ObjCache const& oc = this->obj_cache[og]; | 588 | ObjCache const& oc = this->obj_cache[og]; |
| @@ -637,12 +637,12 @@ qpdf_offset_t | @@ -637,12 +637,12 @@ qpdf_offset_t | ||
| 637 | QPDF::maxEnd(ObjUser const& ou) | 637 | QPDF::maxEnd(ObjUser const& ou) |
| 638 | { | 638 | { |
| 639 | assert(this->obj_user_to_objects.count(ou) > 0); | 639 | assert(this->obj_user_to_objects.count(ou) > 0); |
| 640 | - std::set<ObjGen> const& ogs = this->obj_user_to_objects[ou]; | 640 | + std::set<QPDFObjGen> const& ogs = this->obj_user_to_objects[ou]; |
| 641 | qpdf_offset_t end = 0; | 641 | qpdf_offset_t end = 0; |
| 642 | - for (std::set<ObjGen>::const_iterator iter = ogs.begin(); | 642 | + for (std::set<QPDFObjGen>::const_iterator iter = ogs.begin(); |
| 643 | iter != ogs.end(); ++iter) | 643 | iter != ogs.end(); ++iter) |
| 644 | { | 644 | { |
| 645 | - ObjGen const& og = *iter; | 645 | + QPDFObjGen const& og = *iter; |
| 646 | assert(this->obj_cache.count(og) > 0); | 646 | assert(this->obj_cache.count(og) > 0); |
| 647 | end = std::max(end, this->obj_cache[og].end_after_space); | 647 | end = std::max(end, this->obj_cache[og].end_after_space); |
| 648 | } | 648 | } |
| @@ -650,7 +650,7 @@ QPDF::maxEnd(ObjUser const& ou) | @@ -650,7 +650,7 @@ QPDF::maxEnd(ObjUser const& ou) | ||
| 650 | } | 650 | } |
| 651 | 651 | ||
| 652 | qpdf_offset_t | 652 | qpdf_offset_t |
| 653 | -QPDF::getLinearizationOffset(ObjGen const& og) | 653 | +QPDF::getLinearizationOffset(QPDFObjGen const& og) |
| 654 | { | 654 | { |
| 655 | QPDFXRefEntry entry = this->xref_table[og]; | 655 | QPDFXRefEntry entry = this->xref_table[og]; |
| 656 | qpdf_offset_t result = 0; | 656 | qpdf_offset_t result = 0; |
| @@ -663,7 +663,8 @@ QPDF::getLinearizationOffset(ObjGen const& og) | @@ -663,7 +663,8 @@ QPDF::getLinearizationOffset(ObjGen const& og) | ||
| 663 | case 2: | 663 | case 2: |
| 664 | // For compressed objects, return the offset of the object | 664 | // For compressed objects, return the offset of the object |
| 665 | // stream that contains them. | 665 | // stream that contains them. |
| 666 | - result = getLinearizationOffset(ObjGen(entry.getObjStreamNumber(), 0)); | 666 | + result = getLinearizationOffset( |
| 667 | + QPDFObjGen(entry.getObjStreamNumber(), 0)); | ||
| 667 | break; | 668 | break; |
| 668 | 669 | ||
| 669 | default: | 670 | default: |
| @@ -685,7 +686,7 @@ QPDF::getUncompressedObject(QPDFObjectHandle& obj, | @@ -685,7 +686,7 @@ QPDF::getUncompressedObject(QPDFObjectHandle& obj, | ||
| 685 | else | 686 | else |
| 686 | { | 687 | { |
| 687 | int repl = (*(object_stream_data.find(obj.getObjectID()))).second; | 688 | int repl = (*(object_stream_data.find(obj.getObjectID()))).second; |
| 688 | - return objGenToIndirect(ObjGen(repl, 0)); | 689 | + return objGenToIndirect(QPDFObjGen(repl, 0)); |
| 689 | } | 690 | } |
| 690 | } | 691 | } |
| 691 | 692 | ||
| @@ -696,7 +697,7 @@ QPDF::lengthNextN(int first_object, int n, | @@ -696,7 +697,7 @@ QPDF::lengthNextN(int first_object, int n, | ||
| 696 | int length = 0; | 697 | int length = 0; |
| 697 | for (int i = 0; i < n; ++i) | 698 | for (int i = 0; i < n; ++i) |
| 698 | { | 699 | { |
| 699 | - ObjGen og(first_object + i, 0); | 700 | + QPDFObjGen og(first_object + i, 0); |
| 700 | if (this->xref_table.count(og) == 0) | 701 | if (this->xref_table.count(og) == 0) |
| 701 | { | 702 | { |
| 702 | errors.push_back( | 703 | errors.push_back( |
| @@ -739,7 +740,7 @@ QPDF::checkHPageOffset(std::list<std::string>& errors, | @@ -739,7 +740,7 @@ QPDF::checkHPageOffset(std::list<std::string>& errors, | ||
| 739 | unsigned int npages = pages.size(); | 740 | unsigned int npages = pages.size(); |
| 740 | int table_offset = adjusted_offset( | 741 | int table_offset = adjusted_offset( |
| 741 | this->page_offset_hints.first_page_offset); | 742 | this->page_offset_hints.first_page_offset); |
| 742 | - ObjGen first_page_og(pages[0].getObjectID(), pages[0].getGeneration()); | 743 | + QPDFObjGen first_page_og(pages[0].getObjectID(), pages[0].getGeneration()); |
| 743 | assert(this->xref_table.count(first_page_og) > 0); | 744 | assert(this->xref_table.count(first_page_og) > 0); |
| 744 | int offset = getLinearizationOffset(first_page_og); | 745 | int offset = getLinearizationOffset(first_page_og); |
| 745 | if (table_offset != offset) | 746 | if (table_offset != offset) |
| @@ -749,9 +750,9 @@ QPDF::checkHPageOffset(std::list<std::string>& errors, | @@ -749,9 +750,9 @@ QPDF::checkHPageOffset(std::list<std::string>& errors, | ||
| 749 | 750 | ||
| 750 | for (unsigned int pageno = 0; pageno < npages; ++pageno) | 751 | for (unsigned int pageno = 0; pageno < npages; ++pageno) |
| 751 | { | 752 | { |
| 752 | - ObjGen page_og(pages[pageno].getObjectID(), | ||
| 753 | - pages[pageno].getGeneration()); | ||
| 754 | - int first_object = page_og.obj; | 753 | + QPDFObjGen page_og(pages[pageno].getObjectID(), |
| 754 | + pages[pageno].getGeneration()); | ||
| 755 | + int first_object = page_og.getObj(); | ||
| 755 | assert(this->xref_table.count(page_og) > 0); | 756 | assert(this->xref_table.count(page_og) > 0); |
| 756 | offset = getLinearizationOffset(page_og); | 757 | offset = getLinearizationOffset(page_og); |
| 757 | 758 | ||
| @@ -906,7 +907,7 @@ QPDF::checkHSharedObject(std::list<std::string>& errors, | @@ -906,7 +907,7 @@ QPDF::checkHSharedObject(std::list<std::string>& errors, | ||
| 906 | 907 | ||
| 907 | cur_object = so.first_shared_obj; | 908 | cur_object = so.first_shared_obj; |
| 908 | 909 | ||
| 909 | - ObjGen og(cur_object, 0); | 910 | + QPDFObjGen og(cur_object, 0); |
| 910 | assert(this->xref_table.count(og) > 0); | 911 | assert(this->xref_table.count(og) > 0); |
| 911 | int offset = getLinearizationOffset(og); | 912 | int offset = getLinearizationOffset(og); |
| 912 | int h_offset = adjusted_offset(so.first_shared_offset); | 913 | int h_offset = adjusted_offset(so.first_shared_offset); |
| @@ -960,7 +961,7 @@ QPDF::checkHOutlines(std::list<std::string>& warnings) | @@ -960,7 +961,7 @@ QPDF::checkHOutlines(std::list<std::string>& warnings) | ||
| 960 | { | 961 | { |
| 961 | // Check length and offset. Acrobat gets these wrong. | 962 | // Check length and offset. Acrobat gets these wrong. |
| 962 | QPDFObjectHandle outlines = getRoot().getKey("/Outlines"); | 963 | QPDFObjectHandle outlines = getRoot().getKey("/Outlines"); |
| 963 | - ObjGen og(outlines.getObjectID(), outlines.getGeneration()); | 964 | + QPDFObjGen og(outlines.getObjectID(), outlines.getGeneration()); |
| 964 | assert(this->xref_table.count(og) > 0); | 965 | assert(this->xref_table.count(og) > 0); |
| 965 | int offset = getLinearizationOffset(og); | 966 | int offset = getLinearizationOffset(og); |
| 966 | ObjUser ou(ObjUser::ou_root_key, "/Outlines"); | 967 | ObjUser ou(ObjUser::ou_root_key, "/Outlines"); |
| @@ -1170,9 +1171,9 @@ QPDF::dumpHGeneric(HGeneric& t) | @@ -1170,9 +1171,9 @@ QPDF::dumpHGeneric(HGeneric& t) | ||
| 1170 | } | 1171 | } |
| 1171 | 1172 | ||
| 1172 | QPDFObjectHandle | 1173 | QPDFObjectHandle |
| 1173 | -QPDF::objGenToIndirect(ObjGen const& og) | 1174 | +QPDF::objGenToIndirect(QPDFObjGen const& og) |
| 1174 | { | 1175 | { |
| 1175 | - return getObjectByID(og.obj, og.gen); | 1176 | + return getObjectByID(og.getObj(), og.getGen()); |
| 1176 | } | 1177 | } |
| 1177 | 1178 | ||
| 1178 | void | 1179 | void |
| @@ -1280,22 +1281,22 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1280,22 +1281,22 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1280 | open_document_keys.insert("/OpenAction"); | 1281 | open_document_keys.insert("/OpenAction"); |
| 1281 | open_document_keys.insert("/AcroForm"); | 1282 | open_document_keys.insert("/AcroForm"); |
| 1282 | 1283 | ||
| 1283 | - std::set<ObjGen> lc_open_document; | ||
| 1284 | - std::set<ObjGen> lc_first_page_private; | ||
| 1285 | - std::set<ObjGen> lc_first_page_shared; | ||
| 1286 | - std::set<ObjGen> lc_other_page_private; | ||
| 1287 | - std::set<ObjGen> lc_other_page_shared; | ||
| 1288 | - std::set<ObjGen> lc_thumbnail_private; | ||
| 1289 | - std::set<ObjGen> lc_thumbnail_shared; | ||
| 1290 | - std::set<ObjGen> lc_other; | ||
| 1291 | - std::set<ObjGen> lc_outlines; | ||
| 1292 | - std::set<ObjGen> lc_root; | ||
| 1293 | - | ||
| 1294 | - for (std::map<ObjGen, std::set<ObjUser> >::iterator oiter = | 1284 | + std::set<QPDFObjGen> lc_open_document; |
| 1285 | + std::set<QPDFObjGen> lc_first_page_private; | ||
| 1286 | + std::set<QPDFObjGen> lc_first_page_shared; | ||
| 1287 | + std::set<QPDFObjGen> lc_other_page_private; | ||
| 1288 | + std::set<QPDFObjGen> lc_other_page_shared; | ||
| 1289 | + std::set<QPDFObjGen> lc_thumbnail_private; | ||
| 1290 | + std::set<QPDFObjGen> lc_thumbnail_shared; | ||
| 1291 | + std::set<QPDFObjGen> lc_other; | ||
| 1292 | + std::set<QPDFObjGen> lc_outlines; | ||
| 1293 | + std::set<QPDFObjGen> lc_root; | ||
| 1294 | + | ||
| 1295 | + for (std::map<QPDFObjGen, std::set<ObjUser> >::iterator oiter = | ||
| 1295 | this->object_to_obj_users.begin(); | 1296 | this->object_to_obj_users.begin(); |
| 1296 | oiter != this->object_to_obj_users.end(); ++oiter) | 1297 | oiter != this->object_to_obj_users.end(); ++oiter) |
| 1297 | { | 1298 | { |
| 1298 | - ObjGen const& og = (*oiter).first; | 1299 | + QPDFObjGen const& og = (*oiter).first; |
| 1299 | 1300 | ||
| 1300 | std::set<ObjUser>& ous = (*oiter).second; | 1301 | std::set<ObjUser>& ous = (*oiter).second; |
| 1301 | 1302 | ||
| @@ -1414,10 +1415,10 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1414,10 +1415,10 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1414 | // optimizing this by going straight into the vector, we'll leave | 1415 | // optimizing this by going straight into the vector, we'll leave |
| 1415 | // these phases separate for now. That way, this section can be | 1416 | // these phases separate for now. That way, this section can be |
| 1416 | // concerned only with ordering, and the above section can be | 1417 | // concerned only with ordering, and the above section can be |
| 1417 | - // considered only with categorization. Note that sets of ObjGens | ||
| 1418 | - // are sorted by ObjGen. In a linearized file, objects appear in | ||
| 1419 | - // sequence with the possible exception of hints tables which we | ||
| 1420 | - // won't see here anyway. That means that running | 1418 | + // considered only with categorization. Note that sets of |
| 1419 | + // QPDFObjGens are sorted by QPDFObjGen. In a linearized file, | ||
| 1420 | + // objects appear in sequence with the possible exception of hints | ||
| 1421 | + // tables which we won't see here anyway. That means that running | ||
| 1421 | // calculateLinearizationData() on a linearized file should give | 1422 | // calculateLinearizationData() on a linearized file should give |
| 1422 | // results identical to the original file ordering. | 1423 | // results identical to the original file ordering. |
| 1423 | 1424 | ||
| @@ -1452,7 +1453,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1452,7 +1453,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1452 | 1453 | ||
| 1453 | assert(lc_root.size() == 1); | 1454 | assert(lc_root.size() == 1); |
| 1454 | this->part4.push_back(objGenToIndirect(*(lc_root.begin()))); | 1455 | this->part4.push_back(objGenToIndirect(*(lc_root.begin()))); |
| 1455 | - for (std::set<ObjGen>::iterator iter = lc_open_document.begin(); | 1456 | + for (std::set<QPDFObjGen>::iterator iter = lc_open_document.begin(); |
| 1456 | iter != lc_open_document.end(); ++iter) | 1457 | iter != lc_open_document.end(); ++iter) |
| 1457 | { | 1458 | { |
| 1458 | this->part4.push_back(objGenToIndirect(*iter)); | 1459 | this->part4.push_back(objGenToIndirect(*iter)); |
| @@ -1465,7 +1466,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1465,7 +1466,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1465 | // will do the same. | 1466 | // will do the same. |
| 1466 | 1467 | ||
| 1467 | // First, place the actual first page object itself. | 1468 | // First, place the actual first page object itself. |
| 1468 | - ObjGen first_page_og(pages[0].getObjectID(), pages[0].getGeneration()); | 1469 | + QPDFObjGen first_page_og(pages[0].getObjectID(), pages[0].getGeneration()); |
| 1469 | if (! lc_first_page_private.count(first_page_og)) | 1470 | if (! lc_first_page_private.count(first_page_og)) |
| 1470 | { | 1471 | { |
| 1471 | throw std::logic_error( | 1472 | throw std::logic_error( |
| @@ -1481,13 +1482,13 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1481,13 +1482,13 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1481 | // groups private and shared objects contiguously for the sake of | 1482 | // groups private and shared objects contiguously for the sake of |
| 1482 | // hint tables. | 1483 | // hint tables. |
| 1483 | 1484 | ||
| 1484 | - for (std::set<ObjGen>::iterator iter = lc_first_page_private.begin(); | 1485 | + for (std::set<QPDFObjGen>::iterator iter = lc_first_page_private.begin(); |
| 1485 | iter != lc_first_page_private.end(); ++iter) | 1486 | iter != lc_first_page_private.end(); ++iter) |
| 1486 | { | 1487 | { |
| 1487 | this->part6.push_back(objGenToIndirect(*iter)); | 1488 | this->part6.push_back(objGenToIndirect(*iter)); |
| 1488 | } | 1489 | } |
| 1489 | 1490 | ||
| 1490 | - for (std::set<ObjGen>::iterator iter = lc_first_page_shared.begin(); | 1491 | + for (std::set<QPDFObjGen>::iterator iter = lc_first_page_shared.begin(); |
| 1491 | iter != lc_first_page_shared.end(); ++iter) | 1492 | iter != lc_first_page_shared.end(); ++iter) |
| 1492 | { | 1493 | { |
| 1493 | this->part6.push_back(objGenToIndirect(*iter)); | 1494 | this->part6.push_back(objGenToIndirect(*iter)); |
| @@ -1514,7 +1515,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1514,7 +1515,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1514 | { | 1515 | { |
| 1515 | // Place this page's page object | 1516 | // Place this page's page object |
| 1516 | 1517 | ||
| 1517 | - ObjGen page_og(pages[i].getObjectID(), pages[i].getGeneration()); | 1518 | + QPDFObjGen page_og(pages[i].getObjectID(), pages[i].getGeneration()); |
| 1518 | if (! lc_other_page_private.count(page_og)) | 1519 | if (! lc_other_page_private.count(page_og)) |
| 1519 | { | 1520 | { |
| 1520 | throw std::logic_error( | 1521 | throw std::logic_error( |
| @@ -1532,11 +1533,11 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1532,11 +1533,11 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1532 | 1533 | ||
| 1533 | ObjUser ou(ObjUser::ou_page, i); | 1534 | ObjUser ou(ObjUser::ou_page, i); |
| 1534 | assert(this->obj_user_to_objects.count(ou) > 0); | 1535 | assert(this->obj_user_to_objects.count(ou) > 0); |
| 1535 | - std::set<ObjGen> ogs = this->obj_user_to_objects[ou]; | ||
| 1536 | - for (std::set<ObjGen>::iterator iter = ogs.begin(); | 1536 | + std::set<QPDFObjGen> ogs = this->obj_user_to_objects[ou]; |
| 1537 | + for (std::set<QPDFObjGen>::iterator iter = ogs.begin(); | ||
| 1537 | iter != ogs.end(); ++iter) | 1538 | iter != ogs.end(); ++iter) |
| 1538 | { | 1539 | { |
| 1539 | - ObjGen const& og = (*iter); | 1540 | + QPDFObjGen const& og = (*iter); |
| 1540 | if (lc_other_page_private.count(og)) | 1541 | if (lc_other_page_private.count(og)) |
| 1541 | { | 1542 | { |
| 1542 | lc_other_page_private.erase(og); | 1543 | lc_other_page_private.erase(og); |
| @@ -1557,7 +1558,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1557,7 +1558,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1557 | // Part 8: other pages' shared objects | 1558 | // Part 8: other pages' shared objects |
| 1558 | 1559 | ||
| 1559 | // Order is unimportant. | 1560 | // Order is unimportant. |
| 1560 | - for (std::set<ObjGen>::iterator iter = lc_other_page_shared.begin(); | 1561 | + for (std::set<QPDFObjGen>::iterator iter = lc_other_page_shared.begin(); |
| 1561 | iter != lc_other_page_shared.end(); ++iter) | 1562 | iter != lc_other_page_shared.end(); ++iter) |
| 1562 | { | 1563 | { |
| 1563 | this->part8.push_back(objGenToIndirect(*iter)); | 1564 | this->part8.push_back(objGenToIndirect(*iter)); |
| @@ -1573,13 +1574,13 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1573,13 +1574,13 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1573 | // arbitrary order. | 1574 | // arbitrary order. |
| 1574 | 1575 | ||
| 1575 | // Place the pages tree. | 1576 | // Place the pages tree. |
| 1576 | - std::set<ObjGen> pages_ogs = | 1577 | + std::set<QPDFObjGen> pages_ogs = |
| 1577 | this->obj_user_to_objects[ObjUser(ObjUser::ou_root_key, "/Pages")]; | 1578 | this->obj_user_to_objects[ObjUser(ObjUser::ou_root_key, "/Pages")]; |
| 1578 | assert(! pages_ogs.empty()); | 1579 | assert(! pages_ogs.empty()); |
| 1579 | - for (std::set<ObjGen>::iterator iter = pages_ogs.begin(); | 1580 | + for (std::set<QPDFObjGen>::iterator iter = pages_ogs.begin(); |
| 1580 | iter != pages_ogs.end(); ++iter) | 1581 | iter != pages_ogs.end(); ++iter) |
| 1581 | { | 1582 | { |
| 1582 | - ObjGen const& og = *iter; | 1583 | + QPDFObjGen const& og = *iter; |
| 1583 | if (lc_other.count(og)) | 1584 | if (lc_other.count(og)) |
| 1584 | { | 1585 | { |
| 1585 | lc_other.erase(og); | 1586 | lc_other.erase(og); |
| @@ -1597,7 +1598,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1597,7 +1598,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1597 | if (! thumb.isNull()) | 1598 | if (! thumb.isNull()) |
| 1598 | { | 1599 | { |
| 1599 | // Output the thumbnail itself | 1600 | // Output the thumbnail itself |
| 1600 | - ObjGen thumb_og(thumb.getObjectID(), thumb.getGeneration()); | 1601 | + QPDFObjGen thumb_og(thumb.getObjectID(), thumb.getGeneration()); |
| 1601 | if (lc_thumbnail_private.count(thumb_og)) | 1602 | if (lc_thumbnail_private.count(thumb_og)) |
| 1602 | { | 1603 | { |
| 1603 | lc_thumbnail_private.erase(thumb_og); | 1604 | lc_thumbnail_private.erase(thumb_og); |
| @@ -1612,12 +1613,12 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1612,12 +1613,12 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1612 | // having been in some set other than | 1613 | // having been in some set other than |
| 1613 | // lc_thumbnail_private. | 1614 | // lc_thumbnail_private. |
| 1614 | } | 1615 | } |
| 1615 | - std::set<ObjGen>& ogs = | 1616 | + std::set<QPDFObjGen>& ogs = |
| 1616 | this->obj_user_to_objects[ObjUser(ObjUser::ou_thumb, i)]; | 1617 | this->obj_user_to_objects[ObjUser(ObjUser::ou_thumb, i)]; |
| 1617 | - for (std::set<ObjGen>::iterator iter = ogs.begin(); | 1618 | + for (std::set<QPDFObjGen>::iterator iter = ogs.begin(); |
| 1618 | iter != ogs.end(); ++iter) | 1619 | iter != ogs.end(); ++iter) |
| 1619 | { | 1620 | { |
| 1620 | - ObjGen const& og = *iter; | 1621 | + QPDFObjGen const& og = *iter; |
| 1621 | if (lc_thumbnail_private.count(og)) | 1622 | if (lc_thumbnail_private.count(og)) |
| 1622 | { | 1623 | { |
| 1623 | lc_thumbnail_private.erase(og); | 1624 | lc_thumbnail_private.erase(og); |
| @@ -1635,7 +1636,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1635,7 +1636,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1635 | } | 1636 | } |
| 1636 | 1637 | ||
| 1637 | // Place shared thumbnail objects | 1638 | // Place shared thumbnail objects |
| 1638 | - for (std::set<ObjGen>::iterator iter = lc_thumbnail_shared.begin(); | 1639 | + for (std::set<QPDFObjGen>::iterator iter = lc_thumbnail_shared.begin(); |
| 1639 | iter != lc_thumbnail_shared.end(); ++iter) | 1640 | iter != lc_thumbnail_shared.end(); ++iter) |
| 1640 | { | 1641 | { |
| 1641 | this->part9.push_back(objGenToIndirect(*iter)); | 1642 | this->part9.push_back(objGenToIndirect(*iter)); |
| @@ -1648,7 +1649,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1648,7 +1649,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1648 | } | 1649 | } |
| 1649 | 1650 | ||
| 1650 | // Place all remaining objects | 1651 | // Place all remaining objects |
| 1651 | - for (std::set<ObjGen>::iterator iter = lc_other.begin(); | 1652 | + for (std::set<QPDFObjGen>::iterator iter = lc_other.begin(); |
| 1652 | iter != lc_other.end(); ++iter) | 1653 | iter != lc_other.end(); ++iter) |
| 1653 | { | 1654 | { |
| 1654 | this->part9.push_back(objGenToIndirect(*iter)); | 1655 | this->part9.push_back(objGenToIndirect(*iter)); |
| @@ -1723,15 +1724,15 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1723,15 +1724,15 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1723 | CHPageOffsetEntry& pe = this->c_page_offset_data.entries[i]; | 1724 | CHPageOffsetEntry& pe = this->c_page_offset_data.entries[i]; |
| 1724 | ObjUser ou(ObjUser::ou_page, i); | 1725 | ObjUser ou(ObjUser::ou_page, i); |
| 1725 | assert(this->obj_user_to_objects.count(ou) > 0); | 1726 | assert(this->obj_user_to_objects.count(ou) > 0); |
| 1726 | - std::set<ObjGen> const& ogs = this->obj_user_to_objects[ou]; | ||
| 1727 | - for (std::set<ObjGen>::const_iterator iter = ogs.begin(); | 1727 | + std::set<QPDFObjGen> const& ogs = this->obj_user_to_objects[ou]; |
| 1728 | + for (std::set<QPDFObjGen>::const_iterator iter = ogs.begin(); | ||
| 1728 | iter != ogs.end(); ++iter) | 1729 | iter != ogs.end(); ++iter) |
| 1729 | { | 1730 | { |
| 1730 | - ObjGen const& og = *iter; | 1731 | + QPDFObjGen const& og = *iter; |
| 1731 | if ((this->object_to_obj_users[og].size() > 1) && | 1732 | if ((this->object_to_obj_users[og].size() > 1) && |
| 1732 | - (obj_to_index.count(og.obj) > 0)) | 1733 | + (obj_to_index.count(og.getObj()) > 0)) |
| 1733 | { | 1734 | { |
| 1734 | - int idx = obj_to_index[og.obj]; | 1735 | + int idx = obj_to_index[og.getObj()]; |
| 1735 | ++pe.nshared_objects; | 1736 | ++pe.nshared_objects; |
| 1736 | pe.shared_identifiers.push_back(idx); | 1737 | pe.shared_identifiers.push_back(idx); |
| 1737 | } | 1738 | } |
| @@ -1742,7 +1743,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | @@ -1742,7 +1743,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) | ||
| 1742 | void | 1743 | void |
| 1743 | QPDF::pushOutlinesToPart( | 1744 | QPDF::pushOutlinesToPart( |
| 1744 | std::vector<QPDFObjectHandle>& part, | 1745 | std::vector<QPDFObjectHandle>& part, |
| 1745 | - std::set<ObjGen>& lc_outlines, | 1746 | + std::set<QPDFObjGen>& lc_outlines, |
| 1746 | std::map<int, int> const& object_stream_data) | 1747 | std::map<int, int> const& object_stream_data) |
| 1747 | { | 1748 | { |
| 1748 | QPDFObjectHandle root = getRoot(); | 1749 | QPDFObjectHandle root = getRoot(); |
| @@ -1752,16 +1753,16 @@ QPDF::pushOutlinesToPart( | @@ -1752,16 +1753,16 @@ QPDF::pushOutlinesToPart( | ||
| 1752 | return; | 1753 | return; |
| 1753 | } | 1754 | } |
| 1754 | outlines = getUncompressedObject(outlines, object_stream_data); | 1755 | outlines = getUncompressedObject(outlines, object_stream_data); |
| 1755 | - ObjGen outlines_og(outlines.getObjectID(), outlines.getGeneration()); | 1756 | + QPDFObjGen outlines_og(outlines.getObjectID(), outlines.getGeneration()); |
| 1756 | QTC::TC("qpdf", "QPDF lin outlines in part", | 1757 | QTC::TC("qpdf", "QPDF lin outlines in part", |
| 1757 | ((&part == (&this->part6)) ? 0 | 1758 | ((&part == (&this->part6)) ? 0 |
| 1758 | : (&part == (&this->part9)) ? 1 | 1759 | : (&part == (&this->part9)) ? 1 |
| 1759 | : 9999)); // can't happen | 1760 | : 9999)); // can't happen |
| 1760 | - this->c_outline_data.first_object = outlines_og.obj; | 1761 | + this->c_outline_data.first_object = outlines_og.getObj(); |
| 1761 | this->c_outline_data.nobjects = 1; | 1762 | this->c_outline_data.nobjects = 1; |
| 1762 | lc_outlines.erase(outlines_og); | 1763 | lc_outlines.erase(outlines_og); |
| 1763 | part.push_back(outlines); | 1764 | part.push_back(outlines); |
| 1764 | - for (std::set<ObjGen>::iterator iter = lc_outlines.begin(); | 1765 | + for (std::set<QPDFObjGen>::iterator iter = lc_outlines.begin(); |
| 1765 | iter != lc_outlines.end(); ++iter) | 1766 | iter != lc_outlines.end(); ++iter) |
| 1766 | { | 1767 | { |
| 1767 | part.push_back(objGenToIndirect(*iter)); | 1768 | part.push_back(objGenToIndirect(*iter)); |
libqpdf/QPDF_optimization.cc
| @@ -115,7 +115,7 @@ QPDF::optimize(std::map<int, int> const& object_stream_data, | @@ -115,7 +115,7 @@ QPDF::optimize(std::map<int, int> const& object_stream_data, | ||
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | ObjUser root_ou = ObjUser(ObjUser::ou_root); | 117 | ObjUser root_ou = ObjUser(ObjUser::ou_root); |
| 118 | - ObjGen root_og = ObjGen(root.getObjectID(), root.getGeneration()); | 118 | + QPDFObjGen root_og = QPDFObjGen(root.getObjectID(), root.getGeneration()); |
| 119 | obj_user_to_objects[root_ou].insert(root_og); | 119 | obj_user_to_objects[root_ou].insert(root_og); |
| 120 | object_to_obj_users[root_og].insert(root_ou); | 120 | object_to_obj_users[root_og].insert(root_ou); |
| 121 | 121 | ||
| @@ -310,13 +310,13 @@ QPDF::pushInheritedAttributesToPageInternal( | @@ -310,13 +310,13 @@ QPDF::pushInheritedAttributesToPageInternal( | ||
| 310 | void | 310 | void |
| 311 | QPDF::updateObjectMaps(ObjUser const& ou, QPDFObjectHandle oh) | 311 | QPDF::updateObjectMaps(ObjUser const& ou, QPDFObjectHandle oh) |
| 312 | { | 312 | { |
| 313 | - std::set<ObjGen> visited; | 313 | + std::set<QPDFObjGen> visited; |
| 314 | updateObjectMapsInternal(ou, oh, visited, true); | 314 | updateObjectMapsInternal(ou, oh, visited, true); |
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | void | 317 | void |
| 318 | QPDF::updateObjectMapsInternal(ObjUser const& ou, QPDFObjectHandle oh, | 318 | QPDF::updateObjectMapsInternal(ObjUser const& ou, QPDFObjectHandle oh, |
| 319 | - std::set<ObjGen>& visited, bool top) | 319 | + std::set<QPDFObjGen>& visited, bool top) |
| 320 | { | 320 | { |
| 321 | // Traverse the object tree from this point taking care to avoid | 321 | // Traverse the object tree from this point taking care to avoid |
| 322 | // crossing page boundaries. | 322 | // crossing page boundaries. |
| @@ -338,7 +338,7 @@ QPDF::updateObjectMapsInternal(ObjUser const& ou, QPDFObjectHandle oh, | @@ -338,7 +338,7 @@ QPDF::updateObjectMapsInternal(ObjUser const& ou, QPDFObjectHandle oh, | ||
| 338 | 338 | ||
| 339 | if (oh.isIndirect()) | 339 | if (oh.isIndirect()) |
| 340 | { | 340 | { |
| 341 | - ObjGen og(oh.getObjectID(), oh.getGeneration()); | 341 | + QPDFObjGen og(oh.getObjectID(), oh.getGeneration()); |
| 342 | if (visited.count(og)) | 342 | if (visited.count(og)) |
| 343 | { | 343 | { |
| 344 | QTC::TC("qpdf", "QPDF opt loop detected"); | 344 | QTC::TC("qpdf", "QPDF opt loop detected"); |
| @@ -403,51 +403,51 @@ QPDF::filterCompressedObjects(std::map<int, int> const& object_stream_data) | @@ -403,51 +403,51 @@ QPDF::filterCompressedObjects(std::map<int, int> const& object_stream_data) | ||
| 403 | // user of a compressed object, then it is really a user of the | 403 | // user of a compressed object, then it is really a user of the |
| 404 | // object stream that contains it. | 404 | // object stream that contains it. |
| 405 | 405 | ||
| 406 | - std::map<ObjUser, std::set<ObjGen> > t_obj_user_to_objects; | ||
| 407 | - std::map<ObjGen, std::set<ObjUser> > t_object_to_obj_users; | 406 | + std::map<ObjUser, std::set<QPDFObjGen> > t_obj_user_to_objects; |
| 407 | + std::map<QPDFObjGen, std::set<ObjUser> > t_object_to_obj_users; | ||
| 408 | 408 | ||
| 409 | - for (std::map<ObjUser, std::set<ObjGen> >::iterator i1 = | 409 | + for (std::map<ObjUser, std::set<QPDFObjGen> >::iterator i1 = |
| 410 | this->obj_user_to_objects.begin(); | 410 | this->obj_user_to_objects.begin(); |
| 411 | i1 != this->obj_user_to_objects.end(); ++i1) | 411 | i1 != this->obj_user_to_objects.end(); ++i1) |
| 412 | { | 412 | { |
| 413 | ObjUser const& ou = (*i1).first; | 413 | ObjUser const& ou = (*i1).first; |
| 414 | - std::set<ObjGen> const& objects = (*i1).second; | ||
| 415 | - for (std::set<ObjGen>::const_iterator i2 = objects.begin(); | 414 | + std::set<QPDFObjGen> const& objects = (*i1).second; |
| 415 | + for (std::set<QPDFObjGen>::const_iterator i2 = objects.begin(); | ||
| 416 | i2 != objects.end(); ++i2) | 416 | i2 != objects.end(); ++i2) |
| 417 | { | 417 | { |
| 418 | - ObjGen const& og = (*i2); | 418 | + QPDFObjGen const& og = (*i2); |
| 419 | std::map<int, int>::const_iterator i3 = | 419 | std::map<int, int>::const_iterator i3 = |
| 420 | - object_stream_data.find(og.obj); | 420 | + object_stream_data.find(og.getObj()); |
| 421 | if (i3 == object_stream_data.end()) | 421 | if (i3 == object_stream_data.end()) |
| 422 | { | 422 | { |
| 423 | t_obj_user_to_objects[ou].insert(og); | 423 | t_obj_user_to_objects[ou].insert(og); |
| 424 | } | 424 | } |
| 425 | else | 425 | else |
| 426 | { | 426 | { |
| 427 | - t_obj_user_to_objects[ou].insert(ObjGen((*i3).second, 0)); | 427 | + t_obj_user_to_objects[ou].insert(QPDFObjGen((*i3).second, 0)); |
| 428 | } | 428 | } |
| 429 | } | 429 | } |
| 430 | } | 430 | } |
| 431 | 431 | ||
| 432 | - for (std::map<ObjGen, std::set<ObjUser> >::iterator i1 = | 432 | + for (std::map<QPDFObjGen, std::set<ObjUser> >::iterator i1 = |
| 433 | this->object_to_obj_users.begin(); | 433 | this->object_to_obj_users.begin(); |
| 434 | i1 != this->object_to_obj_users.end(); ++i1) | 434 | i1 != this->object_to_obj_users.end(); ++i1) |
| 435 | { | 435 | { |
| 436 | - ObjGen const& og = (*i1).first; | 436 | + QPDFObjGen const& og = (*i1).first; |
| 437 | std::set<ObjUser> const& objusers = (*i1).second; | 437 | std::set<ObjUser> const& objusers = (*i1).second; |
| 438 | for (std::set<ObjUser>::const_iterator i2 = objusers.begin(); | 438 | for (std::set<ObjUser>::const_iterator i2 = objusers.begin(); |
| 439 | i2 != objusers.end(); ++i2) | 439 | i2 != objusers.end(); ++i2) |
| 440 | { | 440 | { |
| 441 | ObjUser const& ou = (*i2); | 441 | ObjUser const& ou = (*i2); |
| 442 | std::map<int, int>::const_iterator i3 = | 442 | std::map<int, int>::const_iterator i3 = |
| 443 | - object_stream_data.find(og.obj); | 443 | + object_stream_data.find(og.getObj()); |
| 444 | if (i3 == object_stream_data.end()) | 444 | if (i3 == object_stream_data.end()) |
| 445 | { | 445 | { |
| 446 | t_object_to_obj_users[og].insert(ou); | 446 | t_object_to_obj_users[og].insert(ou); |
| 447 | } | 447 | } |
| 448 | else | 448 | else |
| 449 | { | 449 | { |
| 450 | - t_object_to_obj_users[ObjGen((*i3).second, 0)].insert(ou); | 450 | + t_object_to_obj_users[QPDFObjGen((*i3).second, 0)].insert(ou); |
| 451 | } | 451 | } |
| 452 | } | 452 | } |
| 453 | } | 453 | } |
libqpdf/QPDF_pages.cc
| @@ -127,7 +127,7 @@ void | @@ -127,7 +127,7 @@ void | ||
| 127 | QPDF::insertPageobjToPage(QPDFObjectHandle const& obj, int pos, | 127 | QPDF::insertPageobjToPage(QPDFObjectHandle const& obj, int pos, |
| 128 | bool check_duplicate) | 128 | bool check_duplicate) |
| 129 | { | 129 | { |
| 130 | - ObjGen og(obj.getObjectID(), obj.getGeneration()); | 130 | + QPDFObjGen og(obj.getObjectID(), obj.getGeneration()); |
| 131 | if (check_duplicate) | 131 | if (check_duplicate) |
| 132 | { | 132 | { |
| 133 | if (! this->pageobj_to_pages_pos.insert(std::make_pair(og, pos)).second) | 133 | if (! this->pageobj_to_pages_pos.insert(std::make_pair(og, pos)).second) |
| @@ -135,7 +135,7 @@ QPDF::insertPageobjToPage(QPDFObjectHandle const& obj, int pos, | @@ -135,7 +135,7 @@ QPDF::insertPageobjToPage(QPDFObjectHandle const& obj, int pos, | ||
| 135 | QTC::TC("qpdf", "QPDF duplicate page reference"); | 135 | QTC::TC("qpdf", "QPDF duplicate page reference"); |
| 136 | setLastObjectDescription("page " + QUtil::int_to_string(pos) + | 136 | setLastObjectDescription("page " + QUtil::int_to_string(pos) + |
| 137 | " (numbered from zero)", | 137 | " (numbered from zero)", |
| 138 | - og.obj, og.gen); | 138 | + og.getObj(), og.getGen()); |
| 139 | throw QPDFExc(qpdf_e_pages, this->file->getName(), | 139 | throw QPDFExc(qpdf_e_pages, this->file->getName(), |
| 140 | this->last_object_description, 0, | 140 | this->last_object_description, 0, |
| 141 | "duplicate page reference found;" | 141 | "duplicate page reference found;" |
| @@ -215,7 +215,7 @@ QPDF::removePage(QPDFObjectHandle page) | @@ -215,7 +215,7 @@ QPDF::removePage(QPDFObjectHandle page) | ||
| 215 | this->all_pages.erase(this->all_pages.begin() + pos); | 215 | this->all_pages.erase(this->all_pages.begin() + pos); |
| 216 | assert(this->all_pages.size() == static_cast<size_t>(npages)); | 216 | assert(this->all_pages.size() == static_cast<size_t>(npages)); |
| 217 | this->pageobj_to_pages_pos.erase( | 217 | this->pageobj_to_pages_pos.erase( |
| 218 | - ObjGen(page.getObjectID(), page.getGeneration())); | 218 | + QPDFObjGen(page.getObjectID(), page.getGeneration())); |
| 219 | assert(this->pageobj_to_pages_pos.size() == static_cast<size_t>(npages)); | 219 | assert(this->pageobj_to_pages_pos.size() == static_cast<size_t>(npages)); |
| 220 | for (int i = pos; i < npages; ++i) | 220 | for (int i = pos; i < npages; ++i) |
| 221 | { | 221 | { |
| @@ -260,8 +260,8 @@ int | @@ -260,8 +260,8 @@ int | ||
| 260 | QPDF::findPage(int objid, int generation) | 260 | QPDF::findPage(int objid, int generation) |
| 261 | { | 261 | { |
| 262 | flattenPagesTree(); | 262 | flattenPagesTree(); |
| 263 | - std::map<ObjGen, int>::iterator it = | ||
| 264 | - this->pageobj_to_pages_pos.find(ObjGen(objid, generation)); | 263 | + std::map<QPDFObjGen, int>::iterator it = |
| 264 | + this->pageobj_to_pages_pos.find(QPDFObjGen(objid, generation)); | ||
| 265 | if (it == this->pageobj_to_pages_pos.end()) | 265 | if (it == this->pageobj_to_pages_pos.end()) |
| 266 | { | 266 | { |
| 267 | setLastObjectDescription("page object", objid, generation); | 267 | setLastObjectDescription("page object", objid, generation); |
libqpdf/build.mk
| @@ -32,6 +32,7 @@ SRCS_libqpdf = \ | @@ -32,6 +32,7 @@ SRCS_libqpdf = \ | ||
| 32 | libqpdf/Pl_StdioFile.cc \ | 32 | libqpdf/Pl_StdioFile.cc \ |
| 33 | libqpdf/QPDF.cc \ | 33 | libqpdf/QPDF.cc \ |
| 34 | libqpdf/QPDFExc.cc \ | 34 | libqpdf/QPDFExc.cc \ |
| 35 | + libqpdf/QPDFObjGen.cc \ | ||
| 35 | libqpdf/QPDFObject.cc \ | 36 | libqpdf/QPDFObject.cc \ |
| 36 | libqpdf/QPDFObjectHandle.cc \ | 37 | libqpdf/QPDFObjectHandle.cc \ |
| 37 | libqpdf/QPDFTokenizer.cc \ | 38 | libqpdf/QPDFTokenizer.cc \ |