From 218f069a69ef74d0b0cc9c7ba0796e9360cef379 Mon Sep 17 00:00:00 2001 From: m-holger Date: Fri, 16 Dec 2022 16:19:15 +0000 Subject: Add new method QPDFObject::setDefaultDescription --- libqpdf/QPDF.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'libqpdf/QPDF.cc') diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index 86846675..b1eefd3b 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -1848,9 +1848,7 @@ QPDF::resolve(QPDFObjGen og) } auto result(this->m->obj_cache[og].object); - if (!result->hasDescription()) { - result->setDescription(this, ("object " + og.unparse(' '))); - } + result->setDefaultDescription(this, og); } void @@ -1946,10 +1944,7 @@ QPDF::resolveObjectsInStream(int obj_stream_number) QPDFObjectHandle QPDF::newIndirect(QPDFObjGen const& og, std::shared_ptr const& obj) { - obj->setObjGen(this, og); - if (!obj->hasDescription()) { - obj->setDescription(this, "object " + og.unparse(' ')); - } + obj->setDefaultDescription(this, og); return QPDFObjectHandle::Factory::newIndirect(obj); } -- cgit v1.2.3-70-g09d2