aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFWriter.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-01-18 12:25:44 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2023-01-22 00:18:15 +0100
commite8cdc4628634c44aa5bae0230050e4336551fe32 (patch)
tree337a1304324e72ed7df17bb6ab827e55a5ab382d /libqpdf/QPDFWriter.cc
parente4e0f40fc0b9fe74865898b640ff82f84996bb5d (diff)
downloadqpdf-e8cdc4628634c44aa5bae0230050e4336551fe32.tar.zst
Tidy QPDFXRefEntry creation
Diffstat (limited to 'libqpdf/QPDFWriter.cc')
-rw-r--r--libqpdf/QPDFWriter.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc
index 3d7de821..06858eb3 100644
--- a/libqpdf/QPDFWriter.cc
+++ b/libqpdf/QPDFWriter.cc
@@ -1156,7 +1156,7 @@ QPDFWriter::openObject(int objid)
if (objid == 0) {
objid = this->m->next_objid++;
}
- this->m->xref[objid] = QPDFXRefEntry(1, this->m->pipeline->getCount(), 0);
+ this->m->xref[objid] = QPDFXRefEntry(m->pipeline->getCount());
writeString(std::to_string(objid));
writeString(" 0 obj\n");
return objid;
@@ -1905,7 +1905,7 @@ QPDFWriter::writeObjectStream(QPDFObjectHandle object)
}
writeObject(obj_to_write, count);
- this->m->xref[new_obj] = QPDFXRefEntry(2, new_id, count);
+ this->m->xref[new_obj] = QPDFXRefEntry(new_id, count);
}
}
@@ -2686,7 +2686,7 @@ QPDFWriter::writeXRefStream(
// Must store in xref table in advance of writing the actual data
// rather than waiting for openObject to do it.
- this->m->xref[xref_id] = QPDFXRefEntry(1, this->m->pipeline->getCount(), 0);
+ this->m->xref[xref_id] = QPDFXRefEntry(m->pipeline->getCount());
Pipeline* p = pushPipeline(new Pl_Buffer("xref stream"));
bool compressed = false;
@@ -3112,7 +3112,7 @@ QPDFWriter::writeLinearized()
}
if (pass == 1) {
this->m->xref[hint_id] =
- QPDFXRefEntry(1, this->m->pipeline->getCount(), 0);
+ QPDFXRefEntry(m->pipeline->getCount());
} else {
// Part 5: hint stream
writeBuffer(hint_buffer);
@@ -3216,7 +3216,7 @@ QPDFWriter::writeLinearized()
hint_length = QIntC::to_offset(hint_buffer->getSize());
// Restore hint offset
- this->m->xref[hint_id] = QPDFXRefEntry(1, hint_offset1, 0);
+ this->m->xref[hint_id] = QPDFXRefEntry(hint_offset1);
if (lin_pass1_file) {
// Write some debugging information
fprintf(