mirror of
https://github.com/qpdf/qpdf.git
synced 2024-06-05 03:40:53 +00:00
Replace calls to QPDFObjectHandle::Factory::newIndirect where possible
This commit is contained in:
parent
a078202c1b
commit
bd300be08d
|
@ -1397,7 +1397,7 @@ QPDF::fixDanglingReferences(bool force)
|
|||
std::list<QPDFObjectHandle> queue;
|
||||
queue.push_back(this->m->trailer);
|
||||
for (auto const& og: to_process) {
|
||||
QPDFObjectHandle obj = QPDFObjectHandle::Factory::newIndirect(this, og);
|
||||
auto obj = getObjectByObjGen(og);
|
||||
if (obj.isDictionary() || obj.isArray()) {
|
||||
queue.push_back(obj);
|
||||
} else if (obj.isStream()) {
|
||||
|
@ -1463,7 +1463,7 @@ QPDF::getAllObjects()
|
|||
std::vector<QPDFObjectHandle> result;
|
||||
for (auto const& iter: this->m->obj_cache) {
|
||||
QPDFObjGen const& og = iter.first;
|
||||
result.push_back(QPDFObjectHandle::Factory::newIndirect(this, og));
|
||||
result.push_back(getObjectByObjGen(og));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -137,8 +137,7 @@ QPDF::isLinearized()
|
|||
return false;
|
||||
}
|
||||
|
||||
QPDFObjectHandle candidate = QPDFObjectHandle::Factory::newIndirect(
|
||||
this, QPDFObjGen(lindict_obj, 0));
|
||||
auto candidate = getObjectByID(lindict_obj, 0);
|
||||
if (!candidate.isDictionary()) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user