summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-12Fix some nits in fxbarcode.chromium/3322chromium/3321chromium/3320Lei Zhang
This is a follow-up to comments from https://pdfium-review.googlesource.com/c/pdfium/+/22870 Change-Id: Ide35ea5b27ea12d480d979241801c7676b94fe74 Reviewed-on: https://pdfium-review.googlesource.com/22932 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-12Add jumbo build support for fxbarcode.Lei Zhang
BUG=pdfium:964 Change-Id: Ic306a374bc9b710e2ac043eebe43504e5bd75926 Reviewed-on: https://pdfium-review.googlesource.com/22870 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-12Move some RetainPtr getters/setters out of headers.Lei Zhang
RetainPtr operations are not trivial. Change-Id: Ic106ada69d1c023a8132a2a59db17d550fd81fa0 Reviewed-on: https://pdfium-review.googlesource.com/22911 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-12Use enum for tracking form field typesRyan Harrison
Within PDFium use enum class for better type safety when working with form field types. These values will still be converted to ints as part of the public API, since that is the existing API. This work is preperation for extending the number of form field types to have more specific entries for XFA. BUG=pdfium:952,chromium:763129,chromium:592758 Change-Id: Ie6c29f02ae22be782ff36eb87d27f1a4bf2c099e Reviewed-on: https://pdfium-review.googlesource.com/22742 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-01-12Fix "the the" typos.Lei Zhang
TBR=hnakashima@chromium.org Change-Id: I50877f5a2ff3fb6f48630019d2481aa451945118 Reviewed-on: https://pdfium-review.googlesource.com/22774 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-11Add FPDFAnnot_SetAP to public API.chromium/3319Henrique Nakashima
Change-Id: I6de3e4e158a8b0276775c0915cbe53417135eec3 Reviewed-on: https://pdfium-review.googlesource.com/22570 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-01-11Add operator<< to CFX_FloatRect.Henrique Nakashima
This helps debugging. Change-Id: I4d14dd5975d8d8f4566009ed4a4127f9c56d36dd Reviewed-on: https://pdfium-review.googlesource.com/22790 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-01-11Improve documentation of FPDF_RenderPageBitmapWithMatrix.Henrique Nakashima
Change-Id: I5cb28dfd6b1e5670fc20093c5d2f9757ad6a4060 Reviewed-on: https://pdfium-review.googlesource.com/22830 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-01-11Remove Win Clang bots from CQ.Lei Zhang
They are redundant, since Clang is default on Windows. BUG=pdfium:871 Change-Id: Ic5d427394a91ca85c6b2b649d8a058e2c6796484 Reviewed-on: https://pdfium-review.googlesource.com/22737 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-11Rename CXFA_Event methodsDan Sinclair
This CL renames CXFA_Event methods for clarity and fixes callers where needed. Change-Id: I902a35f36ee91c1b4aadd10382d93988ef26dc1c Reviewed-on: https://pdfium-review.googlesource.com/22750 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename CXFA_Caption methods for clarityDan Sinclair
This CL renames the CXFA_Caption methods to make it clearer they can return nullptr. Change-Id: I1b4945fcd2615f16a128709b7fe07e1236a5461a Reviewed-on: https://pdfium-review.googlesource.com/22743 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename CXFA_Calculate methods to make return clearerDan Sinclair
This CL renames CXFA_Calculate::GetScript to make it clearer it can return nullptr. Change-Id: I1f5c19c16ea6cb1b3e7016ddac3f7f7fd6aa0320 Reviewed-on: https://pdfium-review.googlesource.com/22741 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename CXFA_Box methods to make return clearerDan Sinclair
This CL renames the methods in CXFA_Box to make it clearer they can return nullptr. Change-Id: I521c0e06af306f69e390a4057cabb7777a0d72f5 Reviewed-on: https://pdfium-review.googlesource.com/22740 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetExclGroup to GetExclGroupIfExistsDan Sinclair
This CL makes it clearer that GetExclGroup can return nullptr. Change-Id: Ica9bdfb05be36b3b6ede20f8b54daac1154506fd Reviewed-on: https://pdfium-review.googlesource.com/22739 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetItem to GetItemIfExistsDan Sinclair
Rename GetItem to make it clearer it can return nullptr. Change-Id: I0e09a79c3e2244b08212d3b51d3ad0e6a86edfd9 Reviewed-on: https://pdfium-review.googlesource.com/22713 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename CreateInstance to CreateInstanceIfPossibleDan Sinclair
This CL makes it clear that CreateInstance may return nullptr. Change-Id: I82f172a671761eae9055b0e9e55ab0e5a7d599aa Reviewed-on: https://pdfium-review.googlesource.com/22712 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Cleanup duplicate CXFA_Node accessorsDan Sinclair
These two accessors exist with other names or signatues, remove. Change-Id: Ieac073b746553160e4f2c41d9b63be47ad0ab61f Reviewed-on: https://pdfium-review.googlesource.com/22711 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetBind to GetBindIfExistsDan Sinclair
This CL updates the name to make it clearer the item an return nullptr. Change-Id: Icc5dbbf5ec3b9a8c73c6aaec585fdd61e2351c75 Reviewed-on: https://pdfium-review.googlesource.com/22710 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetFormValue to GetFormValueIfExistsDan Sinclair
This CL makes it clear that GetFormValue can return nullptr and fixes up a few callsites as needed. Change-Id: Id2e85b0956a678b5b338b9e2a4d32731fe6c4729 Reviewed-on: https://pdfium-review.googlesource.com/22690 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Change FPDFText_GetCharBox() to return a boolean.Lei Zhang
BUG=pdfium:858 Change-Id: Id8b6c032d60894eaf14ae0ba52098a60b2485fca Reviewed-on: https://pdfium-review.googlesource.com/22731 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-11Remove core/fxge/cfx_fontmgr.h from headers.Lei Zhang
Then do IWYU for CFX_FontMgr users. Change-Id: Id77529ccf45ec448c56c40412b78eb55925bd00e Reviewed-on: https://pdfium-review.googlesource.com/22531 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-11Change FPDFText_GetRect() to return a boolean.Lei Zhang
BUG=pdfium:858 Change-Id: Idc9900fe6f85b1fef06c97f5023653f77156d410 Reviewed-on: https://pdfium-review.googlesource.com/22730 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetDefaultValue to GetDefaultValueIfExistsDan Sinclair
This CL makes it explicit that GetDefaultValue can return nullptr. Change-Id: I871704e291358bc85a554e4f6410953f7223c61d Reviewed-on: https://pdfium-review.googlesource.com/22683 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Add jumbo build support for fdrm, fpdfdoc and fxcrt.Lei Zhang
BUG=pdfium:964 Change-Id: Ifde885861aeafac803948bd537de826e2a3fddca Reviewed-on: https://pdfium-review.googlesource.com/22732 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-11Rename Getvalidate and GetOrCreateValidateDan Sinclair
This CL renames the validation methods to make it clear they can return nullptr. Change-Id: I60d0c41cdfe9902049d99cd790f851517b11a6d9 Reviewed-on: https://pdfium-review.googlesource.com/22682 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Use range-based for-loops in a few more places.Lei Zhang
Change-Id: Id403abaf3d142dc30a661bc64ff48dbd5b10948e Reviewed-on: https://pdfium-review.googlesource.com/22736 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetCalculate to GetCalculateIfExistsDan Sinclair
This CL makes it explicit that GetCalculate can return nullptr. Change-Id: I587e3bb442df3661f083f7058ff02a8d62478ed5 Reviewed-on: https://pdfium-review.googlesource.com/22681 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Configure CQ to use Linux MSAN bots.Lei Zhang
BUG=pdfium:959 TBR=dsinclair@chromium.org Change-Id: Iea2e1eb0740c9d413787cbeded4a92a2e0b2cdf6 Reviewed-on: https://pdfium-review.googlesource.com/22733 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-10Rename GetPara to GetParaIfExistschromium/3318Dan Sinclair
This CL renames GetPara to make it explicit it can return nullptr. Change-Id: I7c6529c15646b9947964e25a8d28938b38f091d6 Reviewed-on: https://pdfium-review.googlesource.com/22680 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Encapsulate CTTFontDesc.Lei Zhang
Change-Id: I602890527dae9e2e2de16e70bccfa1793e31e0f8 Reviewed-on: https://pdfium-review.googlesource.com/22530 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-01-10Move FreeType version check to its own method.Lei Zhang
Fix some other nits in CFX_FontMgr as well. Change-Id: I4c15d1cc96c964c452dcab8962885d2b71d54a5d Reviewed-on: https://pdfium-review.googlesource.com/22471 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-10Fix some nits from commit a74e75d.Lei Zhang
Change-Id: Ib4556ac75efafee5a2566ad76acd87883303660f Reviewed-on: https://pdfium-review.googlesource.com/22679 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-10Rename GetTemplateNode to GetTemplateNodeIfExistsDan Sinclair
This CL makes it explicit that GetTemplateNodeIfExists can return nullptr. Various call sites are updated as needed. Change-Id: If6edd5962b59e7e4ce3dbe9bbdc957783cf76abe Reviewed-on: https://pdfium-review.googlesource.com/22678 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Remove unused parameter from FPDFDest_GetView().Lei Zhang
Fix a bunch of nits as well. Change-Id: I874f9b1d4676823635aad8986fcf23a11ae6efd9 Reviewed-on: https://pdfium-review.googlesource.com/22473 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-10Rename GetOccur to GetOccurIfExistsDan Sinclair
This CL makes it explicit that GetOccurIfExists can return nullptr and fixes up the call sites. Change-Id: I542d0098aa316632239df7f1a5796b4ffe6ba202 Reviewed-on: https://pdfium-review.googlesource.com/22676 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Rename GetMargin to GetMarginIfExistsDan Sinclair
This CL makes it explicit that GetMargin may return a nullptr. Change-Id: I46780e8df9e966accc38baf56f8aa5149533db87 Reviewed-on: https://pdfium-review.googlesource.com/22675 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Rename GetOrCreateFont to GetOrCreateFontIfPossibleDan Sinclair
This CL makes it explicit that GetOrCreateFontIfPossible can return nullptr. Change-Id: Ib5be6995e4225ad596dfb78a94f0bc56802716cc Reviewed-on: https://pdfium-review.googlesource.com/22674 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Rename GetFont to GetFontIfExistsDan Sinclair
This CL makes it explicit that GetFont may return nullptr. Change-Id: Icb7ec5ad4ed6c5f7a728230d1237898b8f2fd778 Reviewed-on: https://pdfium-review.googlesource.com/22673 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Rename GetOrCreateBorder to GetOrCreateBorderIfPossibleDan Sinclair
This CL makes it explicit that GetOrCreateBorderIfPossible can return a nullptr. Change-Id: I41d5e7ee506e95d95349e1e06198e40e8afa073c Reviewed-on: https://pdfium-review.googlesource.com/22672 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Correct spelling for XFA_RectWithoutMarginDan Sinclair
Fix spelling mistake. Change-Id: I1322bf898d8bf558f4d1e8d9b3294cf31f916c87 Reviewed-on: https://pdfium-review.googlesource.com/22671 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Rename GetCaption to GetCaptionIfExistsDan Sinclair
This CL renames GetCaption to GetCaptionIfExists to make it clear the value returned can be a nullptr. The various callsites have been fixed which used the caption without validating. Change-Id: I9b600ac9ab5b9e04dfa6e8cee95ef3e9d629688d Reviewed-on: https://pdfium-review.googlesource.com/22670 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Add FPDFAnnot_GetAP to public API.Henrique Nakashima
The matching FPDFAnnot_SetAP will be added in a subsequent CL. Change-Id: If567e02c6c56138d218498879cb4a8ee91dff080 Reviewed-on: https://pdfium-review.googlesource.com/22450 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-01-10Rename CXFA_Node::GetBorder to GetBorderIfExistsDan Sinclair
Renaming GetBorder makes it clear that the method may return a nullptr. Change-Id: I50a8b511e273552e3a4a226ba72a7c0e2ae74ea3 Reviewed-on: https://pdfium-review.googlesource.com/22653 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Change FPDFLink_GetRect() to return a boolean.Lei Zhang
BUG=pdfium:858 Change-Id: Ib8effb64a1622feb2837f536b36b9e46847a2210 Reviewed-on: https://pdfium-review.googlesource.com/22631 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-10Verify GetOrCreate results are checkedDan Sinclair
This CL updates users of the GetOrCreate* methods to verify that the value returned is not null before accessing. Change-Id: I4a9fd29a26d5e4ec792ca3671c9868828e53d46e Reviewed-on: https://pdfium-review.googlesource.com/22652 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10[OpenJPEG] Fix integer overflowNicolas Pena
Bug: 796812 Change-Id: I857f037028ea0e74544bdc7c8cd26b4b44e64ec4 Reviewed-on: https://pdfium-review.googlesource.com/22610 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-01-10Remove 2 param CXFA_Node::GetNodeItemDan Sinclair
This CL removes the CXFA_Node::GetNodeItem(kind, object_type) method in favour of explicit methods. All of the callers passed in a XFA_ObjectType::ContainerNode. Change-Id: I713184d3fa188a122284f50ac2a6b0fd3d7aed26 Reviewed-on: https://pdfium-review.googlesource.com/22651 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Remove CXFA_Node::GetNodeItemDan Sinclair
This CL removes the generic CXFA_Node::GetNodeItem(type) method for specific calls to get the parent, child or siblings. Change-Id: Ief68284ac7b954aaa4ed7120dd82a39f8b52656a Reviewed-on: https://pdfium-review.googlesource.com/22650 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Make methods which create nodes more obviousDan Sinclair
This CL converts the various methods Get methods which take a boolean value to explicit Get* and GetOrCreate* methods to make the usage clearer. Change-Id: I2af68448b1b69b95713e739bf7fe14a4336d2b65 Reviewed-on: https://pdfium-review.googlesource.com/22590 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Add missing C API check after commit ecd063ec.Lei Zhang
TBR=dsinclair@chromium.org Change-Id: I0bbc9d7f7170649db966318daa7df98e3438e460 Reviewed-on: https://pdfium-review.googlesource.com/22630 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>