aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFWriter.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-08-22 19:20:36 +0200
committerJay Berkenbilt <ejb@ql.org>2019-08-22 23:55:16 +0200
commit3f3dbe22eaae56df48af304c35a1c0b5dd976135 (patch)
treefdbc1ce25eca82315310c1d0c9a012a4da9c450d /libqpdf/QPDFWriter.cc
parent4b674b42e4c1b9b470dd4ca8b84ac4db1d430055 (diff)
downloadqpdf-3f3dbe22eaae56df48af304c35a1c0b5dd976135.tar.zst
Remove array null flattening
For some reason, qpdf from the beginning was replacing indirect references to null with literal null in arrays even after removing the old behavior of flattening scalar references. This seems like a bad idea.
Diffstat (limited to 'libqpdf/QPDFWriter.cc')
-rw-r--r--libqpdf/QPDFWriter.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc
index 2df18452..6c92338d 100644
--- a/libqpdf/QPDFWriter.cc
+++ b/libqpdf/QPDFWriter.cc
@@ -2390,13 +2390,7 @@ QPDFWriter::prepareFileForWrite()
for (int i = 0; i < nitems; ++i)
{
QPDFObjectHandle oh = node.getArrayItem(i);
- if (oh.isIndirect() && oh.isNull())
- {
- QTC::TC("qpdf", "QPDFWriter flatten array null");
- oh.makeDirect();
- node.setArrayItem(i, oh);
- }
- else if (! oh.isScalar())
+ if (! oh.isScalar())
{
queue.push_back(oh);
}