summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi
AgeCommit message (Collapse)Author
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 .
2015-12-24Fix failed JPX image renderingJun Fang
BUG=pdfium:338 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1549043003 .
2015-12-22IWYU fix for commit ba2586d2c0a5.chromium/2601chromium/2600Lei Zhang
TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1545823002 .
2015-12-22Start using allowed C++11 features.Lei Zhang
R=dml@google.com, thakis@chromium.org Review URL: https://codereview.chromium.org/1544923002 .
2015-12-22Revert "Cleanup: Remove unused CFX_PSRenderer and various encoders it used."Lei Zhang
This reverts commit 2d63eaaa39bb3d402c658b2a6e0eae50a30f1d89. Broke the Windows build, though it is likely the code is unused on Windows too. Review URL: https://codereview.chromium.org/1540993004 .
2015-12-22Cleanup: Remove unused CFX_PSRenderer and various encoders it used.Lei Zhang
- Simplify remaining encoders. - Hook up more of the encoding paths so failures get returned. - Clean up code to not pass by non-const ref, use bools, etc. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1545563003 .
2015-12-22Add ContainsKey() and ContainsValue() and use them where appropriate.Lei Zhang
R=ochang@chromium.org Review URL: https://codereview.chromium.org/1540263003 .
2015-12-22Convert CPDF_Parser::m_CrossRef to a std::map.Lei Zhang
This improvements memory usage in case PDFs have sparse object numbers. The map holds a struct that currently has only one member. The struct will contain more members as other internal data structures get converted. BUG=pdfium:111 R=weili@chromium.org Review URL: https://codereview.chromium.org/1539573003 .
2015-12-18Get rid of a few CPDF_Object Create() methods and just use new instead.Lei Zhang
R=ochang@chromium.org Review URL: https://codereview.chromium.org/1540693002 .
2015-12-18CPDF_ImageLoader::Load() unused.Tom Sepez
Rename a few other things along the way: CPDF_ProgressiveImageLoaderHandle becomes ImageLoaderHandle, since its the only kind, and stop casting it to void*. CPDF_ImageLoader::StartLoadImage() becomes Start(), since the rest is redundant. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1535243002 .
2015-12-18Merge to master: Remove CFX_MapPtrToPtr in CFX_PageRenderCacheTom Sepez
Orignal Review URL: https://codereview.chromium.org/1539983002 . (cherry picked from commit 0fa6fee0e48af8681f0cd50f6a9471ecc0a46c11) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1536123002 .
2015-12-18CPDF_QuickStretcher unused.Tom Sepez
Apart from it never being initialized, note that m_status is never set to 1, so the only path that references this class can't be reached. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1537103002 .
2015-12-18Fix a memory leak in CPDF_DataAvail::CheckHintTablesOliver Chang
R=thestig@chromium.org, dml@google.com BUG=pdfium:327 Review URL: https://codereview.chromium.org/1536113002 .
2015-12-18Correct return values in CPDF_HintTables::CheckPage()chromium/2596Jun Fang
BUG=pdfium:329 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1529173005 .
2015-12-17Tidy CPDF_RenderContextTom Sepez
- Remove unused Clear() method. - Replace Create() with actual ctors. - Avoid const casts. - Protect members. - Add missing const in adjacent code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1536623004 .
2015-12-16Make clang_warning_flags work for standalone builds.Lei Zhang
Also fix a newly introduced override warning. R=thakis@chromium.org Review URL: https://codereview.chromium.org/1532723003 .
2015-12-15Fix free entry handling for cross reference v4 reading.Wei Li
While reading free entries in v4 cross reference table, changing the start_objnum caused crossref table built wrong. BUG=569795 R=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1527823003 .
2015-12-14Get rid of most instance of 'foo == NULL'Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1520063002 .
2015-12-14Get rid of most instance of 'foo != NULL'Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 .
2015-12-14Fix another former FX_BSTRC usage with embedded NULs.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1522283002 .
2015-12-14Remove FX_BSTRC.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1521563002 .
2015-12-14Fix a memory leak in FPDFPageFuncEmbeddertest.chromium/2595chromium/2594chromium/2593Lei Zhang
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1514283002 .
2015-12-14Properly land "Fix hint table loading issues."Oliver Chang
TBR=thestig@chromium.org BUG=566179 Review URL: https://codereview.chromium.org/1524983002 .
2015-12-14Fix hint table loading issues.Oliver Chang
BUG=566179 R=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1523523002 .
2015-12-11Fix memory leaks involving InsertIndirectObject()Jun Fang
BUG=447331 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1514093002 .
2015-12-11Fix a regression for parsing '/' - commit a568ff2d was too strict.chromium/2592chromium/2591chromium/2590Lei Zhang
BUG=pdfium:326 R=dml@google.com Review URL: https://codereview.chromium.org/1521543002 .
2015-12-10Fix integer and bounds issues in sycc4{22,44}_to_rgb.Oliver Chang
Also clean up while we're here. BUG=557223 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512833008 .
2015-12-10Replace several more CFX_MapPtrToPtr with std::set or std::mapTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1520643002 .
2015-12-10Remove CFX_AffineMatrix/CPDF_MatrixTom Sepez
These are synonyms for CFX_Matrix. Nothing but sed and manual deletion of 2 #defines in fpdf_parser.h and fx_coordinates.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1513363002 .
2015-12-10Cleanup CPDF_DIBSource::LoadColorInfo() and ValidateDictParam().Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1507043004 .
2015-12-09Prevent infinite looping in CPDF_Parser::LoadAllCrossRefV5().Lei Zhang
BUG=pdfium:298 R=weili@chromium.org Review URL: https://codereview.chromium.org/1496703005 .
2015-12-09Get rid of most uses of CFX_PtrArray.Tom Sepez
I didn't go whole hog and replace these with std::vector, but in the mean time, it is silly to cast a typedef for a template instantiated against void* when we can just instantiate the template against the actual type. The ones that remain are actual heterogeneous arrays with wacky casting. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1518593002 .
2015-12-06fix for stream object readingWei Li
Loosen a check for earlier version of PDF files. When the bytes with specified length are followed by 'endstream' keyword, even if there is no EOL marker before the keyword, it signals the end of stream. BUG=551258 R=jun_fang@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/1499433002 .
2015-12-04Fix an incorrect check in CPDF_DataAvail::CheckHintTables.Oliver Chang
R=tsepez@chromium.org, jun_fang@foxitsoftware.com BUG=566179 Review URL: https://codereview.chromium.org/1504513002 .
2015-12-01Add basic checking for RebuildCrossRefWei Li
RebuildCrossRef function returns false when we can not find file trailer or any indirect object. This serves as a basic file format checking. BUG=pdfium:215 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1476163002 .
2015-11-25Fix two memory leaks from pdfium_unittestsQin Zhao
- remove redundant alloc in fx_codec_jpx_unittest.cpp - free memory allocated by HexDecode calls in fpdf_parser_decode_unittest.cpp BUG=PDFium:239 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1467183006 .
2015-11-20Change |CCodec_ScanlineDecoder::m_Pitch| to FX_DWORDOliver Chang
This matches the type of the corresponding |CFX_DIBSource::m_Pitch|, where integer overflow is checked for FX_DWORD. This change is propagated to many other places. Also, check for integer overflow in |CCodec_RLScanlineDecoder::Create| during the calculation of |m_Pitch| since it aligns to 4 bytes while overflow was was previously checked without this alignment. R=tsepez@chromium.org, thestig@chromium.org BUG=555784 Review URL: https://codereview.chromium.org/1460033002 .
2015-11-19Cache object numbers in CPDF_Parser::ParseIndirectObject().Lei Zhang
R=jun_fang@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/1458633004 .