2
1
mirror of https://github.com/qpdf/qpdf.git synced 2025-01-03 07:12:28 +00:00

Remove QPDF_Stream::getOffset and QPDF_Stream::setObjGen

This commit is contained in:
m-holger 2022-09-27 13:08:14 +01:00 committed by Jay Berkenbilt
parent 6350cf16e6
commit d79a823d66
3 changed files with 1 additions and 24 deletions

View File

@ -2382,7 +2382,7 @@ QPDF::copyStreamData(QPDFObjectHandle result, QPDFObjectHandle foreign)
foreign_stream_qpdf.m->encp,
foreign_stream_qpdf.m->file,
foreign.getObjGen(),
stream->getOffset(),
stream->getParsedOffset(),
stream->getLength(),
dict);
this->m->copied_stream_data_provider->registerForeignStream(

View File

@ -172,17 +172,6 @@ QPDF_Stream::disconnect()
QPDFObjectHandle::DisconnectAccess::disconnect(this->stream_dict);
}
void
QPDF_Stream::setObjGen(QPDFObjGen const& og)
{
if (this->og.isIndirect()) {
throw std::logic_error(
"attempt to set object ID and generation of a stream"
" that already has them");
}
this->og = og;
}
std::string
QPDF_Stream::unparse()
{
@ -322,12 +311,6 @@ QPDF_Stream::isDataModified() const
return (!this->token_filters.empty());
}
qpdf_offset_t
QPDF_Stream::getOffset() const
{
return this->parsed_offset;
}
size_t
QPDF_Stream::getLength() const
{

View File

@ -34,7 +34,6 @@ class QPDF_Stream: public QPDFValue
bool getFilterOnWrite() const;
// Methods to help QPDF copy foreign streams
qpdf_offset_t getOffset() const;
size_t getLength() const;
std::shared_ptr<Buffer> getStreamDataBuffer() const;
std::shared_ptr<QPDFObjectHandle::StreamDataProvider>
@ -73,11 +72,6 @@ class QPDF_Stream: public QPDFValue
std::string const& filter_name,
std::function<std::shared_ptr<QPDFStreamFilter>()> factory);
// 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.
void setObjGen(QPDFObjGen const& og);
private:
QPDF_Stream(
QPDF*,