Commit bd300be08d94add92657aef1d46afd100459302b

Authored by m-holger
1 parent a078202c

Replace calls to QPDFObjectHandle::Factory::newIndirect where possible

libqpdf/QPDF.cc
... ... @@ -1397,7 +1397,7 @@ QPDF::fixDanglingReferences(bool force)
1397 1397 std::list<QPDFObjectHandle> queue;
1398 1398 queue.push_back(this->m->trailer);
1399 1399 for (auto const& og: to_process) {
1400   - QPDFObjectHandle obj = QPDFObjectHandle::Factory::newIndirect(this, og);
  1400 + auto obj = getObjectByObjGen(og);
1401 1401 if (obj.isDictionary() || obj.isArray()) {
1402 1402 queue.push_back(obj);
1403 1403 } else if (obj.isStream()) {
... ... @@ -1463,7 +1463,7 @@ QPDF::getAllObjects()
1463 1463 std::vector<QPDFObjectHandle> result;
1464 1464 for (auto const& iter: this->m->obj_cache) {
1465 1465 QPDFObjGen const& og = iter.first;
1466   - result.push_back(QPDFObjectHandle::Factory::newIndirect(this, og));
  1466 + result.push_back(getObjectByObjGen(og));
1467 1467 }
1468 1468 return result;
1469 1469 }
... ...
libqpdf/QPDF_linearization.cc
... ... @@ -137,8 +137,7 @@ QPDF::isLinearized()
137 137 return false;
138 138 }
139 139  
140   - QPDFObjectHandle candidate = QPDFObjectHandle::Factory::newIndirect(
141   - this, QPDFObjGen(lindict_obj, 0));
  140 + auto candidate = getObjectByID(lindict_obj, 0);
142 141 if (!candidate.isDictionary()) {
143 142 return false;
144 143 }
... ...