From 6bbea4baa0c06b39b1b71f1aa6fc276789296556 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 21 Jul 2012 09:00:06 -0400 Subject: 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. --- ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 1b76b011..2bb4564a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2012-07-21 Jay Berkenbilt + + * Add new method QPDFObjectHandle::replaceDict to replace a + stream's dictionary. Use with caution; see comments in + QPDFObjectHandle.hh. + + * Add new method QPDFObjectHandle::parse for creation of + QPDFObjectHandle objects from string representations of the + objects. Thanks to Tobias Hoffmann for the idea. + 2012-07-15 Jay Berkenbilt * add new QPDF::isEncrypted method that returns some additional -- cgit v1.2.3-54-g00ecf