Commit 77cf23873cbad377b0bbc733f93ecaa987fa4f51

Authored by m-holger
1 parent 4178e02a

Refactor: replace `isNull` calls with `null`, remove redundant `QTC::TC` calls i…

…n `QPDFWriter` and `QPDFJob`.
libqpdf/QPDFJob.cc
... ... @@ -464,7 +464,7 @@ QPDFJob::createQPDF()
464 464 if (m->remove_info) {
465 465 auto trailer = pdf.getTrailer();
466 466 auto mod_date = trailer.getKey("/Info").getKeyIfDict("/ModDate");
467   - if (mod_date.isNull()) {
  467 + if (mod_date.null()) {
468 468 trailer.removeKey("/Info");
469 469 } else {
470 470 auto info = trailer.replaceKeyAndGetNew(
... ... @@ -2064,7 +2064,7 @@ static void
2064 2064 maybe_set_pagemode(QPDF& pdf, std::string const& pagemode)
2065 2065 {
2066 2066 auto root = pdf.getRoot();
2067   - if (root.getKey("/PageMode").isNull()) {
  2067 + if (root.getKey("/PageMode").null()) {
2068 2068 root.replaceKey("/PageMode", QPDFObjectHandle::newName(pagemode));
2069 2069 }
2070 2070 }
... ...
libqpdf/QPDFWriter.cc
... ... @@ -1782,12 +1782,11 @@ QPDFWriter::writeObjectStream(QPDFObjectHandle object)
1782 1782 write(" /Filter /FlateDecode");
1783 1783 }
1784 1784 write(" /N ").write(offsets.size()).write_qdf("\n ").write(" /First ").write(first);
1785   - if (!object.isNull()) {
  1785 + if (!object.null()) {
1786 1786 // If the original object has an /Extends key, preserve it.
1787 1787 QPDFObjectHandle dict = object.getDict();
1788 1788 QPDFObjectHandle extends = dict.getKey("/Extends");
1789 1789 if (extends.isIndirect()) {
1790   - QTC::TC("qpdf", "QPDFWriter copy Extends");
1791 1790 write_qdf("\n ").write(" /Extends ");
1792 1791 unparseChild(extends, 1, f_in_ostream);
1793 1792 }
... ...
qpdf/qpdf.testcov
... ... @@ -85,7 +85,6 @@ QPDF ignoring XRefStm in trailer 0
85 85 QPDF xref deleted object 0
86 86 SF_FlateLzwDecode PNG filter 0
87 87 QPDF xref /Index is array 1
88   -QPDFWriter copy Extends 0
89 88 QPDFWriter encrypt object stream 0
90 89 QPDFWriter uncompressing page dictionary 0
91 90 QPDFWriter uncompressing root 0
... ...