aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-12-16 17:19:15 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-12-31 16:23:59 +0100
commit218f069a69ef74d0b0cc9c7ba0796e9360cef379 (patch)
tree089b93f71c4dbbf953c10b4070d7280c5f349f14 /libqpdf/QPDF.cc
parentd03ca88275e5f5d83701502f9ab29de833e772db (diff)
downloadqpdf-218f069a69ef74d0b0cc9c7ba0796e9360cef379.tar.zst
Add new method QPDFObject::setDefaultDescription
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r--libqpdf/QPDF.cc9
1 files changed, 2 insertions, 7 deletions
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<QPDFObject> const& obj)
{
- obj->setObjGen(this, og);
- if (!obj->hasDescription()) {
- obj->setDescription(this, "object " + og.unparse(' '));
- }
+ obj->setDefaultDescription(this, og);
return QPDFObjectHandle::Factory::newIndirect(obj);
}