summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_helpers.cpp
AgeCommit message (Collapse)Author
2018-05-25Add proper const/non-const versions of CPDF_Dictionary::GetStreamFor().chromium/3441Lei Zhang
BUG=pdfium:234 Change-Id: Ia3e758bbe5c445c3856f5215e900e02a16b4d7d7 Reviewed-on: https://pdfium-review.googlesource.com/32910 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-22Make friend RetainPtr<T> statements consistently public.Lei Zhang
Also make destructors private for RetainPtr sub-classes, and add missing destructors. Change-Id: I451bf0aae2dae943b1f450d0aa4ca5124dc578fd Reviewed-on: https://pdfium-review.googlesource.com/32853 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-05-09Add proper const/non-const versions of CPDF_Object methods.Lei Zhang
Instead of having const methods that return non-const pointers. BUG=pdfium:234 Change-Id: I598e9b4f267f702e2e71001cfe3aa3c9e9d8c12f Reviewed-on: https://pdfium-review.googlesource.com/32182 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-05-03Use strict types in FPDF API, try #3Tom Sepez
Rather than messing with actual inheritence, add type-checking wrappers and just blatantly cast to incomplete types. Along the way, this points out places where we would downcast without checking, which I fix. Change-Id: Ieb303eb46ad8522dfe082454f1f10f247ffd52d5 Reviewed-on: https://pdfium-review.googlesource.com/32030 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-01Check for NULL XFA context even when XFATom Sepez
Use strict typing for FPDF_Page to ensure we don't fall into code that expects the other page type when continuing from null context case. Change-Id: I7f028ef3e3d733f5557620030a87e22997da00d5 Reviewed-on: https://pdfium-review.googlesource.com/31770 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-01Make FPDF_Document always be CPDF_Document.Tom Sepez
Greatly minimize the impact between going back and forth from XFA being on/off, so that XFA case is just an extension beyond the non-XFA data structures we've shipped for years, instead of being a complete replacement of them. Change-Id: I6c98206e0ec99ea443547a4931eba912b1764d54 Reviewed-on: https://pdfium-review.googlesource.com/31690 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-27Avoid potential duplicate unique_ptr to CPDF_Document from CPDFXA_Context.Tom Sepez
Should FPDFDocumentFromCPDFDocument() be called several times under XFA, we may WrapUnique() the document several times. So cache a pointer back from CPDF_Document to CPDFXFA_Context to avoid this. Because of layering, introduce a placeholder type CPDF_Document::Extension. This is actually the first step in some larger XFA ownership cleanup, but makes a nice standalone CL around the one particular issue. Change-Id: I4be326ddb1a5fae7339e6ed6745dd551b1374b53 Reviewed-on: https://pdfium-review.googlesource.com/31570 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-24Fix include order for cpdfxfa_context.hchromium/3407Tom Sepez
It should include cpdfsdk_helpers, not the other way around. Change-Id: Id2cc3018e8c38f82ce8a35b03bb90e936aa1d446 Reviewed-on: https://pdfium-review.googlesource.com/31294 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-17Add constants for PDF 1.7 spec, table 3.4.Lei Zhang
Add constants/stream_dict_common.h. The header lists all the constants in the table in the same order. Constants that are not used at all are commented out. BUG=pdfium:1049 Change-Id: I6539090e0ad56319ea628883e388aeacef044e52 Reviewed-on: https://pdfium-review.googlesource.com/29090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-04-13Move SharedForm check to CPDF_Metadata classdan sinclair
This CL moves code related to shared form detection into the CPDF_Metadata class. This allows us to hide the usage of CXML inside CPDF_Metadata. Change-Id: I547471a2bcc119221565c415a58211c1500cbb3c Reviewed-on: https://pdfium-review.googlesource.com/30370 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-12Add index parameter to quadpoints getter and setter.Ralf Sippl
This is needed for working with multiline text markup annotations. Based on https://pdfium-review.googlesource.com/12012. Bug: pdfium:1045 Change-Id: Ifb105996b8b950bb2d5fceaf754b4f571155aef4 Reviewed-on: https://pdfium-review.googlesource.com/29150 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-03-28Rename some fsdk files to cpdfsdkDan Sinclair
This CL renames fsdk_common and fsdk_define to cpdfsdk_common and cpdfsdk_helpers respectively. Change-Id: I8ee7a308561f1ff2f510954444f953b0c8fed788 Reviewed-on: https://pdfium-review.googlesource.com/29371 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>