Commit d79a823d66512b5f5db2c0db739d1a867fcd5774
Committed by
Jay Berkenbilt
1 parent
6350cf16
Remove QPDF_Stream::getOffset and QPDF_Stream::setObjGen
Showing
3 changed files
with
1 additions
and
24 deletions
libqpdf/QPDF.cc
| ... | ... | @@ -2382,7 +2382,7 @@ QPDF::copyStreamData(QPDFObjectHandle result, QPDFObjectHandle foreign) |
| 2382 | 2382 | foreign_stream_qpdf.m->encp, |
| 2383 | 2383 | foreign_stream_qpdf.m->file, |
| 2384 | 2384 | foreign.getObjGen(), |
| 2385 | - stream->getOffset(), | |
| 2385 | + stream->getParsedOffset(), | |
| 2386 | 2386 | stream->getLength(), |
| 2387 | 2387 | dict); |
| 2388 | 2388 | this->m->copied_stream_data_provider->registerForeignStream( | ... | ... |
libqpdf/QPDF_Stream.cc
| ... | ... | @@ -172,17 +172,6 @@ QPDF_Stream::disconnect() |
| 172 | 172 | QPDFObjectHandle::DisconnectAccess::disconnect(this->stream_dict); |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | -void | |
| 176 | -QPDF_Stream::setObjGen(QPDFObjGen const& og) | |
| 177 | -{ | |
| 178 | - if (this->og.isIndirect()) { | |
| 179 | - throw std::logic_error( | |
| 180 | - "attempt to set object ID and generation of a stream" | |
| 181 | - " that already has them"); | |
| 182 | - } | |
| 183 | - this->og = og; | |
| 184 | -} | |
| 185 | - | |
| 186 | 175 | std::string |
| 187 | 176 | QPDF_Stream::unparse() |
| 188 | 177 | { |
| ... | ... | @@ -322,12 +311,6 @@ QPDF_Stream::isDataModified() const |
| 322 | 311 | return (!this->token_filters.empty()); |
| 323 | 312 | } |
| 324 | 313 | |
| 325 | -qpdf_offset_t | |
| 326 | -QPDF_Stream::getOffset() const | |
| 327 | -{ | |
| 328 | - return this->parsed_offset; | |
| 329 | -} | |
| 330 | - | |
| 331 | 314 | size_t |
| 332 | 315 | QPDF_Stream::getLength() const |
| 333 | 316 | { | ... | ... |
libqpdf/qpdf/QPDF_Stream.hh
| ... | ... | @@ -34,7 +34,6 @@ class QPDF_Stream: public QPDFValue |
| 34 | 34 | bool getFilterOnWrite() const; |
| 35 | 35 | |
| 36 | 36 | // Methods to help QPDF copy foreign streams |
| 37 | - qpdf_offset_t getOffset() const; | |
| 38 | 37 | size_t getLength() const; |
| 39 | 38 | std::shared_ptr<Buffer> getStreamDataBuffer() const; |
| 40 | 39 | std::shared_ptr<QPDFObjectHandle::StreamDataProvider> |
| ... | ... | @@ -73,11 +72,6 @@ class QPDF_Stream: public QPDFValue |
| 73 | 72 | std::string const& filter_name, |
| 74 | 73 | std::function<std::shared_ptr<QPDFStreamFilter>()> factory); |
| 75 | 74 | |
| 76 | - // Replace object ID and generation. This may only be called if | |
| 77 | - // object ID and generation are 0. It is used by QPDFObjectHandle | |
| 78 | - // when adding streams to files. | |
| 79 | - void setObjGen(QPDFObjGen const& og); | |
| 80 | - | |
| 81 | 75 | private: |
| 82 | 76 | QPDF_Stream( |
| 83 | 77 | QPDF*, | ... | ... |