Commit 5d0469f1bcbe1c4d008e71bc690273198805a405
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,7 +2464,7 @@ QPDFJob::shouldRemoveUnreferencedResources(QPDF& pdf) | ||
| 2464 | QTC::TC("qpdf", "QPDFJob found resources in non-leaf"); | 2464 | QTC::TC("qpdf", "QPDFJob found resources in non-leaf"); |
| 2465 | doIfVerbose([&](Pipeline& v, std::string const& prefix) { | 2465 | doIfVerbose([&](Pipeline& v, std::string const& prefix) { |
| 2466 | v << " found resources in non-leaf page node " | 2466 | v << " found resources in non-leaf page node " |
| 2467 | - << og.getObj() << " " << og.getGen() << "\n"; | 2467 | + << og.unparse(' ') << "\n"; |
| 2468 | }); | 2468 | }); |
| 2469 | return true; | 2469 | return true; |
| 2470 | } | 2470 | } |
| @@ -2481,9 +2481,8 @@ QPDFJob::shouldRemoveUnreferencedResources(QPDF& pdf) | @@ -2481,9 +2481,8 @@ QPDFJob::shouldRemoveUnreferencedResources(QPDF& pdf) | ||
| 2481 | QTC::TC("qpdf", "QPDFJob found shared resources in leaf"); | 2481 | QTC::TC("qpdf", "QPDFJob found shared resources in leaf"); |
| 2482 | doIfVerbose([&](Pipeline& v, std::string const& prefix) { | 2482 | doIfVerbose([&](Pipeline& v, std::string const& prefix) { |
| 2483 | v << " found shared resources in leaf node " | 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 | return true; | 2487 | return true; |
| 2489 | } | 2488 | } |
| @@ -2498,8 +2497,7 @@ QPDFJob::shouldRemoveUnreferencedResources(QPDF& pdf) | @@ -2498,8 +2497,7 @@ QPDFJob::shouldRemoveUnreferencedResources(QPDF& pdf) | ||
| 2498 | QTC::TC("qpdf", "QPDFJob found shared xobject in leaf"); | 2497 | QTC::TC("qpdf", "QPDFJob found shared xobject in leaf"); |
| 2499 | doIfVerbose([&](Pipeline& v, std::string const& prefix) { | 2498 | doIfVerbose([&](Pipeline& v, std::string const& prefix) { |
| 2500 | v << " found shared xobject in leaf node " | 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 | << "\n"; | 2501 | << "\n"; |
| 2504 | }); | 2502 | }); |
| 2505 | return true; | 2503 | return true; |
| @@ -3376,7 +3374,7 @@ QPDFJob::writeJSON(QPDF& pdf) | @@ -3376,7 +3374,7 @@ QPDFJob::writeJSON(QPDF& pdf) | ||
| 3376 | auto wanted = getWantedJSONObjects(); | 3374 | auto wanted = getWantedJSONObjects(); |
| 3377 | for (auto const& og: wanted) { | 3375 | for (auto const& og: wanted) { |
| 3378 | std::ostringstream s; | 3376 | std::ostringstream s; |
| 3379 | - s << "obj:" << og.getObj() << " " << og.getGen() << " R"; | 3377 | + s << "obj:" << og.unparse(' ') << " R"; |
| 3380 | json_objects.insert(s.str()); | 3378 | json_objects.insert(s.str()); |
| 3381 | } | 3379 | } |
| 3382 | pdf.writeJSON( | 3380 | pdf.writeJSON( |