Commit 8dcf6da2590633e00fe9d0334692d5ca482e740a

Authored by Jay Berkenbilt
1 parent c2168546

QPDFJob: remove non-check from doFinalChecks

libqpdf/QPDFJob.cc
@@ -2428,7 +2428,8 @@ QPDFJob::handleTransformations(QPDF& pdf) @@ -2428,7 +2428,8 @@ QPDFJob::handleTransformations(QPDF& pdf)
2428 afdh = new QPDFAcroFormDocumentHelper(pdf); 2428 afdh = new QPDFAcroFormDocumentHelper(pdf);
2429 } 2429 }
2430 }; 2430 };
2431 - if (o.externalize_inline_images) 2431 + if (o.externalize_inline_images ||
  2432 + (o.optimize_images && (! o.keep_inline_images)))
2432 { 2433 {
2433 std::vector<QPDFPageObjectHelper> pages = dh.getAllPages(); 2434 std::vector<QPDFPageObjectHelper> pages = dh.getAllPages();
2434 for (std::vector<QPDFPageObjectHelper>::iterator iter = pages.begin(); 2435 for (std::vector<QPDFPageObjectHelper>::iterator iter = pages.begin();
libqpdf/QPDFJob_argv.cc
@@ -2320,11 +2320,6 @@ ArgParser::doFinalChecks() @@ -2320,11 +2320,6 @@ ArgParser::doFinalChecks()
2320 { 2320 {
2321 usage("no output file may be given for this option"); 2321 usage("no output file may be given for this option");
2322 } 2322 }
2323 - if (o.optimize_images && (! o.keep_inline_images))  
2324 - {  
2325 - // QXXXQ this is not a check and doesn't belong here  
2326 - o.externalize_inline_images = true;  
2327 - }  
2328 if (o.check_requires_password && o.check_is_encrypted) 2323 if (o.check_requires_password && o.check_is_encrypted)
2329 { 2324 {
2330 usage("--requires-password and --is-encrypted may not be given" 2325 usage("--requires-password and --is-encrypted may not be given"
@@ -2357,7 +2352,7 @@ ArgParser::doFinalChecks() @@ -2357,7 +2352,7 @@ ArgParser::doFinalChecks()
2357 usage("--split-pages may not be used when" 2352 usage("--split-pages may not be used when"
2358 " writing to standard output"); 2353 " writing to standard output");
2359 } 2354 }
2360 - if (o.verbose) // QXXXQ 2355 + if (o.verbose)
2361 { 2356 {
2362 usage("--verbose may not be used when" 2357 usage("--verbose may not be used when"
2363 " writing to standard output"); 2358 " writing to standard output");