summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_cross_ref_table.h
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2018-08-02 11:01:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-02 11:01:08 +0000
commitb07deb3fc1f54bd700a66df573bfcbc4bcc1d787 (patch)
tree1da57aa7633b2059e28afb2cb41227644f4e87ac /core/fpdfapi/parser/cpdf_cross_ref_table.h
parent649929af2140621d7bc50a532704f5d7be81637e (diff)
downloadpdfium-b07deb3fc1f54bd700a66df573bfcbc4bcc1d787.tar.xz
Rework of CPDF_Parser::GetLastObjNum.
Change-Id: I0481774858a9d9823580e1207807e35be8a9eea9 Reviewed-on: https://pdfium-review.googlesource.com/36270 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_cross_ref_table.h')
-rw-r--r--core/fpdfapi/parser/cpdf_cross_ref_table.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_cross_ref_table.h b/core/fpdfapi/parser/cpdf_cross_ref_table.h
index 9631216b0c..d8bda7125f 100644
--- a/core/fpdfapi/parser/cpdf_cross_ref_table.h
+++ b/core/fpdfapi/parser/cpdf_cross_ref_table.h
@@ -60,7 +60,12 @@ class CPDF_CrossRefTable {
void Update(std::unique_ptr<CPDF_CrossRefTable> new_cross_ref);
- void ShrinkObjectMap(uint32_t objnum);
+ void ShrinkObjectMap(uint32_t max_size);
+
+ // The total number of entries in the file’s cross-reference table, as
+ // defined by the combination of the original section and all update
+ // section.
+ uint32_t GetSize() const;
private:
void UpdateInfo(std::map<uint32_t, ObjectInfo>&& new_objects_info);