summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_parser_embeddertest.cpp
AgeCommit message (Collapse)Author
2017-12-20Avoid default arguments in EmbedderTest::OpenDocument().chromium/3300Lei Zhang
Default arguments are banned on virtual functions. Remove default arguments and rename OpenDocument() to OpenDocumentWithOptions(). Add wrappers for OpenDocumentWithOptions() to call it with sensible options. Change-Id: I4955d88cf77a7eab1771692ea3d6a18260b52900 Reviewed-on: https://pdfium-review.googlesource.com/21891 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-10-04Unify parsing of cross ref table v4.Artem Strygin
We can use 'Prev' value of first-page cross-reference table trailer for load main cross-reference table, instead of 'T' value of Linearized header (Offset of first entry in main cross-reference table). This is better solution, because this is allow us check entry count in main cross-ref table and unify loading of main cross-ref table with loading methods of non linearized document. See PDF specification: http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf#678 (page 678, Example 3/part 3) Change-Id: I59dcf3c73a0fb561221ded78e827e40535dbd717 Reviewed-on: https://pdfium-review.googlesource.com/13810 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-28Move replaced indirect objects to the orphans list.Lei Zhang
ReplaceIndirectObjectIfHigherGeneration() deletes replaced objects, but those objects may be in use. So move them to the orphans list instead to avoid potential dangling pointers. BUG=chromium:757705 Change-Id: Ide83a1b85b754166d298fd50e655ca331ba4f942 Reviewed-on: https://pdfium-review.googlesource.com/11670 Reviewed-by: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-09Add a FPDF_GetFileVersion() test for a linearized document.Lei Zhang
Change the CPDFParserEmbeddertest.Feature_Linearized_Loading test case into FPDFViewEmbeddertest.LinearizedDocument, and add a call to FPDF_GetFileVersion(). Change-Id: I0272c1e71c6f61393838bd3db41b154c4f5620ba Reviewed-on: https://pdfium-review.googlesource.com/10450 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2016-10-04Move core/fpdfapi/fpdf_parser to core/fpdfapi/parserdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2392603004