aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2024-02-24 16:29:41 +0100
committerJay Berkenbilt <ejb@ql.org>2024-02-24 16:29:41 +0100
commit2d402e451cad84e28a988eefbfcdbd580cf733fc (patch)
tree33bbe4bcb3d861c6617d102debb7cbb00b647063
parent54d8e920f177f4937492e8b5ce0cea9cc743126b (diff)
downloadqpdf-2d402e451cad84e28a988eefbfcdbd580cf733fc.tar.zst
Format code
-rw-r--r--libqpdf/QPDFObjectHandle.cc2
-rw-r--r--libqpdf/QPDF_String.cc7
2 files changed, 4 insertions, 5 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index 9b9849a3..163ebe88 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -1,9 +1,9 @@
#include <qpdf/QPDFObjectHandle.hh>
#include <qpdf/BufferInputSource.hh>
+#include <qpdf/JSON_writer.hh>
#include <qpdf/Pl_Buffer.hh>
#include <qpdf/Pl_QPDFTokenizer.hh>
-#include <qpdf/JSON_writer.hh>
#include <qpdf/QPDF.hh>
#include <qpdf/QPDFExc.hh>
#include <qpdf/QPDFLogger.hh>
diff --git a/libqpdf/QPDF_String.cc b/libqpdf/QPDF_String.cc
index f425b313..85a63844 100644
--- a/libqpdf/QPDF_String.cc
+++ b/libqpdf/QPDF_String.cc
@@ -51,22 +51,21 @@ QPDF_String::writeJSON(int json_version, JSON::Writer& p)
{
auto candidate = getUTF8Val();
if (json_version == 1) {
-
p << "\"" << JSON::Writer::encode_string(candidate) << "\"";
} else {
// See if we can unambiguously represent as Unicode.
if (QUtil::is_utf16(this->val) || QUtil::is_explicit_utf8(this->val)) {
- p << "\"u:" << JSON::Writer::encode_string(candidate) <<"\"";
+ p << "\"u:" << JSON::Writer::encode_string(candidate) << "\"";
return;
} else if (!useHexString()) {
std::string test;
if (QUtil::utf8_to_pdf_doc(candidate, test, '?') && (test == this->val)) {
// This is a PDF-doc string that can be losslessly encoded as Unicode.
- p << "\"u:" << JSON::Writer::encode_string(candidate) <<"\"";
+ p << "\"u:" << JSON::Writer::encode_string(candidate) << "\"";
return;
}
}
- p << "\"b:" << QUtil::hex_encode(val) <<"\"";
+ p << "\"b:" << QUtil::hex_encode(val) << "\"";
}
}