diff options
author | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2022-08-06 20:23:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-06 20:23:56 +0200 |
commit | a3037ca440e2a7cf9b5d377c932f2d322f31dace (patch) | |
tree | 94037a91955dc18b326775e9a7daa3b87c0138a8 /libqpdf/QPDF_linearization.cc | |
parent | 8095006668dc2e9634f55885ae44b8538a39361e (diff) | |
parent | 1553868c4ada61c79b92729dc2bd22d21c319d0d (diff) | |
download | qpdf-a3037ca440e2a7cf9b5d377c932f2d322f31dace.tar.zst |
Merge pull request #739 from m-holger/getobject
Add QPDF::getObject to replace getObjectByObjGen and getObjectByID
Diffstat (limited to 'libqpdf/QPDF_linearization.cc')
-rw-r--r-- | libqpdf/QPDF_linearization.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libqpdf/QPDF_linearization.cc b/libqpdf/QPDF_linearization.cc index f89ed188..e988092e 100644 --- a/libqpdf/QPDF_linearization.cc +++ b/libqpdf/QPDF_linearization.cc @@ -706,7 +706,7 @@ QPDF::getUncompressedObject( return obj; } else { int repl = (*(object_stream_data.find(obj.getObjectID()))).second; - return getObjectByObjGen(QPDFObjGen(repl, 0)); + return getObject(repl, 0); } } @@ -1381,9 +1381,9 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) stopOnError("found other than one root while" " calculating linearization data"); } - this->m->part4.push_back(getObjectByObjGen(*(lc_root.begin()))); + this->m->part4.push_back(getObject(*(lc_root.begin()))); for (auto const& og: lc_open_document) { - this->m->part4.push_back(getObjectByObjGen(og)); + this->m->part4.push_back(getObject(og)); } // Part 6: first page objects. Note: implementation note 124 @@ -1412,11 +1412,11 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) // hint tables. for (auto const& og: lc_first_page_private) { - this->m->part6.push_back(getObjectByObjGen(og)); + this->m->part6.push_back(getObject(og)); } for (auto const& og: lc_first_page_shared) { - this->m->part6.push_back(getObjectByObjGen(og)); + this->m->part6.push_back(getObject(og)); } // Place the outline dictionary if it goes in the first page section. @@ -1462,7 +1462,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) for (auto const& og: this->m->obj_user_to_objects[ou]) { if (lc_other_page_private.count(og)) { lc_other_page_private.erase(og); - this->m->part7.push_back(getObjectByObjGen(og)); + this->m->part7.push_back(getObject(og)); ++this->m->c_page_offset_data.entries.at(i).nobjects; } } @@ -1479,7 +1479,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) // Order is unimportant. for (auto const& og: lc_other_page_shared) { - this->m->part8.push_back(getObjectByObjGen(og)); + this->m->part8.push_back(getObject(og)); } // Part 9: other objects @@ -1501,7 +1501,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) for (auto const& og: pages_ogs) { if (lc_other.count(og)) { lc_other.erase(og); - this->m->part9.push_back(getObjectByObjGen(og)); + this->m->part9.push_back(getObject(og)); } } @@ -1531,7 +1531,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) for (auto const& og: ogs) { if (lc_thumbnail_private.count(og)) { lc_thumbnail_private.erase(og); - this->m->part9.push_back(getObjectByObjGen(og)); + this->m->part9.push_back(getObject(og)); } } } @@ -1544,7 +1544,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) // Place shared thumbnail objects for (auto const& og: lc_thumbnail_shared) { - this->m->part9.push_back(getObjectByObjGen(og)); + this->m->part9.push_back(getObject(og)); } // Place outlines unless in first page @@ -1554,7 +1554,7 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data) // Place all remaining objects for (auto const& og: lc_other) { - this->m->part9.push_back(getObjectByObjGen(og)); + this->m->part9.push_back(getObject(og)); } // Make sure we got everything exactly once. @@ -1656,7 +1656,7 @@ QPDF::pushOutlinesToPart( lc_outlines.erase(outlines_og); part.push_back(outlines); for (auto const& og: lc_outlines) { - part.push_back(getObjectByObjGen(og)); + part.push_back(getObject(og)); ++this->m->c_outline_data.nobjects; } } |