Age | Commit message (Collapse) | Author |
|
This CL converts CPDF_DefaultAppearance to return
Optional<CFX_Color:Type> items instead of having a HasColor. This saves
the double parse of the appearance stream.
Change-Id: Ib3c136da6e2adfb559e495de1d299cce0b4ad25f
Reviewed-on: https://pdfium-review.googlesource.com/29630
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the CPDF_DefaultAppearance code to remove the HasFont
method and change GetFont to return an Optional. This forces all the
call sites to verify a font was returned correctly and removes the need
for the duplicate appearance stream parsing.
Bug: chromium:827430
Change-Id: If09e0a7d3f7dd63ad77b97a5a388127e4a02da61
Reviewed-on: https://pdfium-review.googlesource.com/29610
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL converts the CPDF_DefaultAppearance::GetColor methods to return
instead of using reference parameters.
Change-Id: I9ba6bf060a536290a83d3c9ce6e115511f28664c
Reviewed-on: https://pdfium-review.googlesource.com/29410
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL moves code over to using CPDF_DefaultAppearance instead of
calling the CPDF_SimpleParser directly. This means the code for finding
a specific tag start can move into CPDF_DefaultAppearance directly.
Change-Id: I1dc64e54aedd03d059b963121d466f3eb75c17db
Reviewed-on: https://pdfium-review.googlesource.com/28410
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the ByteString version of PDF_NameDecode and forces the
callers to use the ByteStringView variant.
Change-Id: I5a955d8e909e2045ee45843af54b23e98abe00ed
Reviewed-on: https://pdfium-review.googlesource.com/29350
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also fix nits in QuadPoints code in cpdf_annot.cpp.
Change-Id: I7852b673d3dca906e6d250cb3cfa305f8ea7e742
Reviewed-on: https://pdfium-review.googlesource.com/28893
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also change it from a macro to a constexpr function.
Change-Id: I8b2bb42c45a23da6db136abdaee24132db4471c6
Reviewed-on: https://pdfium-review.googlesource.com/28579
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Currently, when constructing AP for multi-line markup annotations, we
only take into account the first set of quadpoints, resulting in only
the first line of the annotation being displayed if the annotation spans
multiple lines.
This CL, initially written by Jane Liu <janeliulwq@google.com>
(https://pdfium-review.googlesource.com/12010) takes into account all
the quadpoints, so multi-line annotations can be displayed correctly.
BUG=pdfium:876
Change-Id: I8be10ee38e01eb6525ddef556df1b727189455c7
Reviewed-on: https://pdfium-review.googlesource.com/28590
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
One that takes a CFX_FloatRect instead of LBRT floats. Use it where
appropriate.
Change-Id: I8ba19e86c61c91d8b4ef685b5cb65c8fb717f013
Reviewed-on: https://pdfium-review.googlesource.com/28581
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
When adding an annotation, an appearance stream (AP) is generated.
According to the PDF spec, the Subtype, Type and BM entries it contains
should be names rather than strings. Type should be set to XObject.
BUG=pdfium:1038
Change-Id: I0131eec33c257ab3a3a48c7e0dfeac5ca8dfbe2b
Reviewed-on: https://pdfium-review.googlesource.com/28550
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Minor cleanups and refactoring of the CPDF_DefaultAppearance class.
Change-Id: I7b3de021e8a6a1e9ca1d70ae413f3c433627f3fd
Reviewed-on: https://pdfium-review.googlesource.com/28390
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes default params from CPDF_DefaultAppearance methods.
Change-Id: Iaeebc7b35ebb6140850f3f0e0828c3ae9e3c5548
Reviewed-on: https://pdfium-review.googlesource.com/28350
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Methods unused. Removed.
Change-Id: I059b1e321b7d57f631368b77ace1d62cb75596c8
Reviewed-on: https://pdfium-review.googlesource.com/28310
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This method always returns true, so remove the return value.
Change-Id: I3da93fc5face39a53b589787873839c06c9fcfab
Reviewed-on: https://pdfium-review.googlesource.com/28210
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Both of these IPDF_FormNotify methods return {-1, 0, 1} but all
callsites only care about < 0 and >= 0. Convert to return a bool that
treats the 0 and 1 case as the same.
This also makse sense in terms of the API because false means validation
failure. The case where 0 was used was a place holder for we didn't try
for this field type, which also implicitly means validation passed.
Change-Id: I0950c678191b83caffd755d4a87b2f0efee71c89
Reviewed-on: https://pdfium-review.googlesource.com/28192
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Both of these IPDF_FormNotify callbacks have empty implementations which
just return 0. Removed.
Change-Id: I3324113222f19d2f7a2323ab5086e446d2064451
Reviewed-on: https://pdfium-review.googlesource.com/28191
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The IPDF_FormNotify::AfterFormImportData method is never called.
Removed.
Change-Id: I0c436193a0af7bc94077bb719e48682bbf7a9b2b
Reviewed-on: https://pdfium-review.googlesource.com/28190
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Get things out of the .data section.
Change-Id: I375cf00186a3d5d8d10f5d147bd4b692f5db3683
Reviewed-on: https://pdfium-review.googlesource.com/27130
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Didn't find any bugs, but also doesn't require much boilerplate.
Bug: TODO
Change-Id: I5f30183c55216f1333c79fcb46476d281720873e
Reviewed-on: https://pdfium-review.googlesource.com/26210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
|
|
FPDFDest_GetDestPageIndex() has a well defined return value for
errors (-1). Keeping FPDFDest_GetPageIndex() to avoid changing
behavior of the old API for whoever relies on it.
Bug: pdfium:938
Change-Id: Iad528923cb156e957a419540c262a65f45cb777d
Reviewed-on: https://pdfium-review.googlesource.com/24811
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: 806612
Change-Id: I22bd9046dd37a1b596762c46a6b29a323d6e9fa1
Reviewed-on: https://pdfium-review.googlesource.com/24410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
BUG=chromium:805881
Change-Id: I5ff76067fb26198df13482e6c475138142b3f6c5
Reviewed-on: https://pdfium-review.googlesource.com/24192
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The CPWL_EditImpl::Backspace() instance occurred in commit 671a799. The
other two instances where known cases.
BUG=chromium:805881
Change-Id: Iae7cb8534e85342069d8753ced88543dad751e92
Reviewed-on: https://pdfium-review.googlesource.com/24050
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I0a07dbc9850bef2184ed35ff04b08385fc1bdd17
Reviewed-on: https://pdfium-review.googlesource.com/22891
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This adds to form field types specific types for XFA form fields to be
used instead of the generic XFA value when possible.
BUG=pdfium:952,chromium:763129,chromium:592758
Change-Id: I8d1cff6a280d71db348b7c31a251cbe2e398ec79
Reviewed-on: https://pdfium-review.googlesource.com/22677
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: Iac18632ab1da7e30958278fd7769d5d7090e4242
Reviewed-on: https://pdfium-review.googlesource.com/22490
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I8be34dc4bc5ace65f5f56eb062b53faf4c1a6986
Reviewed-on: https://pdfium-review.googlesource.com/22311
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I53b91aa89c0fd1e7ab766f6d3c27a0fc7573c360
Reviewed-on: https://pdfium-review.googlesource.com/22290
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
FPDFDest_GetView returns the view fit type and the parameters of the
view for a given destination.
This is useful to have more precise internal links and bookmarks that
are able to manipulate the viewport position and zoom level to focus
on the part of the PDF that it links to.
Bug: 55776, 535978, 748852
Change-Id: Ibf7df40a852030d75ec78cec7662380319569850
Reviewed-on: https://pdfium-review.googlesource.com/21790
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Id8012a5769df68d29da5c58cc821c71ca93240e1
Reviewed-on: https://pdfium-review.googlesource.com/22111
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Change-Id: I7beca1aec8fe2dcd07a7bff7d173d2a5b39fa7b9
Reviewed-on: https://pdfium-review.googlesource.com/21830
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ic3dbc07ac80ad48fd670c090027cc151afc61e7f
Reviewed-on: https://pdfium-review.googlesource.com/20890
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Add LoadAllDataFiltered() and LoadAllDataRaw() and update callers.
Change-Id: I9b80ee34a358db204968acdc8b1adc9db0b6b83f
Reviewed-on: https://pdfium-review.googlesource.com/20810
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I45bac6e1b3fb9ae90feff1dc65c716beb2cab4c4
Reviewed-on: https://pdfium-review.googlesource.com/20771
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ia7ab625bcf802d0f6b15985065b7e0c3584bb2f1
Reviewed-on: https://pdfium-review.googlesource.com/20750
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug:
Change-Id: I4e25e96bbcade72115722ac7540d0d186cd2dc03
Reviewed-on: https://pdfium-review.googlesource.com/20631
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug:
Change-Id: I86b4c72343288d83d51f493d3d888aad45baed5a
Reviewed-on: https://pdfium-review.googlesource.com/20610
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I3efc57cd7325d16e3ca8ebdeeaec06012b2c56e3
Reviewed-on: https://pdfium-review.googlesource.com/20110
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL removes the use of CollectionSize from CPDF_StructTree and uses
size_t in the callers.
Bug: pdfium:774
Change-Id: I860a51a533642c949c497ca26e74ba064a8aa9ba
Reviewed-on: https://pdfium-review.googlesource.com/19530
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL changes CountKids to not used CollectionSize and returns size_t
directly. Callers updated as needed.
Bug: pdfium:774
Change-Id: I8862218e62cd13be9473fa8116afd29cd3afde04
Reviewed-on: https://pdfium-review.googlesource.com/19510
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I45468fa7944290fbbe3d2e67f884164ae8d84160
Reviewed-on: https://pdfium-review.googlesource.com/19171
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Or change them to clear().
Change-Id: Ia9e3e1f0d74b948cec3f8df85d205f830ac9216c
Reviewed-on: https://pdfium-review.googlesource.com/19172
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL moves the Format and FormatV methods of ByteString to be static.
Bug: pdfium:934
Change-Id: I9c30455a789aff9f619b9d5bf89c0712644f2d9a
Reviewed-on: https://pdfium-review.googlesource.com/18650
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves the Format and FormatV methods from WideString to be
static.
Bug: pdfium:934
Change-Id: I9941d6a2a5bbf0a82087cd0ea5d0f8fc42eecd3e
Reviewed-on: https://pdfium-review.googlesource.com/18630
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I4785dd277b9da072ee3c55e2aaeb688bbf02852e
Reviewed-on: https://pdfium-review.googlesource.com/17391
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL moves the annotation decision inside GenerateAnnotAP and hides
the individual annotation AP generation methods. The form methods are
hidden inside GenerateFormAP and a general GenerateEmptyAP has been
added.
Change-Id: I9e761cb10ceca70681df4e546631a7859f1bfc7c
Reviewed-on: https://pdfium-review.googlesource.com/16130
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|