Age | Commit message (Collapse) | Author |
|
These are generally cheap enough to compute as needed, rather than
keeping around in memory all the time (plus the memory for the static
flag the compiler generates to check if initialized).
Change-Id: If3a5365521f6a7781e66fb11f04883a5c673ee11
Reviewed-on: https://pdfium-review.googlesource.com/27150
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the XFA code in FPDFPage_HasFormFieldAtPoint() to
return the actual form field the mouse is over, and not always
FormFieldType::kXFA.
Bug: chromium:811331
Change-Id: I4157f58d057972dc2f4e79036493e079c611c9ec
Reviewed-on: https://pdfium-review.googlesource.com/26970
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I1fd4bf85cd709de1c14ed2895d045018f79bc61f
Reviewed-on: https://pdfium-review.googlesource.com/26950
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL copies the SkPDF code to convert floats into strings when
writing back to PDF files.
Change-Id: I8f8af3924a07aa67f93b9d951af1eef5d2c705db
Reviewed-on: https://pdfium-review.googlesource.com/21990
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Hal Canary <halcanary@chromium.org>
|
|
This makes it obvious if they are dictionaries that are only read from,
or if they are being modified.
Also clarify some page dictionary variables names to make it obvious
that they are the source or destination page.
Change-Id: I1d3c769c9940296b8f159b454bde32e595a95cac
Reviewed-on: https://pdfium-review.googlesource.com/26330
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
It's always the same member variable. Also make a
CPDF_NPageToOneExporter::FinishPage() parameter const-ref.
Change-Id: Id2550115259177d72b814bf6d4afe5fb775f6b86
Reviewed-on: https://pdfium-review.googlesource.com/26290
Reviewed-by: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:1011
Change-Id: Ie12595f321888c50ae74ab22bb147aef7e20f40d
Reviewed-on: https://pdfium-review.googlesource.com/26390
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I653619faa61181137795bb3675418fd8d0945d25
Reviewed-on: https://pdfium-review.googlesource.com/25590
Commit-Queue: dsinclair <dsinclair@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>
|
|
Change-Id: I4ced221fb5691927485deceb7002dac880c2c210
Reviewed-on: https://pdfium-review.googlesource.com/26110
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Instead of having separate floats for width and height.
Also remove some out parameters and just return them instead.
Change-Id: I798b1453910c89477d422dcb7c0805b90823bf98
Reviewed-on: https://pdfium-review.googlesource.com/26090
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
- Fix typos.
- Do not pass by value.
- Return early if the page range string is empty after removing spaces.
- Simplify and rearrange bits of the implementation.
Change-Id: Ia4c4f43c2ca18383ad1edc8233969a7013e34722
Reviewed-on: https://pdfium-review.googlesource.com/24290
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
|
|
Change-Id: I8c6d813e488b2612a85fb1973382f979728df563
Reviewed-on: https://pdfium-review.googlesource.com/25571
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Retain CPDF_PageOrganizer as a base class. Add CPDF_PageExporter and
CPDF_NPageToOneExporter sub-classes. The sub-classes only do one type of
exporting. Therefore it is much easier to understand what part of the
original combined CPDF_PageOrganizer is used where.
Change-Id: I424ef9c32b101d23e8397fc9a656d9b0b5da6a27
Reviewed-on: https://pdfium-review.googlesource.com/26011
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
|
|
This is to prepare for splitting CPDF_PageOrganizer into multiple
classes.
Change-Id: Ibf54342096aeb66465fd24dc1ba40c73112fb4c9
Reviewed-on: https://pdfium-review.googlesource.com/26010
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
- Keep track of pages in a single map when calling LoadPage(). It is
simpler and performance is not crucial as the number of loaded pages
is usually very small.
- Verify UnloadPage() is only called for loaded pages.
- Verify there are no loaded pages in TearDown().
- Verify RenderLoadedPage methods are only rendering loaded pages.
- Fix pages that are using FPDF_LoadPage() and FPDF_ClosePage() when
they should be using LoadPage() and UnloadPage().
- Disallow calling LoadPage() for the same page number repeatedly. No
caller does this and it makes verification in UnloadPage() harder.
Change-Id: I58878ea8ade21dde28f1bbebd3a3304ce677561d
Reviewed-on: https://pdfium-review.googlesource.com/25550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Do some additional checks in test cases where pages were rendered but
the resulting bitmap was immediately destroyed.
Change-Id: I2f4678140cdc672ab4ced70f748135464447ff59
Reviewed-on: https://pdfium-review.googlesource.com/25510
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Add replacement methods that make themselves clear as to what they are
rendering, and return unique_ptrs to help prevent leakage. Mark existing
methods deprecated.
Change-Id: I9055407e614dfbe765428fb32a7da64df3418d1d
Reviewed-on: https://pdfium-review.googlesource.com/25470
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
- Pass by const ref.
- Simplify logic.
- Return page number vector directly.
Change-Id: If68c89437380b871ca6635f2355049dd19a9e512
Reviewed-on: https://pdfium-review.googlesource.com/24270
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
|
|
The code changes include two parts:
1. Only updating resources' reference caused font not to clone properly.
Hence changing to update reference from the root of the source page
dictionary.
2. Since PDF objects are at document level, pObjNumberMap needs to be
defined before pages are created to avoid same object being copied more
than one times with different object numbers.
Change-Id: I6f90aff2e3901cee73ce09fe550ad79add6be7eb
Reviewed-on: https://pdfium-review.googlesource.com/25190
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This makes the caret appear (again?), blink, and fixes its positioning
to be a little spaced from the last character.
Known issue: when the edit is empty, the caret is not necessarily
aligned with where the text will be.
Bug: chromium:592750
Change-Id: I950b0ea236db8855c6ed50f48ec1935d97e6ccf8
Reviewed-on: https://pdfium-review.googlesource.com/25451
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
One test is added to render the output pdf of FPDF_ImportNPagesToOne,
and check the width, height and hash value of the rendered image.
Change-Id: Idd3f953d62ecd4e85ad52a9323eb13243dc49597
Reviewed-on: https://pdfium-review.googlesource.com/25330
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The class started with |foo_bar_| but now has a mixture of |foo_bar_|
and |m_FooBar|. Change them all to |foo_bar_|. While making this
change, also initialize the members in the header when possible.
Change-Id: I202ff5dc5e945175ad4da2f3245724f3493aa8aa
Reviewed-on: https://pdfium-review.googlesource.com/25390
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Use it in existing code where appropriate.
BUG=chromium:808269
Change-Id: I55b67db05267f4f05a98c9bf8bbd43f6524cbc65
Reviewed-on: https://pdfium-review.googlesource.com/25210
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also tidy some sub-expressions.
Change-Id: Ieabd5f6cea60e8ec03c8ce5ebe372fc80b05a7bb
Reviewed-on: https://pdfium-review.googlesource.com/25150
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Also rename the file to fpdf_ppo.cpp so it is consistent with the public
header file name. This makes the linter happy.
Change-Id: Ib3608c78111842579898c55f1399982ab2549310
Reviewed-on: https://pdfium-review.googlesource.com/24970
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: 773229
Change-Id: Ic3774c7f6abe3a195bbe09b91d91c549d4d7ac46
Reviewed-on: https://pdfium-review.googlesource.com/25110
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The new GetDestPageIndex() method does the same thing, but has a
consistent form of returning an error (returns -1).
Bug: pdfium:938
Change-Id: I31583e1c544d9173a28582b849edd5f73c40e174
Reviewed-on: https://pdfium-review.googlesource.com/25070
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
No change in functionality yet, just passing higher level object.
Precursor to maybe sharing v8 context between fxjs / fxjse.
Mark unimplemented ctors / assignment operator as "delete".
Change-Id: I100de7755909eec2eed96f6f51216d85923ffbb2
Reviewed-on: https://pdfium-review.googlesource.com/25050
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:938
Change-Id: Ic530788313157ce2513f91217705401da7a05ef8
Reviewed-on: https://pdfium-review.googlesource.com/25030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@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>
|
|
There is a GetPageContent in pdfsdk/fpdfppo.cpp and one in
fpdfsdk/fpdf_transformpage.cpp, both in the anonymous namespace. In jumbo
builds those two files compile in the same translation unit and then
they share the same anonymous namespace and clash.
Given that the function is small and that I saw no natural place to
share it, this patch moves one instance into the class that is
using it.
Change-Id: Icbdf69bd83887c6e5cf31d2080a5b12b5710691e
Reviewed-on: https://pdfium-review.googlesource.com/24990
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Prior cleanup before making FXJS/FXJSE share one v8 context.
Return CJS object rather than isolate in one place.
Use unique_ptr in one place.
Change-Id: I837ae4880368a6d72e59b38f37e06908e05c34bd
Reviewed-on: https://pdfium-review.googlesource.com/24950
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
FPDF_ImportNPagesToOne function is added to support N-up feature
for print.
If numPagesOnXAxis * numPagesOnYAxis == 0
Returns a nullptr.
If numPagesOnXAxis * numPagesOnYAxis == 1
Creates a new PDF document, and import one page to each output
page of the PDF document
If numPagesOnXAxis * numPagesOnYAxis > 1,
FPDF_ImportNPagesToOne imports multiple pages onto the same page.
This feature is intended for print pipeline to use.
Change-Id: Iec1afffe377ff9b7fef3cb33414b29b324154fa4
Reviewed-on: https://pdfium-review.googlesource.com/22050
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@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>
|
|
This CL cleans up some of the code around passing input information
around.
Change-Id: Id3c1ffa93c9e50c3b6312b15533ccc32c7406264
Reviewed-on: https://pdfium-review.googlesource.com/24710
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I064ddcad8671b9ade2c02142a6c2c2983846e3a9
Reviewed-on: https://pdfium-review.googlesource.com/24650
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL consolidates the duplicate RunScript code in
CPDFSDK_ActionHandler.
Change-Id: I08beb7644b6cbaa7906e5bb302372fd8a670f32a
Reviewed-on: https://pdfium-review.googlesource.com/24630
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up nits in some SDK code.
Change-Id: Id8dc5face65230e607119a65c821fcde01483ad2
Reviewed-on: https://pdfium-review.googlesource.com/24610
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes unused Synchronization methods and makes methods private
which are not used externally.
Change-Id: Icd7106e20adc957b7ced45d8fc5014d84ac8a154
Reviewed-on: https://pdfium-review.googlesource.com/24590
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL combines more code where the loops for combo and list were
almost identical.
Change-Id: Id2ab9e2cb093e78d6922813ff18d7c6736032a03
Reviewed-on: https://pdfium-review.googlesource.com/24553
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL combines some ComboBox with ListBox code to remove duplication
when dealing with choice lists.
Change-Id: I735b6596c67aaf80ab96573af5c8d81e7875c27c
Reviewed-on: https://pdfium-review.googlesource.com/24551
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Users of FPDF_ImportPages API may import more than 65535 pages. Hence
changing pageNums definition to uint32_t.
Change-Id: I5a79e9cdd3022141b4d35995e833390db1bf3696
Reviewed-on: https://pdfium-review.googlesource.com/24071
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Shirleen Lou <xlou@chromium.org>
|
|
This CL converts the UIType to an XFA_FFWidgetType instead of reusing
the XFA_Element type. The creation code is cleaned up to make it clearer
what's happening.
Change-Id: I5d3e4967d5c8b8a50dbb25e574b0d31fe0cf407a
Reviewed-on: https://pdfium-review.googlesource.com/24390
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
- Update public API documentation.
- Fix nits in the implementation.
Change-Id: I4c7af07b0ec178a5986f45652663f48491b7d078
Reviewed-on: https://pdfium-review.googlesource.com/24330
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@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>
|
|
The functionality to get page numbers in FPDF_ImportPages will be
used in other functions too. So create a new function which can
be reused easily.
Change-Id: Iad7726f086168e70c8b7988b07f1c18c758ef303
Reviewed-on: https://pdfium-review.googlesource.com/24250
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL removes the calls to CXFA_Node::GetWidgetAcc() as they
redundantly return the node they were called upon.
Change-Id: I46e66cf98137a1dee7cd3fa8bc7d379eb97fded5
Reviewed-on: https://pdfium-review.googlesource.com/23630
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL merges CXFA_WidgetAcc into CXFA_Node.
Change-Id: Iab52ca7f98c9dcd4ab089c61b8f1324a565bf647
Reviewed-on: https://pdfium-review.googlesource.com/23610
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates CXFA_FFDocView methods and members to use CXFA_Node
objects instead of CXFA_WidgetAcc objects.
Change-Id: Ic79af39ef49152a6d50ed5acfc153063db39353d
Reviewed-on: https://pdfium-review.googlesource.com/23590
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|