summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
AgeCommit message (Collapse)Author
2016-03-14Move fpdfsdk/src up to fpdfsdk/.Dan Sinclair
This CL moves the files in fpdfsdk/src/ up one level to fpdfsdk/ and fixes up the include paths, include guards and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1799773002 .
2016-03-11Re-enable MSVC warning 4800 for compiling with chromium_codeWei Li
Mainly change the code to avoid the warnings; in a few cases we have to use explicit casts. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1783023002 .
2016-03-10Split fpdf_parser_objects.cpp into per-class .cpp/.h files.Tom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1776913007 .
2016-03-10Split apart the remainder of fpdf_render_render.cpp into per-class files.Tom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1778173002 .
2016-03-09Review and cleanup lint warnings.Dan Sinclair
This CL goes through the remaining list of list warnings and records why they are currently blacklisted, or fixes and enables them. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1773733002 .
2016-03-08Split off CPDF_Document into its own .cpp/.h files.Tom Sepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1780503002 .
2016-03-01Remove implicit conversions and some cleanupWei Li
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1751753002 .
2016-03-01Fix and enable lint checks.Dan Sinclair
This CL fixes and enables: * readability/namespace * readability/multiline_string * readability/multiline_comment * readability/inheritance * readability/function * readability/braces R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1747123002 .
2016-02-26Remove some FX_BOOLsTom Sepez
Grepping for FX_BOOL and |==| on the same line gives a very strong clue that the expression won't be out of range of the |bool| type iteself. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1736323003 .
2016-02-26Re-land "Replace CPDF_Rect and CPDF_Point with CFX types."Tom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1737593006 .
2016-02-26Revert "Replace CPDF_Rect and CPDF_Point with CFX types."Tom Sepez
This reverts commit 3b8fdd34bdf57ec45291b77008a43249f838efcb. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1743753002 .
2016-02-26Replace CPDF_Rect and CPDF_Point with CFX types.Tom Sepez
Too many rectangle types. Remove CPDF_Rect #define, and make an equivalent point type in CFX, but stop short of consolidating the N different forms of rectangles in CFX. Also banish PDF_ClipFloat to the one .cpp file that needs it, since it was in the vicinity of the .h file changes. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1740923003 .
2016-02-23Remove uses of this->foo.Lei Zhang
R=weili@chromium.org Review URL: https://codereview.chromium.org/1722913002 .
2016-02-22Remove foo != NULL outside of xfa/Lei Zhang
Most of these are from the XFA branch. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1720043003 .
2016-02-19Revert "Revert "Use safe arithmentic in CFX_BinaryBuf::ExpandBuf.""Tom Sepez
This relands the CL at https://codereview.chromium.org/1710403002 Tests passed locally. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1717603003 .
2016-02-19Revert "Use safe arithmentic in CFX_BinaryBuf::ExpandBuf."Tom Sepez
This reverts commit 78353d5dbc0b0c9b2d6946005439a51efa7d108c. Reason for revert Failed tests. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1719493002 .
2016-02-19Use safe arithmentic in CFX_BinaryBuf::ExpandBuf.Tom Sepez
Always call ExpandBuf(), and if it returns, we know the subsequent calculations won't overflow. Also use std::unique_ptr, and fix unintentional copies thus detected by its suppressed copy ctor in fsdk_baseform.cpp Also Remove unused CFX_BinaryBuf::TakeOver(), AppendFill(), CopyData(). Also remove operator= in favor of using <<, for similarity with std::ostream and friends. Also move ByteStringC methods to CFX_ByteTextBuf sub-class. Also re-order members, may pack tighter on 64-bits. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1710403002 .
2016-02-03Merge to XFA: Fix prototypes for CPDF_FormNotify.Tom Sepez
Original Review URL: https://codereview.chromium.org/1660633003 . (cherry picked from commit e8ea737bf9ef95b406c74fc3b1120f3fa6c4e227) Conflicts: fpdfsdk/include/fsdk_baseform.h fpdfsdk/src/fsdk_baseform.cpp TBR=thestig@chromium.org BUG= Review URL: https://codereview.chromium.org/1668483004 .
2016-02-02Merge to XFA: Kill CFX_ByteArray in master.Tom Sepez
One trivial edit in fx_basic.h Includes both fixes for build breakage. Review URL: https://codereview.chromium.org/1653253002 . (cherry picked from commit 9b0a59d659d8083802385649ba74370d65c41e36) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1655423002 .
2016-02-01Merge to XFA: Remove CGW_ArrayTemplate and its O(n^2 log n) sort.Tom Sepez
Original Review URL: https://codereview.chromium.org/1652613002 . (cherry picked from commit 0841b0f37678ba4962247f5636e9390718fc027e) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1657663003 .
2016-01-29Merge to XFA: Member function name refactoringWei Li
This is needed by Cl 1634373003 as the name collision with virtual functions will be shown as warnings on Linux. Also, it is better to use different names for different cases. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1644633003 . (cherry picked from commit d45e7a51904164fb22049f0a7a80d2a94c06936b) Review URL: https://codereview.chromium.org/1648233002 .
2016-01-08Merge to XFA: Clean up misc nits found while fixing bugs.Lei Zhang
Some bits regressed in commit 338805f. Also merge: IWYU fix after commit c5a8933. R=tsepez@chromium.org TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1544963002 . Review URL: https://codereview.chromium.org/1570973002 . (cherry picked from commit c5a8933f260ca1034fde902058442984e55c0f7a) (cherry picked from commit e6bd31873c3dba3f79c5ebbbefed636948629cc9) Review URL: https://codereview.chromium.org/1577453002 .
2016-01-08XFA: Remove relative includes outside of xfa/.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1572523002 .
2016-01-05Merge to XFA: Remove header files that only have includes.Lei Zhang
Also do some cleanups in affected files. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1552583002 . (cherry picked from commit d794d34b5deb6ad691c19af758090f9ce46015a3) Review URL: https://codereview.chromium.org/1566583002 .
2015-12-24Merge to XFA: Fix a bad virtual keyword removal from commit 0f6b51c.Lei Zhang
BUG=546744 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1542373002 . (cherry picked from commit ae58ed8bccc56dd78c12d89972b19d58de94f790) Review URL: https://codereview.chromium.org/1548093002 .
2015-12-24Merge to XFA: Switch from nonstd::unique_ptr to std::unique_ptr.Lei Zhang
TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1547833002 . (cherry picked from commit d20dfba2ae10e8aeb328328f09da79ff904110a8) Review URL: https://codereview.chromium.org/1545183002 .
2015-12-14Merge to XFA: Get rid of most instance of 'foo != NULL'Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 . (cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7) Review URL: https://codereview.chromium.org/1529553003 .
2015-12-10Merge to XFA: Remove CFX_AffineMatrix/CPDF_MatrixTom Sepez
Review URL: https://codereview.chromium.org/1513363002 . (cherry picked from commit f32c969bce6743fca1e7ff796b54a1692d26d7f0) R=thestig@chromium.org Review URL: https://codereview.chromium.org/1519693002 .
2015-11-30Tidy PDF_ENABLE_XFA #ifdefs in fpdfsdk.Tom Sepez
-- label matching #endifs -- prefer #ifdef over #ifndef -- consolidate some blocks. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1484843002 .
2015-11-25Inflict PDF_ENABLE_XFA ifdefs on XFA fpdfsdk/Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1477583002 .
2015-11-24XFA: more underlying type changes to match masterTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1474663004 .
2015-11-24Fix build broken at 50d12ad.Tom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1477483002 .
2015-11-24Introduce "underlying types" to abstract XFA differences.Tom Sepez
See the comment in fsdk_define.h. Also tidy up a bit, and remove dead DeletePages(). This should help us match master more closely (given corresponding changes on the master side). R=thestig@chromium.org Review URL: https://codereview.chromium.org/1473503002 .
2015-11-23Merge to XFA: Add constant CPDFSDK_InterForm::kNumFieldTypesTom Sepez
Bumping this one line from 6 to 7 in XFA saves a bunch of diffs. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1458363005 . (cherry picked from commit 7711b60efc62db14748711727560367d948745f1) BUG= Review URL: https://codereview.chromium.org/1470563002 .
2015-11-12Merge to XFA: Remove relative includes.Lei Zhang
That refer to parent directories. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1434223002 . (cherry picked from commit 22bc4227fbbda5a5e9abad2a2c0a98c04fe7f228) Review URL: https://codereview.chromium.org/1439223003 .
2015-11-10Merge to XFA: Remove CFX_PtrArray usage in fpdfsdk.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1430213002 . (cherry picked from commit 8deeacd23872ecc132a0a678e344a018b5114a3a) Review URL: https://codereview.chromium.org/1416113010 .
2015-11-06Merge to XFA: Fix all relative includes to third_party.Lei Zhang
- In non-standalone builds, use the provided jpeg library. - Run gn format over all the GN files. - Also roll DEPS for buildtools to c2f2598. - And fix XFA's lack of #includes. BUG=541704 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425153006 . (cherry picked from commit 34bb6c58fe60206a08dc0a1f37b7cfe83e8c762c) Review URL: https://codereview.chromium.org/1434543003 .
2015-11-04Merge to XFA: Cleanup: Remove some NULL checks in fpdfsdk.Lei Zhang
And simplify code. TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1411663013 . (cherry picked from commit ff5adbc0dfa71270a9979f0c3e1d27923c16218a) Review URL: https://codereview.chromium.org/1414793016 .
2015-11-02Fix XFA compilation noise, part 1.Tom Sepez
Mainly: volatile/override/method shadowing. unused variables. intialization list init order. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1422113003 .
2015-10-30Merge to XFA: Clean up CPDF_AnnotList.Lei Zhang
- Remove dead code - Stop using CFX_PtrArray - Mark more things const - Fix style nits TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425093003 . (cherry picked from commit c88c42f317c0e94c4c7b98949bfe1a495aef07a9) Review URL: https://codereview.chromium.org/1430803003 .
2015-10-30Merge to XFA: Fix incorrect CPDFSDK_PageView::CountAnnots(). (try 2)Lei Zhang
The original XFA version was correct, and the master version here is wrong. The two versions are now in sync, but incorrect. So we need to fix this here and then merge to XFA again. Also fix what are now incorrect uses of CountAnnots() and do some cleanups. BUG=543049 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1413973011 . (cherry picked from commit c91d5c276b6b986f645d34a0e583fbe4f73e74bc) Review URL: https://codereview.chromium.org/1422503012 .
2015-10-27Merge to XFA: Use static_cast for various CPDF_Object conversions.Dan Sinclair
This Cl converts a bunch of c-style casts to static_cast<CPDF_Object*>(). BUG=pdfium:201 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1428583003 . (cherry picked from commit 74b147b5747cf65a8936d201b3ed5b32454365cc) Review URL: https://codereview.chromium.org/1417583007 .
2015-10-26Merge to XFA: Cleanup parts of CPDFSDK_AnnotIterator and CPDFSDK_PageView.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1411203007 . (cherry picked from commit 9b2741829b8a8c511ef0f2f313ff53d77ac96307) Review URL: https://codereview.chromium.org/1408263005 .
2015-10-22Merge to XFA: Add type cast definitions for CPDF_Stream.Dan Sinclair
This Cl adds ToStream, CPDF_Object::AsStream and CPDF_Object::IsStream and updates the src to use them as needed. BUG=pdfium:201 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1402413004 . (cherry picked from commit 338805f1366dcdf9a5b48cf591541cf98d7490f1) Review URL: https://codereview.chromium.org/1422513004 .
2015-10-22Merge to XFA: Remove unused CPDFSDK_InterForm::DoFDFBuffer.Dan Sinclair
This method isn't used anywhere and the implementation doesn't really do anything. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1405163003 . (cherry picked from commit 162f227af9c5e28885a36e6ca06a09c12c6223e0) Review URL: https://codereview.chromium.org/1416283002 .
2015-10-21XFA: add CPDFDocumentToFPDFDocument()Tom Sepez
Abstracts away that master returns CPDF_Documents directly, but XFA wraps them with a CPDFXFA_Document. Tidy dead code along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1415803002 .
2015-10-21Merge to XFA: Add type cast definitions for CPDF_String.Dan Sinclair
This Cl adds ToString, CPDF_Object::AsString and CPDF_Object::IsString and updates the src to use them as needed. BUG=pdfium:201 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1417933002 . (cherry picked from commit 53d3ab125ef583be8cfac907b308a6551b93067a) Review URL: https://codereview.chromium.org/1408323006 .
2015-10-20[Merge to XFA] Revert "Revert "Add type cast definitions for CPDF_Dictionary.""Dan Sinclair
This reverts commit 937840e1722d1f2b77d80575d6e710d760662c9c. Add type cast definitions for CPDF_Dictionary. This CL adds ToCPDFDictionary type definitions and updates one file to use instead of straight casts. I had to fix two places where we'd casted off the constness of the original pointer. BUG=pdfium:201 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1420583003 . (cherry picked from commit 39869b641511c882d78e17548293cdb458c36f38) Review URL: https://codereview.chromium.org/1410343003 .
2015-10-14Next round of XFA changes to match master.Tom Sepez
This contains a missed merge of the Document:delay fixes. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1398703009 .
2015-10-13Merge to XFA: Pass IJS_Runtime, not IJS_Context, to native object constructors.Tom Sepez
Original Review URL: https://codereview.chromium.org/1389163007 . (cherry picked from commit 848a13b6777cbff8cc4aea3ab3d69eaa0b82ae6c) Merge conflics in: fpdfsdk/src/javascript/JS_Runtime.cpp fpdfsdk/src/javascript/JS_Runtime_Stub.cpp fpdfsdk/src/jsapi/fxjs_v8.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1394993006 .