Age | Commit message (Collapse) | Author |
|
Change-Id: Iac581765f343f464f73a892b300ae20923c3bb32
Reviewed-on: https://pdfium-review.googlesource.com/39971
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Rename it CFX_ReadOnlyMemoryStream and swap out one use of CFX_MemoryStream.
BUG=pdfium:263
Change-Id: I15012df156a6a4d7c36f6fd58f32c355eae5fa1a
Reviewed-on: https://pdfium-review.googlesource.com/39878
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
No need to even bring any .cpp files in line with these headers.
Change-Id: I934169d77ae09adc11f02e5ea92b1f8b078c9477
Reviewed-on: https://pdfium-review.googlesource.com/39876
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Fix some other nits as well.
Change-Id: I837bd49526dd97ce666f8d8743fe5bd7653ae544
Reviewed-on: https://pdfium-review.googlesource.com/39410
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Replaces them with calles to the proxy function, FXSYS_time, so that
tests may use a stable time value instead of the wall clock value.
BUG=pdfium:1104
Change-Id: I4743c4634f56d4a6cba1f1130c4562a35cee1887
Reviewed-on: https://pdfium-review.googlesource.com/39853
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds a proxy, FXSYS_time, for the time syscall, so that a
testing mechanism can be implemented. Specically there is now a flag
for pdfium_test, --time=, that allows setting the time since the epoch
that will be returned. This plumbed all the way down into the proxy
and allows for stable results for tests that depend on getting the
current time.
There are other places in the code base that will need to be patched
like this, that will be dealt with in follow on CLs.
BUG=pdfium:1104
Change-Id: I2de185f8d47abe46704dd579c13a54948b7f81e0
Reviewed-on: https://pdfium-review.googlesource.com/39750
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Prevent stray calls to get time from the system without explicilty
including <time.h> in some .cpp file. This helps to be able to control
all the places where PDFium obtains time more carefully.
Change-Id: I9d52a00b9d4413e18c98f0476fabe7c5f2cd6574
Reviewed-on: https://pdfium-review.googlesource.com/39710
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Turns out that "FromUnicode" is misleading in that, on linux, it simply
removes any characters beyond 0xFF and passes the rest unchanged, so
no unicode decoding actually takes place. On Windows, it passes it into
the system function specifying FX_CODEPAGE_DefANSI, converting it into
the so-called "default ANSI code plane", passing some characters,
converting others to '?' and still others to 'A'. Either way, nothing
resembling UTF8 comes out of this, so pick a better name.
These now immediately look suspicious, so a follow-up CL will see
which ones should really be WideString::UTF8Encode() instead.
Making this a normal method on a widestring rather than a static
method on a bytestring feels more natural; this is parallel to
the UTF8Encode and UTF16LE_Encode functions.
Add a test that shows these conversions.
Change-Id: Ia7551b47199eba61b5c328a97bfe9176ac8e583c
Reviewed-on: https://pdfium-review.googlesource.com/39690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Instead of using an out parameter. Fix nits in the only caller as well.
Change-Id: I04eb92705b2fbda001191c36da972eee499acbc7
Reviewed-on: https://pdfium-review.googlesource.com/39490
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Generalize CPDF_TextPage::GetTextByRect(), so that it's possible to get
the text from a text page using a predicate, that way we can easily
get the text that belongs to single text object as well.
Change-Id: Ia457af0f41184694dc1481709be72b35685bce7f
Reviewed-on: https://pdfium-review.googlesource.com/39530
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I705a49198a91b67aa403beea4446095a6a359259
Reviewed-on: https://pdfium-review.googlesource.com/39415
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:869171
Change-Id: I0176bcafa8a63396d916916b5e10b96573085d04
Reviewed-on: https://pdfium-review.googlesource.com/39414
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Make consistent with other public API types.
Introduce CPDFSDKFormFillEnvironmentFromFPDFFormHandle() and
FPDFFormHandleFromCPDFSDKFormFillEnvironment() helper functions.
Use these to kill off some casts in the process.
Change-Id: I6230ecdb4cecd03076f5e24c8cc49c45ad694da7
Reviewed-on: https://pdfium-review.googlesource.com/39250
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Also initialize members in the header when possible.
Change-Id: I458bc433f79ac2f6c04d645f44db6f460fd0bdc1
Reviewed-on: https://pdfium-review.googlesource.com/39330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This follows the same pattern as DefaultGetFaceName(), so the client has
to call this function twice, but allocation of the string buffer happens
outside pdfium.
Change-Id: I06b7dcd00aca9b9b94799dad3f139617d7f5451e
Reviewed-on: https://pdfium-review.googlesource.com/38870
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
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>
|
|
BUG=chromium:828177
NOTRY=true
Change-Id: I30123087bbe11aaaa6175b5f729b7ab55107a975
Reviewed-on: https://pdfium-review.googlesource.com/38902
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I435ced292df79118fb65dd2922292ed29824dc1c
Reviewed-on: https://pdfium-review.googlesource.com/38970
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Part of the effort to reduce unchecked static casts.
Change-Id: I1bff1c53aa7c5804660de4b65cf01523d70fcbb7
Reviewed-on: https://pdfium-review.googlesource.com/38896
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Because it is a stronger pattern at runtime.
These were found by essentially: grep -ni '\bassert\b.*type'
Change-Id: I913d77139053e8980528597a6633e1859e5204c4
Reviewed-on: https://pdfium-review.googlesource.com/38890
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: chromium:842503
Change-Id: If411815d8324929f482e3cad0fda54f24d370c2a
Reviewed-on: https://pdfium-review.googlesource.com/37830
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Return encryption dictionary as const reference
from CPDF_Parser.
Create a copy in CPDF_Creator if needed.
Change-Id: I270f71d307d818fba7f65ebe379f5942ae816934
Reviewed-on: https://pdfium-review.googlesource.com/38390
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: Ie997bfa5437d4222a381be3fc2b4334d6c8e2d5b
Reviewed-on: https://pdfium-review.googlesource.com/38190
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Fix a couple of post submit comments on the originally version of this
API.
BUG=pdfium:953
Change-Id: Id5b7480c5791821340366371b4ab861e78d47e8b
Reviewed-on: https://pdfium-review.googlesource.com/38150
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds an experimental callback to the form fill API that
allows PDFium to signal to the embedder that an attempt call save
occurred. The embedder is responsible for showing an appropriate
UI when this occurs. When PDF saving is implemented the API can
be removed.
BUG=pdfium:953
Change-Id: Iba30f4d0547fe773b793e499995be426626092a0
Reviewed-on: https://pdfium-review.googlesource.com/35870
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
To be used together with the existing FPDFFormObj_CountObjects()
function.
Change-Id: I8ed69624e967708c8db7e8f135e28fbe6a52752f
Reviewed-on: https://pdfium-review.googlesource.com/37890
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Change-Id: Ibf09905523ae2d80ce48bfe7337733d8dc718669
Reviewed-on: https://pdfium-review.googlesource.com/37850
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
- FPDFPageObjMark_RemoveParam()
Bug: pdfium:1037
Change-Id: I3ec25128795c36ba7f2f72a9d288a7855ecc3180
Reviewed-on: https://pdfium-review.googlesource.com/37770
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
- FPDFPageObj_RemoveMark()
Bug: pdfium:1037
Change-Id: I7ff320261d64e3ead45375ccc72301e7c64dd6e3
Reviewed-on: https://pdfium-review.googlesource.com/37710
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: Ia2cd0d6ef99495dda3289988123489e3a2ad6e82
Reviewed-on: https://pdfium-review.googlesource.com/37750
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I2927ebdf0aff31193ad69dcd5542f3858ffdd6ee
Reviewed-on: https://pdfium-review.googlesource.com/37790
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
FPDF_ImportNPagesToOne() has width/height parameters to indicate the
dimensions of pages in the returned PDF. PDF is not a raster-based
format, so pixels are not the right unit for page dimensions.
Change-Id: Iff5b373a5a020b5822aaa29d2b44f1dbf7a75b13
Reviewed-on: https://pdfium-review.googlesource.com/37810
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: Ifcb0a4330d077895c5f02395588150f29a5466aa
Reviewed-on: https://pdfium-review.googlesource.com/37731
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
The new functions are:
- FPDFPageObjMark_GetParamBlobValue
- FPDFPageObjMark_SetBlobParam
Bug: pdfium:1037
Change-Id: Ie04df04c64c6cf517a8cde182d7e9a38c3c78d1b
Reviewed-on: https://pdfium-review.googlesource.com/37570
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: Iddc0d51874cf22d24ddf634ff767cd08807a4904
Reviewed-on: https://pdfium-review.googlesource.com/37630
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The functions:
- FPDFPageObjMark_GetParamValueTypeByKey()
- FPDFPageObjMark_GetParamIntValueByKey()
- FPDFPageObjMark_GetParamStringValueByKey()
are renamed, respectively, to:
- FPDFPageObjMark_GetParamValueType()
- FPDFPageObjMark_GetParamIntValue()
- FPDFPageObjMark_GetParamStringValue()
Bug: pdfium:1037
Change-Id: Iac9cc8c0a9ccaea101bbaaab9063cd2c755c9d47
Reviewed-on: https://pdfium-review.googlesource.com/37611
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The key getters are necessary to list the properties, but after getting
those keys, the *ByKey functions can be called. These functions are
therefore unnecessary.
In a follow-up CL, I will remove the "ByKey" suffix from the other
versions.
Bug: pdfium:1037
Change-Id: I02760025470a295971c4900fce1b6a8bbc7a5820
Reviewed-on: https://pdfium-review.googlesource.com/37590
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The marked content operators are BMC, BDC and EMC. In the case of
BDC, it is preceded by a direct dict or a property name.
Bug: pdfium:1118
Change-Id: I3ee736ff7be3e7d7dde55ef581af3444a325e887
Reviewed-on: https://pdfium-review.googlesource.com/37470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
One version is for a mark without a dictionary. The second is for
a mark with a direct dictionary. The third is for a mark with
indirect properties.
Bug: pdfium:1118
Change-Id: Ice0ff11d5ba4eaf2ccdf57be49b9140ba5c9b159
Reviewed-on: https://pdfium-review.googlesource.com/37550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
To find out the number of sub-objects a form object has, similar to how
FPDFPage_CountObjects() does it for page objects.
Change-Id: I7e5775dece42b74fd5b71b1d9622a1aa37bf64ac
Reviewed-on: https://pdfium-review.googlesource.com/37316
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
|
|
Bug: pdfium:1118
Change-Id: I2e9adaae64cba5b3915c19f3c99743cddbe58736
Reviewed-on: https://pdfium-review.googlesource.com/37371
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL creates the following new functions in the public API:
- FPDFPageObj_AddMark
- FPDFPageObjMark_SetIntParam
- FPDFPageObjMark_SetStringParam
Bug: pdfium:1037
Change-Id: Icabf3fdd8e8153b9156bab807a3708d38a9365d8
Reviewed-on: https://pdfium-review.googlesource.com/37330
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: Ie887c0bbf3e543676adec6d8411b0b3254677d3c
Reviewed-on: https://pdfium-review.googlesource.com/37170
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This is called by many client to make sure CountItems() does not
crash. Moving the check to CountItems() makes HasRef() unnecessary.
Bug: pdfium:1037
Change-Id: I4f21f33a88c9aad54f0dae18a38b370c6ceaec80
Reviewed-on: https://pdfium-review.googlesource.com/37133
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This allows deciding if FPDFPageObj_GetFillColor() or
FPDFPageObj_GetStrokeColor() should be used to get the effective color
of a text object.
Change-Id: Ic6e99a9eb8512b164756da8b5fcd8cd7771271ae
Reviewed-on: https://pdfium-review.googlesource.com/36750
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This enables more complicated cleanup when an observed object
is destroyed. Use it to make documents observable and to allow
the CPDF_Avail to cleanup without the need for intermediate class.
Change-Id: I3a8e758b7ff542e0a58710eff1ac8017205cbd45
Reviewed-on: https://pdfium-review.googlesource.com/36373
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 35ab1bd0328a244cc2f6dcde2822c8117738b01d.
Reason for revert: Causing crashes and bad flattening.
BUG=chromium:858921,chromium:858952
Original change's description:
> Simplify CPDF_PageOrganizer::UpdateReference method.
>
> Change-Id: I52fe66472bdc2a61d7074f77627a3ee1d5646255
> Reviewed-on: https://pdfium-review.googlesource.com/35611
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
TBR=dsinclair@chromium.org,art-snake@yandex-team.ru
Change-Id: I9a3635140867793e7109c15b64d66ec1d1a8b1f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/36550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
CPDFTextObjectFromFPDFPageObject() will take the FPDF_PAGEOBJECT and
performs the same check anyway.
Change-Id: I6535ab749d5a3222c6f2e6fba648f7ee515d3ddc
Reviewed-on: https://pdfium-review.googlesource.com/36372
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I52fe66472bdc2a61d7074f77627a3ee1d5646255
Reviewed-on: https://pdfium-review.googlesource.com/35611
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Improve CPDF_Document interface.
Fix relationship between CPDF_Document and CPDF_Parser.
This CL changes CPDF_Document to internally create the CPDF_Parser
and removes the need for the CPDF_Parser to know about the CPDF_Document.
Change-Id: Iec7aef19575c90f30b9a6c919dfd4f4417e4caf2
Reviewed-on: https://pdfium-review.googlesource.com/35630
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|