diff options
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDF.cc | 8 | ||||
-rw-r--r-- | libqpdf/QPDFObjectHandle.cc | 4 | ||||
-rw-r--r-- | libqpdf/QPDFWriter.cc | 1 | ||||
-rw-r--r-- | libqpdf/QPDF_Integer.cc | 4 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Integer.hh | 6 |
5 files changed, 12 insertions, 11 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index 3ea2f1ff..6b275d28 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -659,7 +659,7 @@ QPDF::read_xref(qpdf_offset_t xref_offset) this->deleted_objects.clear(); } -int +qpdf_offset_t QPDF::read_xrefTable(qpdf_offset_t xref_offset) { PCRE xref_first_re("^\\s*(\\d+)\\s+(\\d+)"); @@ -816,7 +816,7 @@ QPDF::read_xrefTable(qpdf_offset_t xref_offset) return xref_offset; } -int +qpdf_offset_t QPDF::read_xrefStream(qpdf_offset_t xref_offset) { bool found = false; @@ -1247,7 +1247,7 @@ QPDF::readObjectInternal(PointerHolder<InputSource> input, case QPDFTokenizer::tt_integer: object = QPDFObjectHandle::newInteger( - atoi(token.getValue().c_str())); + QUtil::string_to_ll(token.getValue().c_str())); break; case QPDFTokenizer::tt_real: @@ -1892,7 +1892,7 @@ QPDF::resolveObjectsInStream(int obj_stream_number) } int num = atoi(tnum.getValue().c_str()); - int offset = atoi(toffset.getValue().c_str()); + int offset = QUtil::string_to_ll(toffset.getValue().c_str()); offsets[num] = offset + first; } diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index 4db0f6fe..90756dd7 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -189,7 +189,7 @@ QPDFObjectHandle::getBoolValue() // Integer accessors -int +long long QPDFObjectHandle::getIntValue() { assertType("Integer", isInteger()); @@ -592,7 +592,7 @@ QPDFObjectHandle::newNull() } QPDFObjectHandle -QPDFObjectHandle::newInteger(int value) +QPDFObjectHandle::newInteger(long long value) { return QPDFObjectHandle(new QPDF_Integer(value)); } diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index 71549ff4..308f4c53 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -881,6 +881,7 @@ QPDFWriter::writeTrailer(trailer_e which, int size, bool xref_stream, int prev) writeString(" /Prev "); qpdf_offset_t pos = this->pipeline->getCount(); writeString(QUtil::int_to_string(prev)); + // XXX int nspaces = (int)(pos - this->pipeline->getCount() + 11); assert(nspaces >= 0); writePad(nspaces); diff --git a/libqpdf/QPDF_Integer.cc b/libqpdf/QPDF_Integer.cc index da3b7dc9..fb25af1b 100644 --- a/libqpdf/QPDF_Integer.cc +++ b/libqpdf/QPDF_Integer.cc @@ -2,7 +2,7 @@ #include <qpdf/QUtil.hh> -QPDF_Integer::QPDF_Integer(int val) : +QPDF_Integer::QPDF_Integer(long long val) : val(val) { } @@ -17,7 +17,7 @@ QPDF_Integer::unparse() return QUtil::int_to_string(this->val); } -int +long long QPDF_Integer::getVal() const { return this->val; diff --git a/libqpdf/qpdf/QPDF_Integer.hh b/libqpdf/qpdf/QPDF_Integer.hh index cc11cd65..f9964693 100644 --- a/libqpdf/qpdf/QPDF_Integer.hh +++ b/libqpdf/qpdf/QPDF_Integer.hh @@ -6,13 +6,13 @@ class QPDF_Integer: public QPDFObject { public: - QPDF_Integer(int val); + QPDF_Integer(long long val); virtual ~QPDF_Integer(); virtual std::string unparse(); - int getVal() const; + long long getVal() const; private: - int val; + long long val; }; #endif // __QPDF_INTEGER_HH__ |