Commit 5d0469f1bcbe1c4d008e71bc690273198805a405

Authored by m-holger
1 parent 4b73d057

QPDFObjGen : tidy QPDFJob

Use QPDFObjGen::unparse where appropriate.
Showing 1 changed file with 5 additions and 7 deletions
libqpdf/QPDFJob.cc
... ... @@ -2464,7 +2464,7 @@ QPDFJob::shouldRemoveUnreferencedResources(QPDF& pdf)
2464 2464 QTC::TC("qpdf", "QPDFJob found resources in non-leaf");
2465 2465 doIfVerbose([&](Pipeline& v, std::string const& prefix) {
2466 2466 v << " found resources in non-leaf page node "
2467   - << og.getObj() << " " << og.getGen() << "\n";
  2467 + << og.unparse(' ') << "\n";
2468 2468 });
2469 2469 return true;
2470 2470 }
... ... @@ -2481,9 +2481,8 @@ QPDFJob::shouldRemoveUnreferencedResources(QPDF&amp; pdf)
2481 2481 QTC::TC("qpdf", "QPDFJob found shared resources in leaf");
2482 2482 doIfVerbose([&](Pipeline& v, std::string const& prefix) {
2483 2483 v << " found shared resources in leaf node "
2484   - << og.getObj() << " " << og.getGen() << ": "
2485   - << resources_og.getObj() << " "
2486   - << resources_og.getGen() << "\n";
  2484 + << og.unparse(' ') << ": "
  2485 + << resources_og.unparse(' ') << "\n";
2487 2486 });
2488 2487 return true;
2489 2488 }
... ... @@ -2498,8 +2497,7 @@ QPDFJob::shouldRemoveUnreferencedResources(QPDF&amp; pdf)
2498 2497 QTC::TC("qpdf", "QPDFJob found shared xobject in leaf");
2499 2498 doIfVerbose([&](Pipeline& v, std::string const& prefix) {
2500 2499 v << " found shared xobject in leaf node "
2501   - << og.getObj() << " " << og.getGen() << ": "
2502   - << xobject_og.getObj() << " " << xobject_og.getGen()
  2500 + << og.unparse(' ') << ": " << xobject_og.unparse(' ')
2503 2501 << "\n";
2504 2502 });
2505 2503 return true;
... ... @@ -3376,7 +3374,7 @@ QPDFJob::writeJSON(QPDF&amp; pdf)
3376 3374 auto wanted = getWantedJSONObjects();
3377 3375 for (auto const& og: wanted) {
3378 3376 std::ostringstream s;
3379   - s << "obj:" << og.getObj() << " " << og.getGen() << " R";
  3377 + s << "obj:" << og.unparse(' ') << " R";
3380 3378 json_objects.insert(s.str());
3381 3379 }
3382 3380 pdf.writeJSON(
... ...