aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-02-15 11:35:10 +0100
committerm-holger <m-holger@kubitscheck.org>2023-02-18 09:33:08 +0100
commitd58ec90310c93653ab42bcb7373a38e3f8d43362 (patch)
tree56332692fe8775fba175b164e91e22644873ccce
parent76189c44a2f656e6623a7d36519e406d488a9ee5 (diff)
downloadqpdf-d58ec90310c93653ab42bcb7373a38e3f8d43362.tar.zst
Un-inline QPDFValue::getDescription
-rw-r--r--libqpdf/QPDFValue.cc17
-rw-r--r--libqpdf/qpdf/QPDFValue.hh17
2 files changed, 18 insertions, 16 deletions
diff --git a/libqpdf/QPDFValue.cc b/libqpdf/QPDFValue.cc
index ca3205b7..19679df2 100644
--- a/libqpdf/QPDFValue.cc
+++ b/libqpdf/QPDFValue.cc
@@ -9,3 +9,20 @@ QPDFValue::do_create(QPDFValue* object)
obj->value = std::shared_ptr<QPDFValue>(object);
return obj;
}
+
+std::string
+QPDFValue::getDescription()
+{
+ auto description = object_description ? *object_description : "";
+ if (auto pos = description.find("$OG"); pos != std::string::npos) {
+ description.replace(pos, 3, og.unparse(' '));
+ }
+ if (auto pos = description.find("$PO"); pos != std::string::npos) {
+ qpdf_offset_t shift = (type_code == ::ot_dictionary) ? 2
+ : (type_code == ::ot_array) ? 1
+ : 0;
+
+ description.replace(pos, 3, std::to_string(parsed_offset + shift));
+ }
+ return description;
+}
diff --git a/libqpdf/qpdf/QPDFValue.hh b/libqpdf/qpdf/QPDFValue.hh
index c64f0d6e..b9c3cdb1 100644
--- a/libqpdf/qpdf/QPDFValue.hh
+++ b/libqpdf/qpdf/QPDFValue.hh
@@ -44,22 +44,7 @@ class QPDFValue
qpdf = a_qpdf;
og = a_og;
}
- std::string
- getDescription()
- {
- auto description = object_description ? *object_description : "";
- if (auto pos = description.find("$OG"); pos != std::string::npos) {
- description.replace(pos, 3, og.unparse(' '));
- }
- if (auto pos = description.find("$PO"); pos != std::string::npos) {
- qpdf_offset_t shift = (type_code == ::ot_dictionary) ? 2
- : (type_code == ::ot_array) ? 1
- : 0;
-
- description.replace(pos, 3, std::to_string(parsed_offset + shift));
- }
- return description;
- }
+ std::string getDescription();
bool
hasDescription()
{