summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_annot.cpp
AgeCommit message (Collapse)Author
2018-10-17Remove CPDFSDK_Annot::GetMinWidth() and GetMinHeight().Tom Sepez
These are a pair of virtual functions that are never overriden and are only used once in an ASSERT(). Change-Id: I6df9d20cc3e4c0679514fa5c0c15a4d797862b5d Reviewed-on: https://pdfium-review.googlesource.com/c/44213 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-10-12Remove more unnecessary includes and do IWYU as needed.Lei Zhang
Also move some implementations out of headers. Change-Id: I321fc26970c440d874b135bd28e8bc8156b9afee Reviewed-on: https://pdfium-review.googlesource.com/c/43890 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-09Mark more bits const in CPDFSDK_XFAWidget.Lei Zhang
Change-Id: Ib262eafc73751890a95fb60a5c8d880e9c6792af Reviewed-on: https://pdfium-review.googlesource.com/c/43615 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-28Add CPDSDK_Annot::AsBAAnnot() checked downcast methodTom Sepez
XFA introduces some additional subclasses, so it doesn't hurt to be sure in all cases before making a static cast. Change-Id: I7447ca58be0b57201b39ba40a3fc5f47505cee58 Reviewed-on: https://pdfium-review.googlesource.com/39013 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-06-13Collapse some more xfa/non-xfa code in cpdfsdk annots.chromium/3459chromium/3458Tom Sepez
cpdfsdk_annot.cpp:315 and cpdfsdk_annot.cpp:338 are nearly identical, except that the #ifdef XFA code passed along the correct type from the argument. Prefer this behaviour even when non-XFA. Change-Id: Id4d5fbcc773ffd10746c4ddc77a571e818e5a957 Reviewed-on: https://pdfium-review.googlesource.com/35030 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-12Rework "Make common page base class."Tom Sepez
Re-landing of https://pdfium-review.googlesource.com/c/pdfium/+/32892 This time, however, we do not build on the previous CL which cached pages. This CL by itself should be OK but was reverted only because it was blocking earlier reverts. Change-Id: I067d5f07373eeac6cced5d0c113ea40e5f8dcd15 Reviewed-on: https://pdfium-review.googlesource.com/34910 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-04Revert "Make common page base class for XFA and non-XFA."Tom Sepez
This reverts commit d06cc38b76685b002c51b227ae43b8314d926ad8. Reason for revert: blocking previous revert Change-Id: I74f8b80852c671440cca5fabef30e69cde9e2063 Reviewed-on: https://pdfium-review.googlesource.com/33713 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-30Make common page base class for XFA and non-XFA.Tom Sepez
Now that both are ref-counted, we can replace ifdef's with some polymorphism. Bug: pdfium:760 Change-Id: Ie22ea259c9af56fa569f0af268b8e7065789a3f2 Reviewed-on: https://pdfium-review.googlesource.com/32892 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-06-02Remove dead CPDFSDK_Annot code.chromium/3119Lei Zhang
Change-Id: Ied77912f0f657ebc8e36469365de230e552e4956 Reviewed-on: https://pdfium-review.googlesource.com/6233 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-03-14Replace FX_FLOAT with underlying float type.Dan Sinclair
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2016-11-02Remove FX_BOOL from fpdfsdk.tsepez
Review-Url: https://codereview.chromium.org/2453683011
2016-11-02Rename CPDFXFA_Document to CPDFXFA_Contextdsinclair
The CPDFXFA_Document class isn't a document, it contains documents. Renamed to make the purpose a bit clearer. Review-Url: https://codereview.chromium.org/2469813004
2016-10-04Rename fpdfsdk/fpdfxfa files to match contentschromium/2881dsinclair
Each of these files contains a single class, rename the file to match the internal class name. Review-Url: https://codereview.chromium.org/2385423004
2016-09-29Move fpdfsdk/include to fpdfsdkdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2384503003
2016-09-29Move fpdfsdk/fpdfxfa/include to fpdfsdk/fpdfxfadsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2381993002
2016-09-13Split fsdk_mgr files apart.dsinclair
This CL separates the CPDFDoc_Environment, CPDFSDK_Document and CPDFSDK_PageView classes into their own h and cpp files. Review-Url: https://codereview.chromium.org/2335243002
2016-09-07Make Observers into a templated classtsepez
Review-Url: https://codereview.chromium.org/2311343003
2016-09-07Add observer for BAAnnots from Javascriptdsinclair
This Cl moves the observer code from the CPDFSDK_Widget up into the CPDFSDK_Annot base class and then adds a second observer for CPDFSDK_BAAnnot objects. This allows us to attach an observer to the Annot javascript class which will update its internal pointer to the BAAnnot if the BAAnnot is destroyed by the CPDFSDK_PageView being destroyed. BUG=chromium:642307 Review-Url: https://codereview.chromium.org/2306663002
2016-08-31Use enum class for subtypes of CPDF_Annot.jaepark
Comparing CFX_ByteString for annotation subtypes is inefficient and error-prone. This CL uses enum class to compare annotation subtypes. Also, remove unused IPDFSDK_AnnotHandler::GetType() and FSDK_XFAWIDGET_TYPENAME. Review-Url: https://codereview.chromium.org/2295953002
2016-08-26Rename CPDFSDK_Annot::GetType to CPDFSDK_Annot::GetAnnotSubtype.jaepark
CPDFSDK_Annot::GetType should be renamed to GetAnnotSubtype as it returns annotation subtype. Also, CPDFSDK_Annot::GetSubType is only used to check if the annotation is signature widget. Thus, change the method to IsSignatureWidget. Lastly, rename CPDF_Annot::GetSubType to CPDF_Annot::GetSubtype to match with spec. Review-Url: https://codereview.chromium.org/2287703002
2016-08-25Remove unused m_nTabOrder in CPDFSDK_Annot.jaepark
Review-Url: https://codereview.chromium.org/2283503002
2016-08-11Move CPDFSDK_Annot, CPDFSDK_BAAnnot and CPDFSDK_DateTime to their own files.jaepark
Review-Url: https://codereview.chromium.org/2236743002