From eeb6162f7620fba49bb141ccd2c715cd829c8e24 Mon Sep 17 00:00:00 2001 From: m-holger Date: Sat, 16 Jul 2022 11:21:11 +0100 Subject: Add optional parameter separator to QPDFObjGen::unparse Also, revert inlining of unparse and operator << from commit 4c6640c in order to avoid exposing QUtil. --- libqpdf/QPDF_Stream.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libqpdf/QPDF_Stream.cc') diff --git a/libqpdf/QPDF_Stream.cc b/libqpdf/QPDF_Stream.cc index 0b06a7f5..c0644532 100644 --- a/libqpdf/QPDF_Stream.cc +++ b/libqpdf/QPDF_Stream.cc @@ -130,8 +130,7 @@ QPDF_Stream::QPDF_Stream( setDescription( this->qpdf, this->qpdf->getFilename() + ", stream object " + - QUtil::int_to_string(this->objid) + " " + - QUtil::int_to_string(this->generation)); + QPDFObjGen(objid, generation).unparse(' ')); } std::shared_ptr @@ -196,8 +195,7 @@ std::string QPDF_Stream::unparse() { // Unparse stream objects as indirect references - return QUtil::int_to_string(this->objid) + " " + - QUtil::int_to_string(this->generation) + " R"; + return QPDFObjGen(objid, generation).unparse(' ') + " R"; } JSON @@ -643,8 +641,7 @@ QPDF_Stream::pipeStreamData( // part of a library user, not by invalid input data. throw std::runtime_error( "stream data provider for " + - QUtil::int_to_string(this->objid) + " " + - QUtil::int_to_string(this->generation) + " provided " + + QPDFObjGen(objid, generation).unparse(' ') + " provided " + QUtil::int_to_string(actual_length) + " bytes instead of expected " + QUtil::int_to_string(desired_length) + " bytes"); -- cgit v1.2.3-70-g09d2