diff options
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDFValue.cc | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDFValue.hh | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/libqpdf/QPDFValue.cc b/libqpdf/QPDFValue.cc index 7c5b30a6..41a00fa8 100644 --- a/libqpdf/QPDFValue.cc +++ b/libqpdf/QPDFValue.cc @@ -35,6 +35,8 @@ QPDFValue::getDescription() return description; } } + } else if (og.isIndirect()) { + return "object " + og.unparse(' '); } return {}; } diff --git a/libqpdf/qpdf/QPDFValue.hh b/libqpdf/qpdf/QPDFValue.hh index e7904253..8e9d4ea5 100644 --- a/libqpdf/qpdf/QPDFValue.hh +++ b/libqpdf/qpdf/QPDFValue.hh @@ -40,11 +40,6 @@ class QPDFValue void setDefaultDescription(QPDF* a_qpdf, QPDFObjGen const& a_og) { - static auto default_description{ - std::make_shared<Description>("object $OG")}; - if (!object_description) { - object_description = default_description; - } qpdf = a_qpdf; og = a_og; } @@ -52,7 +47,7 @@ class QPDFValue bool hasDescription() { - return object_description != nullptr; + return object_description || og.isIndirect(); } void setParsedOffset(qpdf_offset_t offset) |