summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
AgeCommit message (Collapse)Author
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/1520063002 . (cherry picked from commit e385244f8cd6ae376f6b3cf1265a0795d5d30eff) Review URL: https://codereview.chromium.org/1528763003 .
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-14Merge to XFA: Remove FX_BSTRC.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1521563002 . (cherry picked from commit 1956a174020686f91cd3b34294e91f4560fe45aa) Review URL: https://codereview.chromium.org/1526823002 .
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-16Merge to XFA: Reland "Cleanup some numeric code.""Dan Sinclair
This reverts commit 0569ab0b11b723d9bca4ddd642b0cf8828c4bdd1. This changes the various comparisons of char >= '0' && char <= '9' and char < '0' || char > '9' to use std::isdigit checks. It also cleans up a handful of hex to digit conversions to call one common method. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1449873003 . (cherry picked from commit 3f148915d12f54a946a0c0bf526162b79c39d650) Review URL: https://codereview.chromium.org/1452673002 .
2015-11-10Merge to XFA: Cleanup CPDF_Stream:Lei Zhang
- Remove CPDF_Stream::Create() and checks that it might fail. - Remove m_pCryptoHandler that's always a nullptr. - Remove m_FileOffset that's always 0. - Rename file version of InitStream() to InitStreamFromFile(). - Use IsMemoryBased() in more places. TBR=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1415163009 . (cherry picked from commit e6e16954f0cdc324849fca9da883be8f131b3834) Review URL: https://codereview.chromium.org/1418493006 .
2015-11-10Merge to XFA: Fix relative includes within core/Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1427633010 . (cherry picked from commit 9fb27cb9797937499c9678bc74cf7846cbf5d2b8) Review URL: https://codereview.chromium.org/1438573002 .
2015-11-09Merge to XFA: Add some nullptr checks that were missing from commit f7992b39.Lei Zhang
BUG=pdfium:268 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425293010 . (cherry picked from commit a8f5b7b5e7501bdcfba585fc8af76c4a0fab22cb) Review URL: https://codereview.chromium.org/1418823008 .
2015-11-02Merge to XFA: Add a test for the HexDecode method.Dan Sinclair
I moved the declaration to be public, instead of having it implicit in one file and defined in a seperate cpp file. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1410873009 . (cherry picked from commit e948a4ee08b78e27da37bc12244fa1b66d927dc7) Review URL: https://codereview.chromium.org/1432513002 .
2015-10-28Merge to XFA: Add PDFCharIsLineEnding helperDan Sinclair
This CL adds a helper to check if a given character is a \n or \r. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1418073006 . (cherry picked from commit 4b38229b004b7b6493cb4c4507df450adc6085f6) Review URL: https://codereview.chromium.org/1428763002 .
2015-10-28Merge to XFA: Add constants for the path operators.Dan Sinclair
This CL adds constants for some of the path operators to make it more obvious what is being checked. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1413783009 . (cherry picked from commit 5a4af03849c8389872cd6908222df4c4e7f99ca8) Review URL: https://codereview.chromium.org/1415333006 .
2015-10-28Merge to XFA: Add PositionIsInBounds to CPDF_StreamParserDan Sinclair
This Cl moves all of the m_Size <= m_Pos and m_Pos >= m_Size checks to an PositionIsInBounds() helper. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1412793008 . (cherry picked from commit b9d06fb2186d7002d6231d1805bcf97fc60144c5) Review URL: https://codereview.chromium.org/1414163007 .
2015-10-28Merge to XFA: Add helpers to check the PDF_CharType.Dan Sinclair
This CL adds helpers to provide more descriptive access to PDF_CharType. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1407913004 . (cherry picked from commit e3e5675bcdd26b8df7286e10a42d585df6d2321d) Review URL: https://codereview.chromium.org/1419893004 .
2015-10-26Merge to XFA: Remove default argument from CPDF_Dictionary::SetAt().Lei Zhang
Also fix a potential object leak. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1414963005 . (cherry picked from commit f7992b39cec908e549fb995acae477a9efba538b) Review URL: https://codereview.chromium.org/1421253005 .
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: Add 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 . (cherry picked from commit c2bfc000e502c42c9a3017038fd9104c7997d126) Review URL: https://codereview.chromium.org/1419643005 .
2015-10-21Merge to XFA: Add type cast definitions for CPDF_Name.Dan Sinclair
This Cl adds ToName, CPDF_Object::AsName and CPDF_Object::IsName and updates the src to use them as needed. BUG=pdfium:201 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1417823005 . (cherry picked from commit 1c77edb7b34e03787605b7965784cea38ef9f1d7) Review URL: https://codereview.chromium.org/1417033004 .
2015-10-15Merge to XFA: Plug a leak in CPDF_StreamParser::ReadInlineStreamOliver Chang
R=tsepez@chromium.org, thestig@chromium.org BUG=pdfium:212 Review URL: https://codereview.chromium.org/1405203002 . (cherry picked from commit fb3c41e5324671bce0b0ec025f4e94ae0b20906e) Review URL: https://codereview.chromium.org/1406103002 .
2015-10-01Merge to XFA: Clean up some image decoder classes:Lei Zhang
- Use std::vector<uint8_t> instead of raw uint8_t* - Make ICodec_ScanlineDecoder::GetScanline() return const uint8_t* - Add FxFreeDeleter, use it in CCodec_ImageDataCache. - Make CCodec_ImageDataCache encapsulate its data members. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1361053002 . (cherry picked from commit 022da0014faa103901ec107ed6a33e5ab00c7931) Review URL: https://codereview.chromium.org/1372993003 .
2015-09-25Merge to XFA: Fix the issue that pdfium swallows 'fi' or 'ff' in some pdf filesLei Zhang
Pdfium swallows 'fi' or 'ff' in some tested files because it doesn't load the embedded font file correctly. The root cause is that there is incorrect keyword like 'ngendstream' in the stream of the embedded font file. Pdfium tries to find another correct keyword but uses wrong offset rather than accumulated offset. BUG=524043 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1307353005 . (cherry picked from commit 9bd18183ba8210c91d71c3060146235750a4c71c) Review URL: https://codereview.chromium.org/1365253003 .
2015-08-14Merge to XFA: Don't bother checking pointers before delete[] and FX_Free().Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1297713003 . (cherry picked from commit cb62e7657b3a9a04142028a4e6614029a08e894b) Review URL: https://codereview.chromium.org/1287053005 .
2015-08-04XFA: clang-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|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
2015-07-23Merge to XFA: FX_BOOL combo patch.Tom Sepez
Original Review URL: https://codereview.chromium.org/1257503002 Original Review URL: https://codereview.chromium.org/1253603002 Manual merge for: core/include/fxge/fx_font.h core/src/fxcodec/codec/codec_int.h fpdfsdk/src/javascript/PublicMethods.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1248153004 .
2015-07-23Merge to XFA - else after returns.Tom Sepez
(cherry picked from commit 3c012fef2bb72c8ec1faa73e11ee35539b2559d6) Original Review URL: https://codereview.chromium.org/1243953004 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1239313005 .
2015-07-15Merge to XFA: Make ContentStreamParser members private, fix constructorTom Sepez
(cherry picked from commit 5b4f57cdc0a279bd9b8e03b8f5714b9d39e642a8) Original Review URL: https://codereview.chromium.org/1219683007 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1235593004 .
2015-07-01Cherry-pick to XFA: Fix some clang warnings with -Wmissing-braces in pdfium.Nico Weber
Clang warns if there are missing braces around a subobject initializer. The most common idiom that triggers this is: STRUCT s = {0}; if the first field of STRUCT is itself a struct. This can be more simply written as: STRUCT s = {}; which also prevents the warning from firing. Other instances of the warning have been fixed by adding braces where appropriate. R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1213523004.
2015-06-19Merge to XFA: Cleanup: Do not check pointers before deleting them.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192743004. (cherry picked from commit cfac954abcab7caf47d3fa3d641c553cba998271) Review URL: https://codereview.chromium.org/1196783003.
2015-06-13Remove trailing whitespaces in core, XFA edition.Lei Zhang
Review URL: https://codereview.chromium.org/1180333002.
2015-06-11Merge to XFA: Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.Tom Sepez
Only manual merge was core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp follwed by scripts. Original Review URL: https://codereview.chromium.org/1179693003. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1179953002.
2015-06-10Merge to XFA: Remove typdefs for pointer types in fx_system.h.Tom Sepez
Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002.
2015-06-09Merge to XFA: Use stdint.h types throughout PDFium.Tom Sepez
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
2015-05-20Merge to XFA: Remove FX_Alloc() null checks now that it can't return NULL.Tom Sepez
Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1143663008
2015-05-06Merge to XFA: Replace FX_NEW with new, remove tests from fpdfapiLei Zhang
Very few places where a change is required, but remove FX_NEW to show they've been audited. Review URL: https://codereview.chromium.org/1075953004 (cherry picked from commit 5c357a5d3d873be6b0ab01d7bec82f79d0a09f0e) R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1125183006
2015-01-27Merge to XFA: Kill scattered extern _PDF_CharType declarations.Tom Sepez
TBR=brucedawson@chromium.org Original Review URL: https://codereview.chromium.org/880663003 Review URL: https://codereview.chromium.org/884473003
2014-10-14Don't leave dangling pointer to out-of-scope local in ↵Tom Sepez
CPDF_StreamContentParser::Parse. This is just a bit of defensive programming; I'm not sure the situation can occur in the current code, but the following code is likely to set off a red flag to anyone who reads it: CPDF_StreamParser syntax(pData, dwSize); m_pSyntax = &syntax; since the extent of the local |syntax| is far less than the pointer member |m_pSyntax|. NULL it out before syntax goes out of scope. R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/652063002
2014-07-08Remove custom memory managerBo Xu
BUG= R=palmer@chromium.org Review URL: https://codereview.chromium.org/372473003
2014-06-30Remove "this==NULL" and adjust corresponding callersBo Xu
BUG= R=thakis@chromium.org Review URL: https://codereview.chromium.org/361553002
2014-05-24Fix warnings in android build, fix font rendering issue, fix issue 357588: ↵Bo Xu
wrong characters representation, and addjust some code indent BUG= R=jam@chromium.org Review URL: https://codereview.chromium.org/294353002
2014-05-23Convert all line endings to LF.John Abd-El-Malek
2014-05-17Initial commit.John Abd-El-Malek