summaryrefslogtreecommitdiff
path: root/core/include
AgeCommit message (Collapse)Author
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-25refactor CPDF_Font and subclassesWei Li
Get rid of types; use virutal functions instead of type based checking; remove unused functions; change casts; simplify load()/UnicodeFromCharCode()/CharCodeFromUnicode() calling. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1729823004 .
2016-02-25Make CFX_PSVTemplate simpler.Tom Sepez
Add default ctor so we don't have to zero these out. Also, make CFX_VTemplate simpler. Also, remove the Set() method in favor of assignment. Also, remove CFX_FloatPoint define. Also, remove unused (and wrong) CFX_VTemplate methods. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1733523003 .
2016-02-24Use stdint types for FX_WORD and FX_DWORD.Dan Sinclair
This Cl changes the definition of FX_WORD and FX_DWORD to use the stdint types. This will allow changing the uses on a directory basis to the stdint types. R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1727203002 .
2016-02-24Fixing whitespace lint errors.Dan Sinclair
This CL enables several of the diabled whitelist/* lint checks. R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1730553002 .
2016-02-23Remove FXSYS_MulDiv(a, b, c).Dan Sinclair
This is a wrapper which does (a) * (b) / (c). Inline the operations. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1726893002 .
2016-02-23Remove FXSYS_Div.Dan Sinclair
This is just a wrapper for (a) / (b). Inline the divide. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1727793002 .
2016-02-23Remove FXSYS_Mul.Dan Sinclair
This define just multiples the two parameters together. Inline the *'s. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1729613003 .
2016-02-23Remove many _CAPS structure names.Tom Sepez
They're technically not allowed because they are reserved for the preprocessor. Also get rid of LPC* typedefs along the way. Also provide a header for a data file containing many instance of these found along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1722873002 .
2016-02-23Sort includes in xfa/.Dan Sinclair
This CL sorts all the includes in the xfa/ directory. There are a lot of IWYU errors that have been fixed to make things compile again. BUG=pdfium:65 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1722803002 .
2016-02-22refactor CPDF_PageObject and subclassesWei Li
Use virtual functions to replace type based logic; remove unused functions; disable default copy constructor/assign operator. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1720003003 .
2016-02-22Switch from _DEBUG to NDEBUG.Lei Zhang
- NDEBUG is more widely used in Chromium - _DEBUG is not defined on Mac in Chromium - Leaving _DEBUG in for standalone debug builds for the benefit of third party libraries / Windows. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1721073004 .
2016-02-22Remove unused stuff from fx_sys.hTom Sepez
Move FX_DOUBLE to fx_system.h to keep it with the others until we remove it. Having one memset/cpy wrapper is dubious, two are worse. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1724523002 .
2016-02-19Tidy CFX_FixedBufGrow.Tom Sepez
Stop short of removing it since it looks like it may be used in some very hot paths. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1719543002 .
2016-02-19Remove IFX_BufferArchive.Tom Sepez
Merge it into CFX_FileBufferArchive, since both are in the same header file and it is the only subclass. Also, bTakeOver is always false, and the buf size is always 32K. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1712353002 .
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-19Get rid of CFX_CharMap instantiations.Lei Zhang
The only thing left are a couple of static methods. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1711273002 .
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-19Remove PageObject's m_Type and add As<Type> functionsWei Li
For CPDF_PageObject and its subclasses, remove m_Type and use GetType() instead. Also, add As<Type> functions to avoid casting all over the places. BUG=pdfium:397 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1709393002 .
2016-02-19Remove CFX_{Byte,Wide}String::ConvertFrom().Lei Zhang
Use/add CFX_{Byte,Wide}String::FromFoo() instead. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1711893003 .
2016-02-18Remove useless CPDF_FontCharMap.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1715583002 .
2016-02-18Clean up CPDF_FileSpec and add unit testsWei Li
Change implicit conversion to accessor function, remove unused function and unused parameter, add a couple checks for null pointers, and some cleanup. BUG=pdfium:247 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1703183002 .
2016-02-18Remove m_pDownloadCallback.Tom Sepez
Not only unused, but ugly-looking. Fix lint along the way. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1709313002 .
2016-02-18Fixup incorrect include guards.Dan Sinclair
This CL updates include guards throughout the code base to be in the chromium style. BUG=pdfium:65 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1707893004 .
2016-02-18Name the states for fpdf_parser_parser.Dan Sinclair
Currently the states are numbers, use names instead to make the code clearer where things are transitioning too. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1715483002 .
2016-02-18Sort headers in non-xfa directories.Dan Sinclair
This CL runs the chromium sort-headers.py script over the non-xfa code. XFA will be done after the includes have been updated to full paths. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1711793002 .
2016-02-17Banish CFX_ObjectArray to the XFA side.Tom Sepez
Tidy whitespace, add missing consts in a few places. Remove a few pointless typedefs. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1707953002 .
2016-02-17Remove CFX_PtrList from renderer main loop.Tom Sepez
Exposes an iterator over the object list, but not the object holder, since pages and forms inherit from object holder, and we don't want to imply that there's only one thing that might be iterated over for those classes. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1700183002 .
2016-02-17Expand all paths to be based off pdfium/ directoryDan Sinclair
This CL runs a script over the source and updates the include files to be a full path from the pdfium/ directory. BUG=pdfium:65 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1707923002 .
2016-02-17Banish CFX_ByteArray and CFX_WideArray to the XFA side.Tom Sepez
Fix IWYU and include paths as we go. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701883004 .
2016-02-16Split CPDF_PageObjectHolder off from CPDF_PageObjectListTom Sepez
Eventually, we're going to expose an iterator over CPDF_PageObjectList that we don't want to be inherited by the CPDF_PageObjectHolder sub-classes: page and form. Also, the operations that the object holder performs dealing with inquiring about masks and such seem beyond the scope of what a list would provide. Hence the "Holder" name. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701073002 .
2016-02-16Refactor CPDF_SimpleParser and add unit tests.Wei Li
Remove unused member functions and simplify calls to find tag parameters. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1681403007 .
2016-02-16Rework progressive render loop.Tom Sepez
Migrating this off of CFX_PrtList depends on first making this saner. The tricky part is checking whether new objects have been added to a partially-parsed layer. The old code used to do this by keeping track of the last element in the list, and seeing if it changes. It's far simpler to keep track of the last element processed, and just keep looking for more objects after it with each pass. Fold together some duplicated blocks along the way. Remove unused EstimateProgress() method. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1699443002 .
2016-02-12Fix the way to access marked content.Wei Li
When there is no dictionary for marked content, it potientially may cause crash. But it is not happening now since 1) we now check for the returned dict parameter 2) the alloc function in pdfium does zero initialization. BUG=pdfium:67 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1695633004 .
2016-02-12One less PI.Tom Sepez
One less Bezier. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1692413002 .
2016-02-12Remove the FX_MIN macro.Tom Sepez
Bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1693913003 .
2016-02-12Make fx_bidi sane.Tom Sepez
Replace array of heterogenous ints with array of struct. Create a class for traversing a string. Flip array when R2L and process with forward iterator always. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1682983002 .
2016-02-11Remove unused NormalizeString()Tom Sepez
- NormalizeString() has 1 caller: - CTextBaseLine::WriteOutput(), which has only 1 caller: - CTextPage::WriteOutput(), which has only 1 caller: - PDF_GetPageText_Unicode(), which has only 1 caller: - PDF_GetPageText(), which has no callers. Removing this also makes CheckRotate(), NormalizeCompositeChar(), and CTextPage unused. Removing those makes CTextBaseline() unused. Removing that makes txtproc.h unused. PDF_GetTextStream_Unicode also unused. ... and so on until entire files can be removed. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1689843002 .
2016-02-10Banish CFX_PtryArray to XFA side only.Tom Sepez
The m_Operators array represents a heterogeneous instruction stream, so leave it as a void* for now. R=thestig@chromium.org, thestig@chromimum.org Review URL: https://codereview.chromium.org/1676413002 .
2016-02-09Banish CFX_WordArray to XFA-land.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1676913004 .
2016-02-08Tidy fpdfsave.cppTom Sepez
Remove CFX_PtrArray filelist. Promote ScopedFileStream to .h file and use it. Fix _CAPS names, bool returns, and put in anonymous namespace. FX_CreateMemoryStream() can't return null, so remove checks. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1672153002 .
2016-02-05Remove CFX_FileSizeArray.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1671113002 .
2016-02-04Use full include path in core/include/fpdfapiTom Sepez
TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1669113002 .
2016-02-04Remove CFX_PtrArray from fx_xml.hTom Sepez
Removes another case of a void* array where the even elements mean one thing and the odd elements mean another. And even the odd elements aren't consistently typed -- leave for later. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1671473002 .
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-03Merge to XFA: Complete unit tests for CPDF_ArrayWei Li
Also remove one unnecessary member function. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1660523003 . (cherry picked from commit 6f358daa2e8b1639a1c3a3f07a449f8450197e8b) Review URL: https://codereview.chromium.org/1667873002 .
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 the m_ObjVersion member variable from CPDF_Parser.Lei Zhang
Use the gennum field in the m_ObjectInfo map instead. BUG=pdfium:111 R=weili@chromium.org TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1654303002 . (cherry picked from commit a620372c9e1d0ff825bcbe6620fe7e1b63c769c2) Review URL: https://codereview.chromium.org/1653023004 .
2016-02-01Merge to XFA: Remove the m_V5Type member variable from CPDF_Parser.chromium/2641chromium/2640chromium/2639chromium/2638Lei Zhang
Use the type field in the m_ObjectInfo map instead. BUG=pdfium:111 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1650793002 . (cherry picked from commit 93c196d868535f684007a7d3ed1f7146851a0ab9) Review URL: https://codereview.chromium.org/1652083004 .