mirror of
https://github.com/qpdf/qpdf.git
synced 2024-11-16 01:27:07 +00:00
Tune QPDFWriter::enqueueObject
This commit is contained in:
parent
98dff46310
commit
9c216a06d9
@ -1257,17 +1257,17 @@ QPDFWriter::enqueueObject(QPDFObjectHandle object)
|
|||||||
// indicates that an object stream is inside itself.
|
// indicates that an object stream is inside itself.
|
||||||
QTC::TC("qpdf", "QPDFWriter ignore self-referential object stream");
|
QTC::TC("qpdf", "QPDFWriter ignore self-referential object stream");
|
||||||
}
|
}
|
||||||
} else if (object.isArray()) {
|
return;
|
||||||
if (!this->m->linearized) {
|
} else if (!this->m->linearized) {
|
||||||
int n = object.getArrayNItems();
|
if (object.isArray()) {
|
||||||
for (int i = 0; i < n; ++i) {
|
for (auto& item: object.getArrayAsVector()) {
|
||||||
enqueueObject(object.getArrayItem(i));
|
enqueueObject(item);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (object.isDictionary()) {
|
} else if (object.isDictionary()) {
|
||||||
if (!this->m->linearized) {
|
for (auto& item: object.getDictAsMap()) {
|
||||||
for (auto const& key: object.getKeys()) {
|
if (!item.second.isNull()) {
|
||||||
enqueueObject(object.getKey(key));
|
enqueueObject(item.second);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user