summaryrefslogtreecommitdiff
path: root/include/vcl/filter/pdfdocument.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-04-13 18:09:32 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-04-14 00:11:06 +0200
commitf15a69bd57e578ca607f14cb62f29a16986b96e6 (patch)
tree015c67815618700d7b6b6723647752dc446157fe /include/vcl/filter/pdfdocument.hxx
parentdf556aa47da22f96b3fcd356c12419d3035cba3c (diff)
vcl PDF import: don't assume larger offset -> newer trailer
Usually when the PDF file contains incremental updates the updates are appended at the end of the document. But this is not required, the various trailers can be in any order. Make sure that we look at the last trailer (logically last, not the one with the largest file offset) when looking for pages. Change-Id: Idcd85a7c6bbf08c9436dd73933d79cdb683f482c Reviewed-on: https://gerrit.libreoffice.org/36527 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include/vcl/filter/pdfdocument.hxx')
-rw-r--r--include/vcl/filter/pdfdocument.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/vcl/filter/pdfdocument.hxx b/include/vcl/filter/pdfdocument.hxx
index d83cb8308f11..5011504f13df 100644
--- a/include/vcl/filter/pdfdocument.hxx
+++ b/include/vcl/filter/pdfdocument.hxx
@@ -308,6 +308,10 @@ class VCL_DLLPUBLIC PDFDocument
std::map<size_t, PDFObjectElement*> m_aIDObjects;
/// List of xref offsets we know.
std::vector<size_t> m_aStartXRefs;
+ /// Offsets of trailers, from latest to oldest.
+ std::vector<size_t> m_aTrailerOffsets;
+ /// Trailer offset <-> Trailer pointer map.
+ std::map<size_t, PDFTrailerElement*> m_aOffsetTrailers;
/// List of EOF offsets we know.
std::vector<size_t> m_aEOFs;
PDFTrailerElement* m_pTrailer;