aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_linearization.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-08-01 20:22:37 +0200
committerm-holger <m-holger@kubitscheck.org>2022-08-01 20:22:37 +0200
commit1553868c4ada61c79b92729dc2bd22d21c319d0d (patch)
treebeb3dbf5c240a5156f8628e723686782a6d2e01e /libqpdf/QPDF_linearization.cc
parenta9c0b026683cc1f9f86a22a0e080940f55d5760d (diff)
downloadqpdf-1553868c4ada61c79b92729dc2bd22d21c319d0d.tar.zst
Add QPDF::getObject to replace getObjectByObjGen and getObjectByID
For consistency with similar methods, e.g. replaceObject.
Diffstat (limited to 'libqpdf/QPDF_linearization.cc')
-rw-r--r--libqpdf/QPDF_linearization.cc24
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;
}
}