summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
AgeCommit message (Collapse)Author
2015-10-26Revert "Revert "Add type cast definitions for CPDF_Reference.""Dan Sinclair
This reverts commit 7e155865c90cc1115cc7193b7646a341d8f9093e. Add type cast definitions for CPDF_Reference. This Cl adds ToReference, CPDF_Object::AsReference and CPDF_Object::IsReference and updates the src to use them as needed. BUG=pdfium:201 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1418923005 .
2015-10-26Revert "Add type cast definitions for CPDF_Reference."Dan Sinclair
This is causing pixel test failures on the bots. FAILURE: bug_543018_2.in FAILURE: bug_543018_1.in FAILURE: bug_524043_1.in This reverts commit 9024e026dae1af064b8467bb0f62278417fb82d1. Add type cast definitions for CPDF_Reference. This Cl adds ToReference, CPDF_Object::AsReference and CPDF_Object::IsReference and updates the src to use them as needed. BUG=pdfium:201 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1420973002 . Review URL: https://codereview.chromium.org/1414393006 .
2015-10-26Add type cast definitions for CPDF_Reference.Dan Sinclair
This Cl adds ToReference, CPDF_Object::AsReference and CPDF_Object::IsReference and updates the src to use them as needed. BUG=pdfium:201 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1420973002 .
2015-10-22Add 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 .
2015-10-22Add type cast definitions for CPDF_Array.Dan Sinclair
This Cl adds ToArray, CPDF_Object::AsArray and CPDF_Object::IsArray and updates the src to use them as needed. BUG=pdfium:201 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1417893003 .
2015-10-21Add 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 .
2015-10-21Add type cast definitions for CPDF_Number.Dan Sinclair
This Cl adds ToNumber, CPDF_Object::AsNumber and CPDF_Object::IsNumber and updates the src to use them as needed. BUG=pdfium:201 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1410673005 .
2015-10-20Revert "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 .
2015-10-20Revert "Add type cast definitions for CPDF_Dictionary."Dan Sinclair
This reverts commit 4816432671eef6467354aa252f22bb80acc315b7. Reason, broke the javascript_test Rendering PDF file /mnt/data/b/build/slave/linux/build/pdfium/out/Debug/gen/pdfium/testing/javascript/document_methods.pdf. Non-linearized path... FAILURE: document_methods.in; Command '['/mnt/data/b/build/slave/linux/build/pdfium/out/Debug/pdfium_test', '/mnt/data/b/build/slave/linux/build/pdfium/out/Debug/gen/pdfium/testing/javascript/document_methods.pdf']' returned non-zero exit status -11 BUG=pdfium:201 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1412413002 .
2015-10-20Add type cast definitions for CPDF_Dictionary.Dan Sinclair
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/1399233003 .
2015-08-19Extern in .cpp files is a code smell.Tom Sepez
Part 1. Move to headers so compiler can type check against the definitions. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1299963002 .
2015-08-14Don't bother checking pointers before delete[] and FX_Free().Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1297713003 .
2015-08-05FPDF_Creator can only create file through embedder-supplied callback.Tom Sepez
Hence, some of the routines taking filename strings are unused. This, in turn allows us to get rid of some other fopen-ishy looking things inside the library. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1264423003 .
2015-08-04clang-format all pdfium code.Nico Weber
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163' | \ xargs ../../buildtools/mac/clang-format -i See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1265503005 .
2015-07-27Fix FX_BOOL compilation errors under windowsTom Sepez
- Bool functions should not return -1 for error. - Bool variables should not be assigned 2 - Bool / int32_t prototypes should match. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254973004 .
2015-07-27Revert "FX Bool considered harmful, part 3"Tom Sepez
This reverts commit ff46aaf499edcf153ee2f57c7016587aa96dcfa0. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255293002 .
2015-07-27FX Bool considered harmful, part 3Tom Sepez
Try to reland this patch after fixing underlying issues that caused it to be reverted. fx_system.h is the only manual edit. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1258093002 .
2015-07-23Revert "FX_BOOL considered harmful, part 2."Tom Sepez
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9. Reason for revert: build failure. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255693002 .
2015-07-23FX_BOOL considered harmful, part 2.Tom Sepez
Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 .
2015-06-19Cleanup: Do not check pointers before deleting them.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192743004.
2015-06-15Do some IWYU cleanups.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1176333002.
2015-06-11Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.Tom Sepez
At one point in time, it may have made sense to indicate the expected alignment of the memory you're about to copy, but that was last century. The compiler will take care of it just fine. I stopped short of removing the FXSYS_ wrapper macros entirely. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1179693003.
2015-06-10Remove typdefs for pointer types in fx_system.h.Tom Sepez
This involves fixing some multiple variable per line declarations, as the textually-substituted "*" applies only to the first one. This involves moving some consts around following the substitution. This involves replacing some typedefs used as constructors with better code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1171733003
2015-06-09Use stdint.h types throughout PDFium.Tom Sepez
It's redundant nowadays to provide our own equivalents, now that this is done for us by the system header. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1177483002
2015-05-19Re-land: Remove FX_Alloc() null checks now that it can't return NULL.Tom Sepez
Fixes the ordering of some assignments broken when converting to checked numerics in CFX_PathData::AddPointCount(). Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1135893008
2015-05-19Revert "Remove FX_Alloc() null checks now that it can't return NULL."Tom Sepez
This reverts commit eb6527763171cdb4b0fbfea5a20d691f4d67b660. Reason for revert: broke javascript tests. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1145843005
2015-05-19Remove FX_Alloc() null checks now that it can't return NULL.Tom Sepez
This permits some functions to become void's since they, in turn, can't fail. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1142713005
2015-04-16Replace FX_NEW with new, remove tests from fpdfapiTom Sepez
Very few places where a change is required, but remove FX_NEW to show they've been audited. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1075953004
2014-12-30Get rid of FX_LPCSTR cast.Bo Xu
Follow up on https://codereview.chromium.org/733693003 R=brucedawson@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/809993004
2014-11-17Zero initialize ch to avoid possible bug - conditions are very subtle.Bruce Dawson
Whether ch and iRet are read without being initialized depends on complex preconditions and cannot be determined by looking at these function. Therefore it seems prudent to zero initialize them to avoid any risk. BUG=427616 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/727083002
2014-07-29Fix a few more warnings in chromium_code mode.Nico Weber
No intended behavior change. - Remove more unused variables, functions, member variables. - Put a few constructor initializers in the order they execute in. - Add braces for subobject initializers. - Fix a handful of signed / unsigned comparisons. BUG=pdfium:29 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/429593005
2014-06-30Remove "this==NULL" and adjust corresponding callersBo Xu
BUG= R=thakis@chromium.org Review URL: https://codereview.chromium.org/361553002
2014-06-12Enable security removal in FPDF_Doc_SaveBo Xu
R=jam@chromium.org Review URL: https://codereview.chromium.org/333753002
2014-05-23Convert all line endings to LF.John Abd-El-Malek
2014-05-17Initial commit.John Abd-El-Malek