mirror of https://github.com/qpdf/qpdf.git
Remove redundant parameter from QPDFJob::handlePageSpecs and doSplitPages
This commit is contained in:
parent
284b8efbc6
commit
b27be3ed27
|
@ -517,10 +517,8 @@ class QPDFJob
|
|||
|
||||
// Transformations
|
||||
void setQPDFOptions(QPDF& pdf);
|
||||
void handlePageSpecs(
|
||||
QPDF& pdf,
|
||||
bool& warnings,
|
||||
std::vector<std::shared_ptr<QPDF>>& page_heap);
|
||||
void
|
||||
handlePageSpecs(QPDF& pdf, std::vector<std::shared_ptr<QPDF>>& page_heap);
|
||||
bool shouldRemoveUnreferencedResources(QPDF& pdf);
|
||||
void handleRotations(QPDF& pdf);
|
||||
void
|
||||
|
@ -549,7 +547,7 @@ class QPDFJob
|
|||
void doShowAttachment(QPDF& pdf);
|
||||
|
||||
// Output generation
|
||||
void doSplitPages(QPDF& pdf, bool& warnings);
|
||||
void doSplitPages(QPDF& pdf);
|
||||
void setWriterOptions(QPDF& pdf, QPDFWriter& w);
|
||||
void setEncryptionOptions(QPDF&, QPDFWriter&);
|
||||
void maybeFixWritePassword(int R, std::string& password);
|
||||
|
|
|
@ -486,10 +486,9 @@ QPDFJob::run()
|
|||
pdf.updateFromJSON(this->m->update_from_json);
|
||||
}
|
||||
|
||||
bool other_warnings = false;
|
||||
std::vector<std::shared_ptr<QPDF>> page_heap;
|
||||
if (!m->page_specs.empty()) {
|
||||
handlePageSpecs(pdf, other_warnings, page_heap);
|
||||
handlePageSpecs(pdf, page_heap);
|
||||
}
|
||||
if (!m->rotations.empty()) {
|
||||
handleRotations(pdf);
|
||||
|
@ -500,7 +499,7 @@ QPDFJob::run()
|
|||
if (!createsOutput()) {
|
||||
doInspection(pdf);
|
||||
} else if (m->split_pages) {
|
||||
doSplitPages(pdf, other_warnings);
|
||||
doSplitPages(pdf);
|
||||
} else {
|
||||
writeOutfile(pdf);
|
||||
}
|
||||
|
@ -2541,7 +2540,7 @@ added_page(QPDF& pdf, QPDFPageObjectHelper page)
|
|||
|
||||
void
|
||||
QPDFJob::handlePageSpecs(
|
||||
QPDF& pdf, bool& warnings, std::vector<std::shared_ptr<QPDF>>& page_heap)
|
||||
QPDF& pdf, std::vector<std::shared_ptr<QPDF>>& page_heap)
|
||||
{
|
||||
// Parse all page specifications and translate them into lists of
|
||||
// actual pages.
|
||||
|
@ -2787,9 +2786,6 @@ QPDFJob::handlePageSpecs(
|
|||
}
|
||||
}
|
||||
}
|
||||
if (page_data.qpdf->anyWarnings()) {
|
||||
warnings = true;
|
||||
}
|
||||
if (cis) {
|
||||
cis->stayOpen(false);
|
||||
}
|
||||
|
@ -3176,7 +3172,7 @@ QPDFJob::setWriterOptions(QPDF& pdf, QPDFWriter& w)
|
|||
}
|
||||
|
||||
void
|
||||
QPDFJob::doSplitPages(QPDF& pdf, bool& warnings)
|
||||
QPDFJob::doSplitPages(QPDF& pdf)
|
||||
{
|
||||
// Generate output file pattern
|
||||
std::string before;
|
||||
|
@ -3272,9 +3268,6 @@ QPDFJob::doSplitPages(QPDF& pdf, bool& warnings)
|
|||
doIfVerbose([&](Pipeline& v, std::string const& prefix) {
|
||||
v << prefix << ": wrote file " << outfile << "\n";
|
||||
});
|
||||
if (outpdf.anyWarnings()) {
|
||||
warnings = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue