diff options
author | Jay Berkenbilt <ejb@ql.org> | 2010-08-03 00:40:52 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2010-08-03 00:40:52 +0200 |
commit | 998a6cbee911ee8d49b2ce2f24e0cb4898289492 (patch) | |
tree | b848719b55208f44e3c82be4c52bb714499206bc /libqpdf/QPDF_Stream.cc | |
parent | 9a06fc541ce00361f12f6231b2f7556615cbccb7 (diff) | |
download | qpdf-998a6cbee911ee8d49b2ce2f24e0cb4898289492.tar.zst |
remove stream_data_handler; it wouldn't work as designed. replacement data implemented but not tested
git-svn-id: svn+q:///qpdf/trunk@988 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/QPDF_Stream.cc')
-rw-r--r-- | libqpdf/QPDF_Stream.cc | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/libqpdf/QPDF_Stream.cc b/libqpdf/QPDF_Stream.cc index 500dfb10..5e53b2ae 100644 --- a/libqpdf/QPDF_Stream.cc +++ b/libqpdf/QPDF_Stream.cc @@ -319,10 +319,20 @@ QPDF_Stream::pipeStreamData(Pipeline* pipeline, bool filter, } } - // XXX handle stream_data and stream_data_handler - QPDF::Pipe::pipeStreamData(this->qpdf, this->objid, this->generation, - this->offset, this->length, - this->stream_dict, pipeline); + if (this->stream_data.getPointer()) + { + QTC::TC("qpdf", "QPDF_Stream pipe replaced stream data"); + Buffer& b = *(this->stream_data.getPointer()); + pipeline->write(b.getBuffer(), b.getSize()); + pipeline->finish(); + } + else + { + QTC::TC("qpdf", "QPDF_Stream pipe original stream data"); + QPDF::Pipe::pipeStreamData(this->qpdf, this->objid, this->generation, + this->offset, this->length, + this->stream_dict, pipeline); + } return filter; } @@ -339,10 +349,3 @@ QPDF_Stream::replaceStreamData(PointerHolder<Buffer> data, QPDFObjectHandle::newInteger( data.getPointer()->getSize())); } - -void -QPDF_Stream::replaceStreamData( - PointerHolder<QPDFObjectHandle::StreamDataHandler> dh) -{ - this->stream_data_handler = dh; -} |