aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/QPDF_Stream.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-07-21 15:00:06 +0200
committerJay Berkenbilt <ejb@ql.org>2012-07-21 15:06:10 +0200
commit6bbea4baa0c06b39b1b71f1aa6fc276789296556 (patch)
tree62198136a609c86029d124323be9e2ea72f88d9a /libqpdf/qpdf/QPDF_Stream.hh
parentf3e267fce28c58039789379ba3488ad12c20a7f6 (diff)
downloadqpdf-6bbea4baa0c06b39b1b71f1aa6fc276789296556.tar.zst
Implement QPDFObjectHandle::parse
Move object parsing code from QPDF to QPDFObjectHandle and parameterize the parts of it that are specific to a QPDF object. Provide a version that can't handle indirect objects and that can be called on an arbitrary string. A side effect of this change is that the offset used when reporting invalid stream length has changed, but since the new value seems like a better value than the old one, the test suite has been updated rather than making the code backward compatible. This only effects the offset reported for invalid streams that lack /Length or have an invalid /Length key. Updated some test code and exmaples to use QPDFObjectHandle::parse. Supporting changes include adding a BufferInputSource constructor that takes a string.
Diffstat (limited to 'libqpdf/qpdf/QPDF_Stream.hh')
-rw-r--r--libqpdf/qpdf/QPDF_Stream.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/libqpdf/qpdf/QPDF_Stream.hh b/libqpdf/qpdf/QPDF_Stream.hh
index ce46d994..34eaceeb 100644
--- a/libqpdf/qpdf/QPDF_Stream.hh
+++ b/libqpdf/qpdf/QPDF_Stream.hh
@@ -32,6 +32,8 @@ class QPDF_Stream: public QPDFObject
QPDFObjectHandle const& filter,
QPDFObjectHandle const& decode_parms);
+ void replaceDict(QPDFObjectHandle new_dict);
+
// Replace object ID and generation. This may only be called if
// object ID and generation are 0. It is used by QPDFObjectHandle
// when adding streams to files.