summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi
AgeCommit message (Collapse)Author
2016-01-29Another round of cleanup in CPDF_Parser and friends.Lei Zhang
- Remove dead code. - Add more public methods and remove friends. R=weili@chromium.org Review URL: https://codereview.chromium.org/1566133002 .
2016-01-29Refactor CPDF_Object and its subclasses.Wei Li
Mainly use virtual functions to replace functions with switch statements. Also remove a few unused functions and make some format changes. BUG=pdfium:63 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1634373003 .
2016-01-28Member 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 .
2016-01-26Merge to Master: War on #defines - part 2Tom Sepez
Original Review URL: https://codereview.chromium.org/1634123004 . (cherry picked from commit f10ae634e7b198b18942baaf9f111f07cc8ce818) R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1640473002 .
2016-01-26Move struct ContentParam off of CPDF_Object's enumsTom Sepez
They mean different things. The goal is that only usage of the CPDF_Object type enums outside of the class should be for switch() statements, so remove one other comparison. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1635173003 .
2016-01-26War on #defines, part 1.Tom Sepez
Make the two fundamental "object" types be enums. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1632143002 .
2016-01-25Merge to Master: Remove several more unused parser values.Tom Sepez
Review URL: https://codereview.chromium.org/1634683003 . (cherry picked from commit e24ea22700c9fc534d40cc510d59c453aa9d0ddb) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1632843004 .
2016-01-25Merge to Master: Remove struct PARSE_OPTIONS.Tom Sepez
Orignal Review URL: https://codereview.chromium.org/1630973002 . (cherry picked from commit 0f68785be6af2b15109bb8a8f3bb7ebc040500d5) R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1624343004 .
2016-01-25Merge to Master: Remove unused IsContentUsedElsewhere()Tom Sepez
Original Review URL: https://codereview.chromium.org/1638493002 . (cherry picked from commit 02056fae83c8136195c8eb2a00c3606f600a8b6a) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1632863002 .
2016-01-22Fixed object references in CPDF_ObjectWei Li
This is a regression from commit 90853cb. BUG=pdfium:365 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1617043004 .
2016-01-22Change _PDF_RenderItem to CPDF_RenderContext::Layer.Tom Sepez
The _CAPS class naming convention violates reserved identifier rules. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1620523002 .
2016-01-21Rename CPDF_PageObjects to CPDF_PageObjectListTom Sepez
Prefer class names to be singular. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1612113003 .
2016-01-21Redo CPDF_PageObjects - part 1Tom Sepez
Remove default args. Remove unreachable code. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1601093009 .
2016-01-21Rename CPDF_PageContentGenerate to CPDF_PageContentGenerator.Tom Sepez
Classes should be named after nouns, not verbs. Also mark methods private, not protected. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1611193003 .
2016-01-20Replace more CFX_MapPtrToPtr and remove it.Tom Sepez
Still used by XFA, so the merge will make this XFA only. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1580573002 .
2016-01-19Remove an extra "const" in fpdf_objects.Oliver Chang
TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1602323002 .
2016-01-19Keep all member functions of one class in a single file.Wei Li
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1581393011 .
2016-01-19Fix infinite loops caused by calling circular indirect objectsWei Li
There are multiple functions in CPDF_Object class which can cause infinite loop due to recursively calling circular indirect objects. Fix them by deference indirect object first. BUG=pdfium:355 R=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1585533002 .
2016-01-14Loose checking for trailer's size fieldWei Li
Although trailer's size value is required by spec, other readers such as Acrobat or libpoppler can handle without it. Loose up the check to be more tolerant. BUG=pdfium:213 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1582193002 .
2016-01-14Correct the way to count pages and to avoid infinite loopWei Li
BUG=pdfium:360 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1585823003 .
2016-01-13Fix some iterator invalidation issues while traversing CPDF_Dictionary.Oliver Chang
Also fixes a potential issue in CPDF_Dictionary::ReplaceKey. R=thestig@chromium.org BUG=577030 Review URL: https://codereview.chromium.org/1582963003 .
2016-01-13Do not use invalidated std::map::iterators in PDF_ReplaceAbbr().Lei Zhang
Avoid invalidating iterators by deferring the std::map operations. Also remove unused PDF_ReplaceFull(). BUG=577030 R=ochang@chromium.org Review URL: https://codereview.chromium.org/1581963004 .
2016-01-13Fix out of bound access in CPDF_Parser::ParseIndirectObject().Lei Zhang
This regressed in commit f6dafc9. BUG=576915 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1582763002 .
2016-01-13Use the compiler to type check DocAvailStatus return values.Lei Zhang
R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1575363007 .
2016-01-12Use std::map in CPDF_IndirectObjectsTom Sepez
Rename to CPDF_IndirectObjectHolder R=thestig@chromium.org Review URL: https://codereview.chromium.org/1576113003 .
2016-01-11Fix an infinite loop parsing in CPDF_SyntaxParser::GetObject()Wei Li
CPDF_SyntaxParser::GetObject() may enter into an infinite loop when a signature dictionary doesn't have 'Contents' field. Add a check to avoid that. BUG=pdfium:344 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1575833004 .
2016-01-11Tidy up shading patternsTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1570873005 .
2016-01-11Use std::map as CPDF_Dictionary's underlying store.Oliver Chang
Replaces CFX_CMapByteStringToPtr. XFA still uses CFX_CMapByteStringToPtr so it's not completely removed just yet. Adds begin()/end() to CPDF_Dictionary and removes the GetStartPos()/GetNextElement() functions to traverse the dictionary. Callers are changed accordingly. AddValue() is also removed. R=tsepez@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/1541703003 .
2016-01-08Switch most min/max macros to std::min/max.Lei Zhang
Fix lint errors along the way. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1567343002 .
2016-01-08IWYU in core/src/fpdfapi/fpdf_page/pageint.h.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1572733002 .
2016-01-08Use unique_ptr in fpdf_page/.Tom Sepez
Make m_InternalStage an enum. Use safe types to detect overflow. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1568373003 .
2016-01-08Fix infinite loop caused by parsing same indirect objectsWei Li
BUG=pdfium:343 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1569343002 .
2016-01-08IWYU fix after commit c5a8933.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1570973002 .
2016-01-08Endless tidying in pageint.hTom Sepez
Remove unused enum. Don't begin struct names with underscore. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1570133004 .
2016-01-08Clean up misc nits found while fixing bugs.Lei Zhang
Some bits regressed in commit 338805f. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1544963002 .
2016-01-07Make m_pStockMap a real map.Tom Sepez
Remove unused m_pContrastRamps. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1564783003 .
2016-01-07Cleanup includes, comments, and unused codeWei Li
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1563673002 .
2016-01-06Change CPDF_SyntaxParser::GetNextWord() to not pass by non-const ref.Lei Zhang
Change the internal version to GetNextWordInternal(). R=weili@chromium.org Review URL: https://codereview.chromium.org/1558083002 .
2016-01-05Replace CPDF_SortObjNumArray with a std::set.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1566553002 .
2016-01-05Fix a few uses of default arguments.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1555293002 .
2016-01-05Fix an infinite loop in CPDF_Parser::RebuildCrossRef().Lei Zhang
BUG=pdfium:325 R=weili@chromium.org Review URL: https://codereview.chromium.org/1543043003 .
2016-01-05Make more CPDF_Parser method const.Lei Zhang
R=weili@chromium.org Review URL: https://codereview.chromium.org/1549103002 .
2016-01-05Exit infinite loops for cross reference loadingWei Li
When cross reference sections form a loop, our code will enter an infinite loop. Add detection and exit code for v4 cross reference loading. V5 loading was done previously. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1558093002 .
2016-01-04Remove CPDF_Creator::m_ObjectSize, it's never read from.chromium/2615chromium/2614chromium/2613Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1543413002 .
2015-12-29Fix partial information printed with blank window covering the centerchromium/2612chromium/2611chromium/2610chromium/2609chromium/2608chromium/2607Jun Fang
BUG=482206 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1551563002 .
2015-12-29Change the generation number from 65536 to 65535 in the free entry of ↵Jun Fang
cross-reference table BUG=pdfium:342 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1550753002 .
2015-12-24Fix another regression from commit f6dafc9.Lei Zhang
TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1548963004 .
2015-12-24Switch from nonstd::unique_ptr to std::unique_ptr.Lei Zhang
R=thakis@chromium.org Review URL: https://codereview.chromium.org/1547833002 .
2015-12-24Call CheckLinearizedFirstPage() when loading the first linearized page.chromium/2602Lei Zhang
Otherwise CheckLinearizedFirstPage() has no other callers. BUG=pdfium:330 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1543193002 .
2015-12-24Fix crash from commit f6dafc9.Lei Zhang
BUG=571752 TBR=weili@chromium.org Review URL: https://codereview.chromium.org/1549073002 .